summaryrefslogtreecommitdiffstats
path: root/ksvg
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /ksvg
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg')
-rw-r--r--ksvg/AUTHORS2
-rw-r--r--ksvg/FAQ17
-rw-r--r--ksvg/Makefile.am115
-rw-r--r--ksvg/NEWS8
-rw-r--r--ksvg/README9
-rw-r--r--ksvg/RELEASE-TODO10
-rw-r--r--ksvg/TODO10
-rw-r--r--ksvg/VERSION1
-rw-r--r--ksvg/configure.in.bot25
-rw-r--r--ksvg/configure.in.in203
-rw-r--r--ksvg/core/CanvasFactory.cpp176
-rw-r--r--ksvg/core/CanvasFactory.h69
-rw-r--r--ksvg/core/CanvasItem.h154
-rw-r--r--ksvg/core/CanvasItems.cpp509
-rw-r--r--ksvg/core/CanvasItems.h133
-rw-r--r--ksvg/core/DocumentFactory.cpp110
-rw-r--r--ksvg/core/DocumentFactory.h63
-rw-r--r--ksvg/core/KSVGCanvas.cpp786
-rw-r--r--ksvg/core/KSVGCanvas.h190
-rw-r--r--ksvg/core/KSVGHelper.cpp92
-rw-r--r--ksvg/core/KSVGHelper.h144
-rw-r--r--ksvg/core/KSVGLoader.cpp449
-rw-r--r--ksvg/core/KSVGLoader.h92
-rw-r--r--ksvg/core/KSVGReader.cc500
-rw-r--r--ksvg/core/KSVGReader.h67
-rw-r--r--ksvg/core/KSVGTextChunk.cpp69
-rw-r--r--ksvg/core/KSVGTextChunk.h54
-rw-r--r--ksvg/core/Makefile.am16
-rw-r--r--ksvg/core/ksvgrenderer.desktop56
-rw-r--r--ksvg/data/SVGAElementImpl.lut.h20
-rw-r--r--ksvg/data/SVGAngleImpl.lut.h77
-rw-r--r--ksvg/data/SVGAnimatedAngleImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedBooleanImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedEnumerationImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedIntegerImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedLengthImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedLengthListImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedNumberImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedNumberListImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedPathDataImpl.lut.h28
-rw-r--r--ksvg/data/SVGAnimatedPointsImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedPreserveAspectRatioImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedRectImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedStringImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimatedTransformListImpl.lut.h22
-rw-r--r--ksvg/data/SVGAnimationElementImpl.lut.h94
-rw-r--r--ksvg/data/SVGCircleElementImpl.lut.h26
-rw-r--r--ksvg/data/SVGClipPathElementImpl.lut.h20
-rw-r--r--ksvg/data/SVGColorImpl.lut.h76
-rw-r--r--ksvg/data/SVGColorProfileElementImpl.lut.h26
-rw-r--r--ksvg/data/SVGCursorElementImpl.lut.h22
-rw-r--r--ksvg/data/SVGDocumentImpl.lut.h67
-rw-r--r--ksvg/data/SVGEcma.lut.h396
-rw-r--r--ksvg/data/SVGElementImpl.lut.h92
-rw-r--r--ksvg/data/SVGEllipseElementImpl.lut.h28
-rw-r--r--ksvg/data/SVGEventImpl.lut.h271
-rw-r--r--ksvg/data/SVGExternalResourcesRequiredImpl.lut.h20
-rw-r--r--ksvg/data/SVGFitToViewBoxImpl.lut.h22
-rw-r--r--ksvg/data/SVGForeignObjectElementImpl.lut.h26
-rw-r--r--ksvg/data/SVGGlyphElementImpl.lut.h39
-rw-r--r--ksvg/data/SVGGlyphRefElementImpl.lut.h28
-rw-r--r--ksvg/data/SVGGradientElementImpl.lut.h51
-rw-r--r--ksvg/data/SVGICCColorImpl.lut.h23
-rw-r--r--ksvg/data/SVGImageElementImpl.lut.h31
-rw-r--r--ksvg/data/SVGLangSpaceImpl.lut.h24
-rw-r--r--ksvg/data/SVGLengthImpl.lut.h87
-rw-r--r--ksvg/data/SVGLengthListImpl.lut.h55
-rw-r--r--ksvg/data/SVGLineElementImpl.lut.h27
-rw-r--r--ksvg/data/SVGLinearGradientElementImpl.lut.h27
-rw-r--r--ksvg/data/SVGLocatableImpl.lut.h49
-rw-r--r--ksvg/data/SVGMarkerElementImpl.lut.h90
-rw-r--r--ksvg/data/SVGMaskElementImpl.lut.h31
-rw-r--r--ksvg/data/SVGMatrixImpl.lut.h74
-rw-r--r--ksvg/data/SVGNumberImpl.lut.h20
-rw-r--r--ksvg/data/SVGNumberListImpl.lut.h55
-rw-r--r--ksvg/data/SVGPaintImpl.lut.h59
-rw-r--r--ksvg/data/SVGPathElementImpl.lut.h87
-rw-r--r--ksvg/data/SVGPathSegArcImpl.lut.h75
-rw-r--r--ksvg/data/SVGPathSegCurvetoCubicImpl.lut.h65
-rw-r--r--ksvg/data/SVGPathSegCurvetoCubicSmoothImpl.lut.h55
-rw-r--r--ksvg/data/SVGPathSegCurvetoQuadraticImpl.lut.h53
-rw-r--r--ksvg/data/SVGPathSegCurvetoQuadraticSmoothImpl.lut.h43
-rw-r--r--ksvg/data/SVGPathSegImpl.lut.h88
-rw-r--r--ksvg/data/SVGPathSegLinetoHorizontalImpl.lut.h39
-rw-r--r--ksvg/data/SVGPathSegLinetoImpl.lut.h43
-rw-r--r--ksvg/data/SVGPathSegLinetoVerticalImpl.lut.h39
-rw-r--r--ksvg/data/SVGPathSegListImpl.lut.h55
-rw-r--r--ksvg/data/SVGPathSegMovetoImpl.lut.h43
-rw-r--r--ksvg/data/SVGPatternElementImpl.lut.h37
-rw-r--r--ksvg/data/SVGPointImpl.lut.h22
-rw-r--r--ksvg/data/SVGPointListImpl.lut.h55
-rw-r--r--ksvg/data/SVGPreserveAspectRatioImpl.lut.h73
-rw-r--r--ksvg/data/SVGRadialGradientElementImpl.lut.h30
-rw-r--r--ksvg/data/SVGRectElementImpl.lut.h29
-rw-r--r--ksvg/data/SVGRectImpl.lut.h26
-rw-r--r--ksvg/data/SVGSVGElementImpl.lut.h136
-rw-r--r--ksvg/data/SVGScriptElementImpl.lut.h20
-rw-r--r--ksvg/data/SVGStopElementImpl.lut.h22
-rw-r--r--ksvg/data/SVGStringListImpl.lut.h74
-rw-r--r--ksvg/data/SVGStylableImpl.lut.h143
-rw-r--r--ksvg/data/SVGStyleElementImpl.lut.h27
-rw-r--r--ksvg/data/SVGSymbolElementImpl.lut.h22
-rw-r--r--ksvg/data/SVGTestsImpl.lut.h45
-rw-r--r--ksvg/data/SVGTextContentElementImpl.lut.h84
-rw-r--r--ksvg/data/SVGTextPathElementImpl.lut.h56
-rw-r--r--ksvg/data/SVGTextPositioningElementImpl.lut.h28
-rw-r--r--ksvg/data/SVGTransformImpl.lut.h89
-rw-r--r--ksvg/data/SVGTransformListImpl.lut.h55
-rw-r--r--ksvg/data/SVGTransformableImpl.lut.h20
-rw-r--r--ksvg/data/SVGURIReferenceImpl.lut.h20
-rw-r--r--ksvg/data/SVGUseElementImpl.lut.h36
-rw-r--r--ksvg/data/SVGViewElementImpl.lut.h20
-rw-r--r--ksvg/data/SVGZoomAndPanImpl.lut.h45
-rw-r--r--ksvg/data/SVGZoomEventImpl.lut.h29
-rw-r--r--ksvg/data/ksvg_window.lut.h98
-rw-r--r--ksvg/dom/Makefile.am58
-rw-r--r--ksvg/dom/SVGAElement.cc80
-rw-r--r--ksvg/dom/SVGAElement.h64
-rw-r--r--ksvg/dom/SVGAltGlyphDefElement.cc67
-rw-r--r--ksvg/dom/SVGAltGlyphDefElement.h50
-rw-r--r--ksvg/dom/SVGAltGlyphElement.cc80
-rw-r--r--ksvg/dom/SVGAltGlyphElement.h55
-rw-r--r--ksvg/dom/SVGAngle.cc120
-rw-r--r--ksvg/dom/SVGAngle.h74
-rw-r--r--ksvg/dom/SVGAnimateColorElement.cc67
-rw-r--r--ksvg/dom/SVGAnimateColorElement.h50
-rw-r--r--ksvg/dom/SVGAnimateElement.cc67
-rw-r--r--ksvg/dom/SVGAnimateElement.h50
-rw-r--r--ksvg/dom/SVGAnimateMotionElement.cc65
-rw-r--r--ksvg/dom/SVGAnimateMotionElement.h47
-rw-r--r--ksvg/dom/SVGAnimateTransformElement.cc67
-rw-r--r--ksvg/dom/SVGAnimateTransformElement.h50
-rw-r--r--ksvg/dom/SVGAnimatedAngle.cc79
-rw-r--r--ksvg/dom/SVGAnimatedAngle.h52
-rw-r--r--ksvg/dom/SVGAnimatedBoolean.cc84
-rw-r--r--ksvg/dom/SVGAnimatedBoolean.h53
-rw-r--r--ksvg/dom/SVGAnimatedEnumeration.cc84
-rw-r--r--ksvg/dom/SVGAnimatedEnumeration.h53
-rw-r--r--ksvg/dom/SVGAnimatedInteger.cc84
-rw-r--r--ksvg/dom/SVGAnimatedInteger.h53
-rw-r--r--ksvg/dom/SVGAnimatedLength.cc79
-rw-r--r--ksvg/dom/SVGAnimatedLength.h52
-rw-r--r--ksvg/dom/SVGAnimatedLengthList.cc78
-rw-r--r--ksvg/dom/SVGAnimatedLengthList.h51
-rw-r--r--ksvg/dom/SVGAnimatedNumber.cc84
-rw-r--r--ksvg/dom/SVGAnimatedNumber.h53
-rw-r--r--ksvg/dom/SVGAnimatedNumberList.cc78
-rw-r--r--ksvg/dom/SVGAnimatedNumberList.h51
-rw-r--r--ksvg/dom/SVGAnimatedPathData.cc91
-rw-r--r--ksvg/dom/SVGAnimatedPathData.h54
-rw-r--r--ksvg/dom/SVGAnimatedPoints.cc79
-rw-r--r--ksvg/dom/SVGAnimatedPoints.h52
-rw-r--r--ksvg/dom/SVGAnimatedPreserveAspectRatio.cc79
-rw-r--r--ksvg/dom/SVGAnimatedPreserveAspectRatio.h52
-rw-r--r--ksvg/dom/SVGAnimatedRect.cc79
-rw-r--r--ksvg/dom/SVGAnimatedRect.h51
-rw-r--r--ksvg/dom/SVGAnimatedString.cc84
-rw-r--r--ksvg/dom/SVGAnimatedString.h55
-rw-r--r--ksvg/dom/SVGAnimatedTransformList.cc79
-rw-r--r--ksvg/dom/SVGAnimatedTransformList.h52
-rw-r--r--ksvg/dom/SVGAnimationElement.cc93
-rw-r--r--ksvg/dom/SVGAnimationElement.h60
-rw-r--r--ksvg/dom/SVGCSSRule.cc66
-rw-r--r--ksvg/dom/SVGCSSRule.h51
-rw-r--r--ksvg/dom/SVGCircleElement.cc92
-rw-r--r--ksvg/dom/SVGCircleElement.h117
-rw-r--r--ksvg/dom/SVGClipPathElement.cc79
-rw-r--r--ksvg/dom/SVGClipPathElement.h65
-rw-r--r--ksvg/dom/SVGColor.cc105
-rw-r--r--ksvg/dom/SVGColor.h69
-rw-r--r--ksvg/dom/SVGColorProfileElement.cc105
-rw-r--r--ksvg/dom/SVGColorProfileElement.h62
-rw-r--r--ksvg/dom/SVGColorProfileRule.cc103
-rw-r--r--ksvg/dom/SVGColorProfileRule.h57
-rw-r--r--ksvg/dom/SVGComponentTransferFunctionElement.cc112
-rw-r--r--ksvg/dom/SVGComponentTransferFunctionElement.h71
-rw-r--r--ksvg/dom/SVGCursorElement.cc83
-rw-r--r--ksvg/dom/SVGCursorElement.h60
-rw-r--r--ksvg/dom/SVGDefinitionSrcElement.cc67
-rw-r--r--ksvg/dom/SVGDefinitionSrcElement.h50
-rw-r--r--ksvg/dom/SVGDefsElement.cc72
-rw-r--r--ksvg/dom/SVGDefsElement.h78
-rw-r--r--ksvg/dom/SVGDescElement.cc69
-rw-r--r--ksvg/dom/SVGDescElement.h54
-rw-r--r--ksvg/dom/SVGDocument.cc138
-rw-r--r--ksvg/dom/SVGDocument.h70
-rw-r--r--ksvg/dom/SVGElement.cc124
-rw-r--r--ksvg/dom/SVGElement.h83
-rw-r--r--ksvg/dom/SVGElementInstance.cc117
-rw-r--r--ksvg/dom/SVGElementInstance.h60
-rw-r--r--ksvg/dom/SVGElementInstanceList.cc79
-rw-r--r--ksvg/dom/SVGElementInstanceList.h52
-rw-r--r--ksvg/dom/SVGEllipseElement.cc98
-rw-r--r--ksvg/dom/SVGEllipseElement.h131
-rw-r--r--ksvg/dom/SVGEvent.cc187
-rw-r--r--ksvg/dom/SVGEvent.h95
-rw-r--r--ksvg/dom/SVGException.h51
-rw-r--r--ksvg/dom/SVGExternalResourcesRequired.cc65
-rw-r--r--ksvg/dom/SVGExternalResourcesRequired.h53
-rw-r--r--ksvg/dom/SVGFEBlendElement.cc88
-rw-r--r--ksvg/dom/SVGFEBlendElement.h68
-rw-r--r--ksvg/dom/SVGFEColorMatrixElement.cc89
-rw-r--r--ksvg/dom/SVGFEColorMatrixElement.h68
-rw-r--r--ksvg/dom/SVGFEComponentTransferElement.cc75
-rw-r--r--ksvg/dom/SVGFEComponentTransferElement.h55
-rw-r--r--ksvg/dom/SVGFECompositeElement.cc113
-rw-r--r--ksvg/dom/SVGFECompositeElement.h74
-rw-r--r--ksvg/dom/SVGFEConvolveMatrixElement.cc140
-rw-r--r--ksvg/dom/SVGFEConvolveMatrixElement.h78
-rw-r--r--ksvg/dom/SVGFEDiffuseLightingElement.cc88
-rw-r--r--ksvg/dom/SVGFEDiffuseLightingElement.h58
-rw-r--r--ksvg/dom/SVGFEDisplacementMapElement.cc101
-rw-r--r--ksvg/dom/SVGFEDisplacementMapElement.h69
-rw-r--r--ksvg/dom/SVGFEDistantLightElement.cc80
-rw-r--r--ksvg/dom/SVGFEDistantLightElement.h54
-rw-r--r--ksvg/dom/SVGFEFloodElement.cc76
-rw-r--r--ksvg/dom/SVGFEFloodElement.h57
-rw-r--r--ksvg/dom/SVGFEFuncAElement.cc67
-rw-r--r--ksvg/dom/SVGFEFuncAElement.h50
-rw-r--r--ksvg/dom/SVGFEFuncBElement.cc67
-rw-r--r--ksvg/dom/SVGFEFuncBElement.h50
-rw-r--r--ksvg/dom/SVGFEFuncGElement.cc67
-rw-r--r--ksvg/dom/SVGFEFuncGElement.h50
-rw-r--r--ksvg/dom/SVGFEFuncRElement.cc67
-rw-r--r--ksvg/dom/SVGFEFuncRElement.h50
-rw-r--r--ksvg/dom/SVGFEGaussianBlurElement.cc94
-rw-r--r--ksvg/dom/SVGFEGaussianBlurElement.h60
-rw-r--r--ksvg/dom/SVGFEImageElement.cc72
-rw-r--r--ksvg/dom/SVGFEImageElement.h60
-rw-r--r--ksvg/dom/SVGFEMergeElement.cc68
-rw-r--r--ksvg/dom/SVGFEMergeElement.h52
-rw-r--r--ksvg/dom/SVGFEMergeNodeElement.cc74
-rw-r--r--ksvg/dom/SVGFEMergeNodeElement.h53
-rw-r--r--ksvg/dom/SVGFEMorphologyElement.cc95
-rw-r--r--ksvg/dom/SVGFEMorphologyElement.h67
-rw-r--r--ksvg/dom/SVGFEOffsetElement.cc88
-rw-r--r--ksvg/dom/SVGFEOffsetElement.h58
-rw-r--r--ksvg/dom/SVGFEPointLightElement.cc86
-rw-r--r--ksvg/dom/SVGFEPointLightElement.h55
-rw-r--r--ksvg/dom/SVGFESpecularLightingElement.cc94
-rw-r--r--ksvg/dom/SVGFESpecularLightingElement.h59
-rw-r--r--ksvg/dom/SVGFESpotLightElement.cc116
-rw-r--r--ksvg/dom/SVGFESpotLightElement.h60
-rw-r--r--ksvg/dom/SVGFETileElement.cc75
-rw-r--r--ksvg/dom/SVGFETileElement.h55
-rw-r--r--ksvg/dom/SVGFETurbulenceElement.cc107
-rw-r--r--ksvg/dom/SVGFETurbulenceElement.h71
-rw-r--r--ksvg/dom/SVGFilterElement.cc128
-rw-r--r--ksvg/dom/SVGFilterElement.h74
-rw-r--r--ksvg/dom/SVGFilterPrimitiveStandardAttributes.cc88
-rw-r--r--ksvg/dom/SVGFilterPrimitiveStandardAttributes.h55
-rw-r--r--ksvg/dom/SVGFitToViewBox.cc72
-rw-r--r--ksvg/dom/SVGFitToViewBox.h55
-rw-r--r--ksvg/dom/SVGFontElement.cc69
-rw-r--r--ksvg/dom/SVGFontElement.h54
-rw-r--r--ksvg/dom/SVGFontFaceElement.cc67
-rw-r--r--ksvg/dom/SVGFontFaceElement.h50
-rw-r--r--ksvg/dom/SVGFontFaceFormatElement.cc67
-rw-r--r--ksvg/dom/SVGFontFaceFormatElement.h50
-rw-r--r--ksvg/dom/SVGFontFaceNameElement.cc67
-rw-r--r--ksvg/dom/SVGFontFaceNameElement.h50
-rw-r--r--ksvg/dom/SVGFontFaceSrcElement.cc67
-rw-r--r--ksvg/dom/SVGFontFaceSrcElement.h50
-rw-r--r--ksvg/dom/SVGFontFaceUriElement.cc67
-rw-r--r--ksvg/dom/SVGFontFaceUriElement.h50
-rw-r--r--ksvg/dom/SVGForeignObjectElement.cc97
-rw-r--r--ksvg/dom/SVGForeignObjectElement.h66
-rw-r--r--ksvg/dom/SVGGElement.cc72
-rw-r--r--ksvg/dom/SVGGElement.h83
-rw-r--r--ksvg/dom/SVGGlyphElement.cc68
-rw-r--r--ksvg/dom/SVGGlyphElement.h52
-rw-r--r--ksvg/dom/SVGGlyphRefElement.cc81
-rw-r--r--ksvg/dom/SVGGlyphRefElement.h57
-rw-r--r--ksvg/dom/SVGGradientElement.cc80
-rw-r--r--ksvg/dom/SVGGradientElement.h71
-rw-r--r--ksvg/dom/SVGHKernElement.cc67
-rw-r--r--ksvg/dom/SVGHKernElement.h50
-rw-r--r--ksvg/dom/SVGICCColor.cc85
-rw-r--r--ksvg/dom/SVGICCColor.h56
-rw-r--r--ksvg/dom/SVGImageElement.cc106
-rw-r--r--ksvg/dom/SVGImageElement.h70
-rw-r--r--ksvg/dom/SVGLangSpace.cc82
-rw-r--r--ksvg/dom/SVGLangSpace.h58
-rw-r--r--ksvg/dom/SVGLength.cc135
-rw-r--r--ksvg/dom/SVGLength.h81
-rw-r--r--ksvg/dom/SVGLengthList.cc115
-rw-r--r--ksvg/dom/SVGLengthList.h59
-rw-r--r--ksvg/dom/SVGLineElement.cc98
-rw-r--r--ksvg/dom/SVGLineElement.h126
-rw-r--r--ksvg/dom/SVGLinearGradientElement.cc92
-rw-r--r--ksvg/dom/SVGLinearGradientElement.h141
-rw-r--r--ksvg/dom/SVGLocatable.cc97
-rw-r--r--ksvg/dom/SVGLocatable.h122
-rw-r--r--ksvg/dom/SVGMPathElement.cc69
-rw-r--r--ksvg/dom/SVGMPathElement.h54
-rw-r--r--ksvg/dom/SVGMarkerElement.cc129
-rw-r--r--ksvg/dom/SVGMarkerElement.h87
-rw-r--r--ksvg/dom/SVGMaskElement.cc109
-rw-r--r--ksvg/dom/SVGMaskElement.h69
-rw-r--r--ksvg/dom/SVGMatrix.cc210
-rw-r--r--ksvg/dom/SVGMatrix.h79
-rw-r--r--ksvg/dom/SVGMetadataElement.cc67
-rw-r--r--ksvg/dom/SVGMetadataElement.h50
-rw-r--r--ksvg/dom/SVGMissingGlyphElement.cc68
-rw-r--r--ksvg/dom/SVGMissingGlyphElement.h52
-rw-r--r--ksvg/dom/SVGNumber.cc78
-rw-r--r--ksvg/dom/SVGNumber.h51
-rw-r--r--ksvg/dom/SVGNumberList.cc115
-rw-r--r--ksvg/dom/SVGNumberList.h58
-rw-r--r--ksvg/dom/SVGPaint.cc93
-rw-r--r--ksvg/dom/SVGPaint.h70
-rw-r--r--ksvg/dom/SVGPathElement.cc200
-rw-r--r--ksvg/dom/SVGPathElement.h107
-rw-r--r--ksvg/dom/SVGPathSeg.cc69
-rw-r--r--ksvg/dom/SVGPathSeg.h76
-rw-r--r--ksvg/dom/SVGPathSegArc.cc238
-rw-r--r--ksvg/dom/SVGPathSegArc.h109
-rw-r--r--ksvg/dom/SVGPathSegClosePath.cc46
-rw-r--r--ksvg/dom/SVGPathSegClosePath.h50
-rw-r--r--ksvg/dom/SVGPathSegCurvetoCubic.cc214
-rw-r--r--ksvg/dom/SVGPathSegCurvetoCubic.h103
-rw-r--r--ksvg/dom/SVGPathSegCurvetoCubicSmooth.cc166
-rw-r--r--ksvg/dom/SVGPathSegCurvetoCubicSmooth.h91
-rw-r--r--ksvg/dom/SVGPathSegCurvetoQuadratic.cc166
-rw-r--r--ksvg/dom/SVGPathSegCurvetoQuadratic.h91
-rw-r--r--ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.cc118
-rw-r--r--ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.h79
-rw-r--r--ksvg/dom/SVGPathSegLineto.cc118
-rw-r--r--ksvg/dom/SVGPathSegLineto.h79
-rw-r--r--ksvg/dom/SVGPathSegLinetoHorizontal.cc94
-rw-r--r--ksvg/dom/SVGPathSegLinetoHorizontal.h73
-rw-r--r--ksvg/dom/SVGPathSegLinetoVertical.cc94
-rw-r--r--ksvg/dom/SVGPathSegLinetoVertical.h73
-rw-r--r--ksvg/dom/SVGPathSegList.cc114
-rw-r--r--ksvg/dom/SVGPathSegList.h59
-rw-r--r--ksvg/dom/SVGPathSegMoveto.cc118
-rw-r--r--ksvg/dom/SVGPathSegMoveto.h79
-rw-r--r--ksvg/dom/SVGPatternElement.cc117
-rw-r--r--ksvg/dom/SVGPatternElement.h188
-rw-r--r--ksvg/dom/SVGPoint.cc97
-rw-r--r--ksvg/dom/SVGPoint.h57
-rw-r--r--ksvg/dom/SVGPointList.cc114
-rw-r--r--ksvg/dom/SVGPointList.h57
-rw-r--r--ksvg/dom/SVGPolygonElement.cc84
-rw-r--r--ksvg/dom/SVGPolygonElement.h106
-rw-r--r--ksvg/dom/SVGPolylineElement.cc85
-rw-r--r--ksvg/dom/SVGPolylineElement.h106
-rw-r--r--ksvg/dom/SVGPreserveAspectRatio.cc81
-rw-r--r--ksvg/dom/SVGPreserveAspectRatio.h76
-rw-r--r--ksvg/dom/SVGRadialGradientElement.cc98
-rw-r--r--ksvg/dom/SVGRadialGradientElement.h57
-rw-r--r--ksvg/dom/SVGRect.cc114
-rw-r--r--ksvg/dom/SVGRect.h87
-rw-r--r--ksvg/dom/SVGRectElement.cc109
-rw-r--r--ksvg/dom/SVGRectElement.h173
-rw-r--r--ksvg/dom/SVGRenderingIntent.h41
-rw-r--r--ksvg/dom/SVGSVGElement.cc337
-rw-r--r--ksvg/dom/SVGSVGElement.h581
-rw-r--r--ksvg/dom/SVGScriptElement.cc81
-rw-r--r--ksvg/dom/SVGScriptElement.h58
-rw-r--r--ksvg/dom/SVGSetElement.cc67
-rw-r--r--ksvg/dom/SVGSetElement.h50
-rw-r--r--ksvg/dom/SVGStopElement.cc75
-rw-r--r--ksvg/dom/SVGStopElement.h81
-rw-r--r--ksvg/dom/SVGStringList.cc115
-rw-r--r--ksvg/dom/SVGStringList.h60
-rw-r--r--ksvg/dom/SVGStylable.cc76
-rw-r--r--ksvg/dom/SVGStylable.h56
-rw-r--r--ksvg/dom/SVGStyleElement.cc115
-rw-r--r--ksvg/dom/SVGStyleElement.h63
-rw-r--r--ksvg/dom/SVGSwitchElement.cc72
-rw-r--r--ksvg/dom/SVGSwitchElement.h60
-rw-r--r--ksvg/dom/SVGSymbolElement.cc71
-rw-r--r--ksvg/dom/SVGSymbolElement.h58
-rw-r--r--ksvg/dom/SVGTRefElement.cc68
-rw-r--r--ksvg/dom/SVGTRefElement.h52
-rw-r--r--ksvg/dom/SVGTSpanElement.cc67
-rw-r--r--ksvg/dom/SVGTSpanElement.h70
-rw-r--r--ksvg/dom/SVGTests.cc83
-rw-r--r--ksvg/dom/SVGTests.h59
-rw-r--r--ksvg/dom/SVGTextContentElement.cc120
-rw-r--r--ksvg/dom/SVGTextContentElement.h79
-rw-r--r--ksvg/dom/SVGTextElement.cc68
-rw-r--r--ksvg/dom/SVGTextElement.h115
-rw-r--r--ksvg/dom/SVGTextPathElement.cc89
-rw-r--r--ksvg/dom/SVGTextPathElement.h70
-rw-r--r--ksvg/dom/SVGTextPositioningElement.cc85
-rw-r--r--ksvg/dom/SVGTextPositioningElement.h60
-rw-r--r--ksvg/dom/SVGTitleElement.cc69
-rw-r--r--ksvg/dom/SVGTitleElement.h54
-rw-r--r--ksvg/dom/SVGTransform.cc119
-rw-r--r--ksvg/dom/SVGTransform.h71
-rw-r--r--ksvg/dom/SVGTransformList.cc129
-rw-r--r--ksvg/dom/SVGTransformList.h63
-rw-r--r--ksvg/dom/SVGTransformable.cc67
-rw-r--r--ksvg/dom/SVGTransformable.h55
-rw-r--r--ksvg/dom/SVGURIReference.cc63
-rw-r--r--ksvg/dom/SVGURIReference.h53
-rw-r--r--ksvg/dom/SVGUnitTypes.h41
-rw-r--r--ksvg/dom/SVGUseElement.cc111
-rw-r--r--ksvg/dom/SVGUseElement.h71
-rw-r--r--ksvg/dom/SVGVKernElement.cc67
-rw-r--r--ksvg/dom/SVGVKernElement.h50
-rw-r--r--ksvg/dom/SVGViewElement.cc77
-rw-r--r--ksvg/dom/SVGViewElement.h59
-rw-r--r--ksvg/dom/SVGViewSpec.cc107
-rw-r--r--ksvg/dom/SVGViewSpec.h63
-rw-r--r--ksvg/dom/SVGWindow.cc175
-rw-r--r--ksvg/dom/SVGWindow.h127
-rw-r--r--ksvg/dom/SVGZoomAndPan.cc70
-rw-r--r--ksvg/dom/SVGZoomAndPan.h60
-rw-r--r--ksvg/dom/SVGZoomEvent.cc99
-rw-r--r--ksvg/dom/SVGZoomEvent.h58
-rw-r--r--ksvg/ecma/Makefile.am7
-rw-r--r--ksvg/ecma/ksvg_bridge.h103
-rw-r--r--ksvg/ecma/ksvg_cacheimpl.h65
-rw-r--r--ksvg/ecma/ksvg_ecma.cpp336
-rw-r--r--ksvg/ecma/ksvg_ecma.h114
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.cpp99
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.h54
-rw-r--r--ksvg/ecma/ksvg_helper.cpp68
-rw-r--r--ksvg/ecma/ksvg_lookup.h318
-rw-r--r--ksvg/ecma/ksvg_scriptinterpreter.cpp92
-rw-r--r--ksvg/ecma/ksvg_scriptinterpreter.h71
-rw-r--r--ksvg/ecma/ksvg_window.cpp578
-rw-r--r--ksvg/ecma/ksvg_window.h122
-rw-r--r--ksvg/impl/LRUCache.h169
-rw-r--r--ksvg/impl/Makefile.am116
-rw-r--r--ksvg/impl/SVGAElementImpl.cc117
-rw-r--r--ksvg/impl/SVGAElementImpl.h79
-rw-r--r--ksvg/impl/SVGAltGlyphDefElementImpl.cc33
-rw-r--r--ksvg/impl/SVGAltGlyphDefElementImpl.h49
-rw-r--r--ksvg/impl/SVGAltGlyphElementImpl.cc50
-rw-r--r--ksvg/impl/SVGAltGlyphElementImpl.h55
-rw-r--r--ksvg/impl/SVGAngleImpl.cc277
-rw-r--r--ksvg/impl/SVGAngleImpl.h102
-rw-r--r--ksvg/impl/SVGAnimateColorElementImpl.cc98
-rw-r--r--ksvg/impl/SVGAnimateColorElementImpl.h60
-rw-r--r--ksvg/impl/SVGAnimateElementImpl.cc191
-rw-r--r--ksvg/impl/SVGAnimateElementImpl.h59
-rw-r--r--ksvg/impl/SVGAnimateMotionElementImpl.cc102
-rw-r--r--ksvg/impl/SVGAnimateMotionElementImpl.h56
-rw-r--r--ksvg/impl/SVGAnimateTransformElementImpl.cc257
-rw-r--r--ksvg/impl/SVGAnimateTransformElementImpl.h74
-rw-r--r--ksvg/impl/SVGAnimatedAngleImpl.cc83
-rw-r--r--ksvg/impl/SVGAnimatedAngleImpl.h61
-rw-r--r--ksvg/impl/SVGAnimatedBooleanImpl.cc93
-rw-r--r--ksvg/impl/SVGAnimatedBooleanImpl.h64
-rw-r--r--ksvg/impl/SVGAnimatedEnumerationImpl.cc93
-rw-r--r--ksvg/impl/SVGAnimatedEnumerationImpl.h64
-rw-r--r--ksvg/impl/SVGAnimatedIntegerImpl.cc91
-rw-r--r--ksvg/impl/SVGAnimatedIntegerImpl.h64
-rw-r--r--ksvg/impl/SVGAnimatedLengthImpl.cc96
-rw-r--r--ksvg/impl/SVGAnimatedLengthImpl.h65
-rw-r--r--ksvg/impl/SVGAnimatedLengthListImpl.cc95
-rw-r--r--ksvg/impl/SVGAnimatedLengthListImpl.h61
-rw-r--r--ksvg/impl/SVGAnimatedNumberImpl.cc94
-rw-r--r--ksvg/impl/SVGAnimatedNumberImpl.h63
-rw-r--r--ksvg/impl/SVGAnimatedNumberListImpl.cc82
-rw-r--r--ksvg/impl/SVGAnimatedNumberListImpl.h58
-rw-r--r--ksvg/impl/SVGAnimatedPathDataImpl.cc108
-rw-r--r--ksvg/impl/SVGAnimatedPathDataImpl.h67
-rw-r--r--ksvg/impl/SVGAnimatedPointsImpl.cc139
-rw-r--r--ksvg/impl/SVGAnimatedPointsImpl.h67
-rw-r--r--ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.cc83
-rw-r--r--ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.h61
-rw-r--r--ksvg/impl/SVGAnimatedRectImpl.cc81
-rw-r--r--ksvg/impl/SVGAnimatedRectImpl.h61
-rw-r--r--ksvg/impl/SVGAnimatedStringImpl.cc90
-rw-r--r--ksvg/impl/SVGAnimatedStringImpl.h65
-rw-r--r--ksvg/impl/SVGAnimatedTransformListImpl.cc83
-rw-r--r--ksvg/impl/SVGAnimatedTransformListImpl.h61
-rw-r--r--ksvg/impl/SVGAnimationElementImpl.cc465
-rw-r--r--ksvg/impl/SVGAnimationElementImpl.h149
-rw-r--r--ksvg/impl/SVGBBoxTarget.cc55
-rw-r--r--ksvg/impl/SVGBBoxTarget.h45
-rw-r--r--ksvg/impl/SVGCSSRuleImpl.cc33
-rw-r--r--ksvg/impl/SVGCSSRuleImpl.h42
-rw-r--r--ksvg/impl/SVGCircleElementImpl.cc178
-rw-r--r--ksvg/impl/SVGCircleElementImpl.h84
-rw-r--r--ksvg/impl/SVGClipPathElementImpl.cc104
-rw-r--r--ksvg/impl/SVGClipPathElementImpl.h80
-rw-r--r--ksvg/impl/SVGColorImpl.cc540
-rw-r--r--ksvg/impl/SVGColorImpl.h94
-rw-r--r--ksvg/impl/SVGColorProfileElementImpl.cc271
-rw-r--r--ksvg/impl/SVGColorProfileElementImpl.h100
-rw-r--r--ksvg/impl/SVGColorProfileRuleImpl.cc63
-rw-r--r--ksvg/impl/SVGColorProfileRuleImpl.h58
-rw-r--r--ksvg/impl/SVGComponentTransferFunctionElementImpl.cc105
-rw-r--r--ksvg/impl/SVGComponentTransferFunctionElementImpl.h66
-rw-r--r--ksvg/impl/SVGContainerImpl.cc135
-rw-r--r--ksvg/impl/SVGContainerImpl.h58
-rw-r--r--ksvg/impl/SVGCursorElementImpl.cc104
-rw-r--r--ksvg/impl/SVGCursorElementImpl.h69
-rw-r--r--ksvg/impl/SVGDefinitionSrcElementImpl.cc33
-rw-r--r--ksvg/impl/SVGDefinitionSrcElementImpl.h46
-rw-r--r--ksvg/impl/SVGDefsElementImpl.cc34
-rw-r--r--ksvg/impl/SVGDefsElementImpl.h61
-rw-r--r--ksvg/impl/SVGDescElementImpl.cc39
-rw-r--r--ksvg/impl/SVGDescElementImpl.h55
-rw-r--r--ksvg/impl/SVGDocumentImpl.cc705
-rw-r--r--ksvg/impl/SVGDocumentImpl.h245
-rw-r--r--ksvg/impl/SVGEcma.cc844
-rw-r--r--ksvg/impl/SVGEcma.h250
-rw-r--r--ksvg/impl/SVGElementImpl.cc713
-rw-r--r--ksvg/impl/SVGElementImpl.h229
-rw-r--r--ksvg/impl/SVGElementInstanceImpl.cc108
-rw-r--r--ksvg/impl/SVGElementInstanceImpl.h70
-rw-r--r--ksvg/impl/SVGElementInstanceListImpl.cc44
-rw-r--r--ksvg/impl/SVGElementInstanceListImpl.h49
-rw-r--r--ksvg/impl/SVGEllipseElementImpl.cc200
-rw-r--r--ksvg/impl/SVGEllipseElementImpl.h86
-rw-r--r--ksvg/impl/SVGEventImpl.cc992
-rw-r--r--ksvg/impl/SVGEventImpl.h468
-rw-r--r--ksvg/impl/SVGExternalResourcesRequiredImpl.cc88
-rw-r--r--ksvg/impl/SVGExternalResourcesRequiredImpl.h59
-rw-r--r--ksvg/impl/SVGFEBlendElementImpl.cc64
-rw-r--r--ksvg/impl/SVGFEBlendElementImpl.h59
-rw-r--r--ksvg/impl/SVGFEColorMatrixElementImpl.cc65
-rw-r--r--ksvg/impl/SVGFEColorMatrixElementImpl.h60
-rw-r--r--ksvg/impl/SVGFEComponentTransferElementImpl.cc43
-rw-r--r--ksvg/impl/SVGFEComponentTransferElementImpl.h54
-rw-r--r--ksvg/impl/SVGFECompositeElementImpl.cc105
-rw-r--r--ksvg/impl/SVGFECompositeElementImpl.h68
-rw-r--r--ksvg/impl/SVGFEConvolveMatrixElementImpl.cc149
-rw-r--r--ksvg/impl/SVGFEConvolveMatrixElementImpl.h80
-rw-r--r--ksvg/impl/SVGFEDiffuseLightingElementImpl.cc64
-rw-r--r--ksvg/impl/SVGFEDiffuseLightingElementImpl.h59
-rw-r--r--ksvg/impl/SVGFEDisplacementMapElementImpl.cc85
-rw-r--r--ksvg/impl/SVGFEDisplacementMapElementImpl.h64
-rw-r--r--ksvg/impl/SVGFEDistantLightElementImpl.cc53
-rw-r--r--ksvg/impl/SVGFEDistantLightElementImpl.h54
-rw-r--r--ksvg/impl/SVGFEFloodElementImpl.cc43
-rw-r--r--ksvg/impl/SVGFEFloodElementImpl.h56
-rw-r--r--ksvg/impl/SVGFEFuncAElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEFuncAElementImpl.h46
-rw-r--r--ksvg/impl/SVGFEFuncBElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEFuncBElementImpl.h45
-rw-r--r--ksvg/impl/SVGFEFuncGElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEFuncGElementImpl.h46
-rw-r--r--ksvg/impl/SVGFEFuncRElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEFuncRElementImpl.h46
-rw-r--r--ksvg/impl/SVGFEGaussianBlurElementImpl.cc68
-rw-r--r--ksvg/impl/SVGFEGaussianBlurElementImpl.h60
-rw-r--r--ksvg/impl/SVGFEImageElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEImageElementImpl.h56
-rw-r--r--ksvg/impl/SVGFEMergeElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFEMergeElementImpl.h48
-rw-r--r--ksvg/impl/SVGFEMergeNodeElementImpl.cc43
-rw-r--r--ksvg/impl/SVGFEMergeNodeElementImpl.h52
-rw-r--r--ksvg/impl/SVGFEMorphologyElementImpl.cc75
-rw-r--r--ksvg/impl/SVGFEMorphologyElementImpl.h62
-rw-r--r--ksvg/impl/SVGFEOffsetElementImpl.cc64
-rw-r--r--ksvg/impl/SVGFEOffsetElementImpl.h59
-rw-r--r--ksvg/impl/SVGFEPointLightElementImpl.cc63
-rw-r--r--ksvg/impl/SVGFEPointLightElementImpl.h56
-rw-r--r--ksvg/impl/SVGFESpecularLightingElementImpl.cc74
-rw-r--r--ksvg/impl/SVGFESpecularLightingElementImpl.h61
-rw-r--r--ksvg/impl/SVGFESpotLightElementImpl.cc113
-rw-r--r--ksvg/impl/SVGFESpotLightElementImpl.h65
-rw-r--r--ksvg/impl/SVGFETileElementImpl.cc43
-rw-r--r--ksvg/impl/SVGFETileElementImpl.h54
-rw-r--r--ksvg/impl/SVGFETurbulenceElementImpl.cc100
-rw-r--r--ksvg/impl/SVGFETurbulenceElementImpl.h65
-rw-r--r--ksvg/impl/SVGFilterElementImpl.cc119
-rw-r--r--ksvg/impl/SVGFilterElementImpl.h76
-rw-r--r--ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.cc84
-rw-r--r--ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.h55
-rw-r--r--ksvg/impl/SVGFitToViewBoxImpl.cc141
-rw-r--r--ksvg/impl/SVGFitToViewBoxImpl.h69
-rw-r--r--ksvg/impl/SVGFontElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontElementImpl.h49
-rw-r--r--ksvg/impl/SVGFontFaceElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontFaceElementImpl.h46
-rw-r--r--ksvg/impl/SVGFontFaceFormatElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontFaceFormatElementImpl.h46
-rw-r--r--ksvg/impl/SVGFontFaceNameElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontFaceNameElementImpl.h46
-rw-r--r--ksvg/impl/SVGFontFaceSrcElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontFaceSrcElementImpl.h45
-rw-r--r--ksvg/impl/SVGFontFaceUriElementImpl.cc33
-rw-r--r--ksvg/impl/SVGFontFaceUriElementImpl.h46
-rw-r--r--ksvg/impl/SVGForeignObjectElementImpl.cc121
-rw-r--r--ksvg/impl/SVGForeignObjectElementImpl.h78
-rw-r--r--ksvg/impl/SVGGElementImpl.cc36
-rw-r--r--ksvg/impl/SVGGElementImpl.h59
-rw-r--r--ksvg/impl/SVGGlyphElementImpl.cc98
-rw-r--r--ksvg/impl/SVGGlyphElementImpl.h66
-rw-r--r--ksvg/impl/SVGGlyphRefElementImpl.cc134
-rw-r--r--ksvg/impl/SVGGlyphRefElementImpl.h79
-rw-r--r--ksvg/impl/SVGGradientElementImpl.cc264
-rw-r--r--ksvg/impl/SVGGradientElementImpl.h110
-rw-r--r--ksvg/impl/SVGHKernElementImpl.cc33
-rw-r--r--ksvg/impl/SVGHKernElementImpl.h46
-rw-r--r--ksvg/impl/SVGHelperImpl.cc230
-rw-r--r--ksvg/impl/SVGHelperImpl.h88
-rw-r--r--ksvg/impl/SVGICCColorImpl.cc107
-rw-r--r--ksvg/impl/SVGICCColorImpl.h67
-rw-r--r--ksvg/impl/SVGImageElementImpl.cc522
-rw-r--r--ksvg/impl/SVGImageElementImpl.h140
-rw-r--r--ksvg/impl/SVGLangSpaceImpl.cc130
-rw-r--r--ksvg/impl/SVGLangSpaceImpl.h67
-rw-r--r--ksvg/impl/SVGLengthImpl.cc510
-rw-r--r--ksvg/impl/SVGLengthImpl.h136
-rw-r--r--ksvg/impl/SVGLengthListImpl.cc64
-rw-r--r--ksvg/impl/SVGLengthListImpl.h48
-rw-r--r--ksvg/impl/SVGLineElementImpl.cc213
-rw-r--r--ksvg/impl/SVGLineElementImpl.h86
-rw-r--r--ksvg/impl/SVGLinearGradientElementImpl.cc201
-rw-r--r--ksvg/impl/SVGLinearGradientElementImpl.h74
-rw-r--r--ksvg/impl/SVGList.h174
-rw-r--r--ksvg/impl/SVGLocatableImpl.cc208
-rw-r--r--ksvg/impl/SVGLocatableImpl.h94
-rw-r--r--ksvg/impl/SVGMPathElementImpl.cc33
-rw-r--r--ksvg/impl/SVGMPathElementImpl.h50
-rw-r--r--ksvg/impl/SVGMarkerElementImpl.cc424
-rw-r--r--ksvg/impl/SVGMarkerElementImpl.h121
-rw-r--r--ksvg/impl/SVGMaskElementImpl.cc542
-rw-r--r--ksvg/impl/SVGMaskElementImpl.h158
-rw-r--r--ksvg/impl/SVGMatrixImpl.cc460
-rw-r--r--ksvg/impl/SVGMatrixImpl.h130
-rw-r--r--ksvg/impl/SVGMetadataElementImpl.cc33
-rw-r--r--ksvg/impl/SVGMetadataElementImpl.h46
-rw-r--r--ksvg/impl/SVGMissingGlyphElementImpl.cc33
-rw-r--r--ksvg/impl/SVGMissingGlyphElementImpl.h47
-rw-r--r--ksvg/impl/SVGNumberImpl.cc83
-rw-r--r--ksvg/impl/SVGNumberImpl.h61
-rw-r--r--ksvg/impl/SVGNumberListImpl.cc64
-rw-r--r--ksvg/impl/SVGNumberListImpl.h48
-rw-r--r--ksvg/impl/SVGPaintImpl.cc175
-rw-r--r--ksvg/impl/SVGPaintImpl.h85
-rw-r--r--ksvg/impl/SVGPaintServerImpl.cc55
-rw-r--r--ksvg/impl/SVGPaintServerImpl.h52
-rw-r--r--ksvg/impl/SVGPathElementImpl.cc868
-rw-r--r--ksvg/impl/SVGPathElementImpl.h194
-rw-r--r--ksvg/impl/SVGPathSegArcImpl.cc495
-rw-r--r--ksvg/impl/SVGPathSegArcImpl.h150
-rw-r--r--ksvg/impl/SVGPathSegClosePathImpl.cc46
-rw-r--r--ksvg/impl/SVGPathSegClosePathImpl.h61
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicImpl.cc325
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicImpl.h139
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.cc298
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h139
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticImpl.cc260
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h123
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc235
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h123
-rw-r--r--ksvg/impl/SVGPathSegImpl.cc107
-rw-r--r--ksvg/impl/SVGPathSegImpl.h75
-rw-r--r--ksvg/impl/SVGPathSegLinetoHorizontalImpl.cc167
-rw-r--r--ksvg/impl/SVGPathSegLinetoHorizontalImpl.h99
-rw-r--r--ksvg/impl/SVGPathSegLinetoImpl.cc196
-rw-r--r--ksvg/impl/SVGPathSegLinetoImpl.h107
-rw-r--r--ksvg/impl/SVGPathSegLinetoVerticalImpl.cc165
-rw-r--r--ksvg/impl/SVGPathSegLinetoVerticalImpl.h99
-rw-r--r--ksvg/impl/SVGPathSegListImpl.cc64
-rw-r--r--ksvg/impl/SVGPathSegListImpl.h48
-rw-r--r--ksvg/impl/SVGPathSegMovetoImpl.cc196
-rw-r--r--ksvg/impl/SVGPathSegMovetoImpl.h107
-rw-r--r--ksvg/impl/SVGPatternElementImpl.cc509
-rw-r--r--ksvg/impl/SVGPatternElementImpl.h136
-rw-r--r--ksvg/impl/SVGPointImpl.cc108
-rw-r--r--ksvg/impl/SVGPointImpl.h66
-rw-r--r--ksvg/impl/SVGPointListImpl.cc64
-rw-r--r--ksvg/impl/SVGPointListImpl.h48
-rw-r--r--ksvg/impl/SVGPolyElementImpl.cc141
-rw-r--r--ksvg/impl/SVGPolyElementImpl.h70
-rw-r--r--ksvg/impl/SVGPolygonElementImpl.cc88
-rw-r--r--ksvg/impl/SVGPolygonElementImpl.h54
-rw-r--r--ksvg/impl/SVGPolylineElementImpl.cc100
-rw-r--r--ksvg/impl/SVGPolylineElementImpl.h54
-rw-r--r--ksvg/impl/SVGPreserveAspectRatioImpl.cc217
-rw-r--r--ksvg/impl/SVGPreserveAspectRatioImpl.h84
-rw-r--r--ksvg/impl/SVGRadialGradientElementImpl.cc216
-rw-r--r--ksvg/impl/SVGRadialGradientElementImpl.h76
-rw-r--r--ksvg/impl/SVGRectElementImpl.cc244
-rw-r--r--ksvg/impl/SVGRectElementImpl.h90
-rw-r--r--ksvg/impl/SVGRectImpl.cc157
-rw-r--r--ksvg/impl/SVGRectImpl.h80
-rw-r--r--ksvg/impl/SVGSVGElementImpl.cc982
-rw-r--r--ksvg/impl/SVGSVGElementImpl.h198
-rw-r--r--ksvg/impl/SVGScriptElementImpl.cc185
-rw-r--r--ksvg/impl/SVGScriptElementImpl.h90
-rw-r--r--ksvg/impl/SVGSetElementImpl.cc48
-rw-r--r--ksvg/impl/SVGSetElementImpl.h54
-rw-r--r--ksvg/impl/SVGShapeImpl.cc162
-rw-r--r--ksvg/impl/SVGShapeImpl.h73
-rw-r--r--ksvg/impl/SVGStopElementImpl.cc125
-rw-r--r--ksvg/impl/SVGStopElementImpl.h70
-rw-r--r--ksvg/impl/SVGStringListImpl.cc93
-rw-r--r--ksvg/impl/SVGStringListImpl.h82
-rw-r--r--ksvg/impl/SVGStylableImpl.cc1309
-rw-r--r--ksvg/impl/SVGStylableImpl.h327
-rw-r--r--ksvg/impl/SVGStyleElementImpl.cc135
-rw-r--r--ksvg/impl/SVGStyleElementImpl.h72
-rw-r--r--ksvg/impl/SVGSwitchElementImpl.cc58
-rw-r--r--ksvg/impl/SVGSwitchElementImpl.h62
-rw-r--r--ksvg/impl/SVGSymbolElementImpl.cc106
-rw-r--r--ksvg/impl/SVGSymbolElementImpl.h76
-rw-r--r--ksvg/impl/SVGTRefElementImpl.cc76
-rw-r--r--ksvg/impl/SVGTRefElementImpl.h52
-rw-r--r--ksvg/impl/SVGTSpanElementImpl.cc64
-rw-r--r--ksvg/impl/SVGTSpanElementImpl.h55
-rw-r--r--ksvg/impl/SVGTestsImpl.cc178
-rw-r--r--ksvg/impl/SVGTestsImpl.h77
-rw-r--r--ksvg/impl/SVGTextContentElementImpl.cc285
-rw-r--r--ksvg/impl/SVGTextContentElementImpl.h115
-rw-r--r--ksvg/impl/SVGTextElementImpl.cc124
-rw-r--r--ksvg/impl/SVGTextElementImpl.h65
-rw-r--r--ksvg/impl/SVGTextPathElementImpl.cc240
-rw-r--r--ksvg/impl/SVGTextPathElementImpl.h84
-rw-r--r--ksvg/impl/SVGTextPositioningElementImpl.cc198
-rw-r--r--ksvg/impl/SVGTextPositioningElementImpl.h83
-rw-r--r--ksvg/impl/SVGTimeScheduler.cc234
-rw-r--r--ksvg/impl/SVGTimeScheduler.h104
-rw-r--r--ksvg/impl/SVGTitleElementImpl.cc39
-rw-r--r--ksvg/impl/SVGTitleElementImpl.h55
-rw-r--r--ksvg/impl/SVGTransformImpl.cc240
-rw-r--r--ksvg/impl/SVGTransformImpl.h99
-rw-r--r--ksvg/impl/SVGTransformListImpl.cc103
-rw-r--r--ksvg/impl/SVGTransformListImpl.h53
-rw-r--r--ksvg/impl/SVGTransformableImpl.cc169
-rw-r--r--ksvg/impl/SVGTransformableImpl.h77
-rw-r--r--ksvg/impl/SVGURIReferenceImpl.cc135
-rw-r--r--ksvg/impl/SVGURIReferenceImpl.h64
-rw-r--r--ksvg/impl/SVGUnitConverter.h100
-rw-r--r--ksvg/impl/SVGUseElementImpl.cc409
-rw-r--r--ksvg/impl/SVGUseElementImpl.h101
-rw-r--r--ksvg/impl/SVGVKernElementImpl.cc33
-rw-r--r--ksvg/impl/SVGVKernElementImpl.h46
-rw-r--r--ksvg/impl/SVGViewElementImpl.cc94
-rw-r--r--ksvg/impl/SVGViewElementImpl.h70
-rw-r--r--ksvg/impl/SVGViewSpecImpl.cc98
-rw-r--r--ksvg/impl/SVGViewSpecImpl.h69
-rw-r--r--ksvg/impl/SVGWindowImpl.cc187
-rw-r--r--ksvg/impl/SVGWindowImpl.h73
-rw-r--r--ksvg/impl/SVGZoomAndPanImpl.cc112
-rw-r--r--ksvg/impl/SVGZoomAndPanImpl.h76
-rw-r--r--ksvg/impl/SVGZoomEventImpl.cc111
-rw-r--r--ksvg/impl/SVGZoomEventImpl.h77
-rw-r--r--ksvg/impl/TODO5
-rw-r--r--ksvg/impl/generateddata.cpp8899
-rw-r--r--ksvg/impl/libs/Makefile.am1
-rw-r--r--ksvg/impl/libs/art_support/Makefile.am4
-rw-r--r--ksvg/impl/libs/art_support/art_misc.c1841
-rw-r--r--ksvg/impl/libs/art_support/art_misc.h79
-rw-r--r--ksvg/impl/libs/art_support/art_render_misc.c774
-rw-r--r--ksvg/impl/libs/art_support/art_render_misc.h90
-rw-r--r--ksvg/impl/libs/art_support/art_rgba_svp.c659
-rw-r--r--ksvg/impl/libs/art_support/art_rgba_svp.h57
-rw-r--r--ksvg/impl/libs/libtext2path/AUTHORS1
-rw-r--r--ksvg/impl/libs/libtext2path/COPYING339
-rw-r--r--ksvg/impl/libs/libtext2path/ChangeLog2
-rw-r--r--ksvg/impl/libs/libtext2path/INSTALL181
-rw-r--r--ksvg/impl/libs/libtext2path/Makefile.am7
-rw-r--r--ksvg/impl/libs/libtext2path/NEWS1
-rw-r--r--ksvg/impl/libs/libtext2path/README4
-rw-r--r--ksvg/impl/libs/libtext2path/VERSION1
-rw-r--r--ksvg/impl/libs/libtext2path/configure.in.in41
-rw-r--r--ksvg/impl/libs/libtext2path/libtext2path.lsm16
-rw-r--r--ksvg/impl/libs/libtext2path/libtext2path.pc.in11
-rw-r--r--ksvg/impl/libs/libtext2path/libtext2path.spec41
-rw-r--r--ksvg/impl/libs/libtext2path/src/Affine.cpp174
-rw-r--r--ksvg/impl/libs/libtext2path/src/Affine.h67
-rw-r--r--ksvg/impl/libs/libtext2path/src/BezierPath.h56
-rw-r--r--ksvg/impl/libs/libtext2path/src/Cache.h156
-rw-r--r--ksvg/impl/libs/libtext2path/src/Converter.cpp505
-rw-r--r--ksvg/impl/libs/libtext2path/src/Converter.h94
-rw-r--r--ksvg/impl/libs/libtext2path/src/Font.cpp252
-rw-r--r--ksvg/impl/libs/libtext2path/src/Font.h91
-rw-r--r--ksvg/impl/libs/libtext2path/src/Glyph.cpp353
-rw-r--r--ksvg/impl/libs/libtext2path/src/Glyph.h198
-rw-r--r--ksvg/impl/libs/libtext2path/src/GlyphTracer.cpp76
-rw-r--r--ksvg/impl/libs/libtext2path/src/GlyphTracer.h65
-rw-r--r--ksvg/impl/libs/libtext2path/src/Makefile.am10
-rw-r--r--ksvg/impl/libs/libtext2path/src/Point.h65
-rw-r--r--ksvg/impl/libs/libtext2path/src/QtUnicode.cpp164
-rw-r--r--ksvg/impl/libs/libtext2path/src/QtUnicode.h149
-rw-r--r--ksvg/impl/libs/libtext2path/src/Rectangle.cpp102
-rw-r--r--ksvg/impl/libs/libtext2path/src/Rectangle.h55
-rw-r--r--ksvg/impl/libs/libtext2path/src/Tools.h85
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/assert.hpp24
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/checked_delete.hpp61
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/lightweight_mutex.hpp74
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/shared_count.hpp367
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp395
-rw-r--r--ksvg/impl/libs/libtext2path/src/myboost/throw_exception.hpp30
-rw-r--r--ksvg/impl/libs/xrgbrender/Makefile.am5
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c1137
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-private.h30
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.c46
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h78
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c3425
-rw-r--r--ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.h145
-rw-r--r--ksvg/impl/svgpathparser.cc564
-rw-r--r--ksvg/impl/svgpathparser.h63
-rw-r--r--ksvg/plugin/Makefile.am29
-rw-r--r--ksvg/plugin/backends/Makefile.am1
-rw-r--r--ksvg/plugin/backends/agg/AggCanvas.cpp130
-rw-r--r--ksvg/plugin/backends/agg/AggCanvas.h77
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasFactory.cpp45
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasFactory.h45
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.cpp1747
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.h500
-rw-r--r--ksvg/plugin/backends/agg/BezierPathAgg.cpp126
-rw-r--r--ksvg/plugin/backends/agg/BezierPathAgg.h83
-rw-r--r--ksvg/plugin/backends/agg/GlyphTracerAgg.cpp113
-rw-r--r--ksvg/plugin/backends/agg/GlyphTracerAgg.h49
-rw-r--r--ksvg/plugin/backends/agg/Makefile.am15
-rw-r--r--ksvg/plugin/backends/agg/ksvgaggcanvas.desktop101
-rw-r--r--ksvg/plugin/backends/libart/BezierPathLibart.cpp160
-rw-r--r--ksvg/plugin/backends/libart/BezierPathLibart.h52
-rw-r--r--ksvg/plugin/backends/libart/GlyphTracerLibart.cpp177
-rw-r--r--ksvg/plugin/backends/libart/GlyphTracerLibart.h50
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.cpp425
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.h84
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasFactory.cpp45
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasFactory.h45
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.cpp2209
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.h414
-rw-r--r--ksvg/plugin/backends/libart/Makefile.am11
-rw-r--r--ksvg/plugin/backends/libart/ksvglibartcanvas.desktop101
-rw-r--r--ksvg/plugin/ksvg_factory.cpp100
-rw-r--r--ksvg/plugin/ksvg_factory.h58
-rw-r--r--ksvg/plugin/ksvg_plugin.cpp417
-rw-r--r--ksvg/plugin/ksvg_plugin.h87
-rw-r--r--ksvg/plugin/ksvg_widget.cpp267
-rw-r--r--ksvg/plugin/ksvg_widget.h68
-rw-r--r--ksvg/plugin/ksvgplugin.desktop85
-rw-r--r--ksvg/plugin/ksvgplugin.rc35
-rw-r--r--ksvg/plugin/svgcreator.cpp92
-rw-r--r--ksvg/plugin/svgcreator.h45
-rw-r--r--ksvg/plugin/svgthumbnail.desktop52
-rw-r--r--ksvg/scripts/COPYRIGHTS19
-rwxr-xr-xksvg/scripts/ECMACHECK25
-rwxr-xr-xksvg/scripts/OPENREF9
-rw-r--r--ksvg/scripts/README16
-rw-r--r--ksvg/scripts/add_static.pl42
-rwxr-xr-xksvg/scripts/check_hashtablesize.pl224
-rwxr-xr-xksvg/scripts/gen.sh51
-rwxr-xr-xksvg/scripts/generate.pl69
-rwxr-xr-xksvg/scripts/genimpl.sh49
-rwxr-xr-xksvg/scripts/getjs.php390
-rw-r--r--ksvg/scripts/idl/svg.idl1756
-rw-r--r--ksvg/scripts/makecc211
-rw-r--r--ksvg/scripts/makeheader164
-rw-r--r--ksvg/scripts/makeimpl440
-rw-r--r--ksvg/test/Makefile.am1
-rw-r--r--ksvg/test/Units.svg43
-rw-r--r--ksvg/test/W3C_TESTSUITE_1.1227
-rw-r--r--ksvg/test/ZVON-TEST-PASSED168
-rw-r--r--ksvg/test/amflag.svg54
-rw-r--r--ksvg/test/animskew.svg44
-rw-r--r--ksvg/test/arabic.svg10
-rw-r--r--ksvg/test/butterfly.svg11
-rw-r--r--ksvg/test/chem1.svg189
-rw-r--r--ksvg/test/colortest.svg18
-rw-r--r--ksvg/test/dashes.svg32
-rw-r--r--ksvg/test/ecma/bbox/bbox-circle.svg13
-rw-r--r--ksvg/test/ecma/bbox/bbox-ellipse.svg14
-rw-r--r--ksvg/test/ecma/bbox/bbox-line.svg35
-rw-r--r--ksvg/test/ecma/bbox/bbox-path.svg15
-rw-r--r--ksvg/test/ecma/bbox/bbox-path2.svg14
-rw-r--r--ksvg/test/ecma/bbox/bbox-polygon.svg13
-rw-r--r--ksvg/test/ecma/bbox/bbox-polyline.svg13
-rw-r--r--ksvg/test/ecma/bbox/bbox-rect.svg15
-rw-r--r--ksvg/test/ecma/bbox/bbox.js103
-rw-r--r--ksvg/test/ecma/broken.svg30
-rw-r--r--ksvg/test/ecma/circle.svg38
-rw-r--r--ksvg/test/ecma/clock.svg66
-rw-r--r--ksvg/test/ecma/dom01.svg40
-rw-r--r--ksvg/test/external/Makefile.am13
-rw-r--r--ksvg/test/external/SVGTestWidget.cc206
-rw-r--r--ksvg/test/external/SVGTestWidget.h37
-rw-r--r--ksvg/test/external/printnodetest.cpp63
-rw-r--r--ksvg/test/external/printnodetest.h32
-rw-r--r--ksvg/test/external/svgdisplay.cc32
-rw-r--r--ksvg/test/fonttest.svg126
-rw-r--r--ksvg/test/keytest.svg25
-rw-r--r--ksvg/test/lion.svg160
-rw-r--r--ksvg/test/opacity.svg41
-rw-r--r--ksvg/test/physics-motor.svg43
-rw-r--r--ksvg/test/poly.svg12
-rw-r--r--ksvg/test/shapes-rect-trans.svg92
-rw-r--r--ksvg/test/tiger.svg722
-rw-r--r--ksvg/test/tiger2.svg725
-rw-r--r--ksvg/test/tigert.svg388
-rw-r--r--ksvg/test/tux.svg298
-rw-r--r--ksvg/test/tux2.svg287
-rw-r--r--ksvg/test/xlink.svg13
890 files changed, 113364 insertions, 0 deletions
diff --git a/ksvg/AUTHORS b/ksvg/AUTHORS
new file mode 100644
index 00000000..ead56e6b
--- /dev/null
+++ b/ksvg/AUTHORS
@@ -0,0 +1,2 @@
+Nikolas Zimmermann <wildfox@kde.org>
+Rob Buis <buis@kde.org>
diff --git a/ksvg/FAQ b/ksvg/FAQ
new file mode 100644
index 00000000..68897507
--- /dev/null
+++ b/ksvg/FAQ
@@ -0,0 +1,17 @@
+KSVG FAQ
+-------------------------
+
+Q: Why do my fonts look wrong when trying the offical
+ W3C Testcases? (they don't fit in the boxes)
+
+A: Those testcases all use a font called 'Helvetica',
+ your system may use Verdana instead, which is also
+ wrong. I suggest you replace the following line
+ in your XftConfig file:
+
+ match any family == "Helvetica" edit family += "Verdana";
+
+ with
+
+ match any family == "Helvetica" edit family += "Arial";
+
diff --git a/ksvg/Makefile.am b/ksvg/Makefile.am
new file mode 100644
index 00000000..722e90d7
--- /dev/null
+++ b/ksvg/Makefile.am
@@ -0,0 +1,115 @@
+SUBDIRS = dom impl core ecma . plugin test
+
+lib_LTLIBRARIES = libksvg.la
+libksvg_la_SOURCES = dummy.cc
+libksvg_la_METASOURCES = AUTO
+libksvg_la_LDFLAGS = -version-info 0:1:0 -no-undefined $(all_libraries)
+libksvg_la_LIBADD = dom/libksvgdom.la impl/libksvgdomimpl.la core/libksvgcore.la ecma/libksvgecma.la \
+ $(LCMS_LIBS) impl/libs/xrgbrender/libksvgxrgbrender.la impl/libs/libtext2path/src/libtext2path.la \
+ impl/libs/art_support/libksvgart.la -lkjs $(LIB_KHTML) $(LIBART_LIBS) $(FREETYPE_LIBS) $(FONTCONFIG_LIBS)
+
+INCLUDES = -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl $(all_includes)
+
+dummy.cc:
+ echo "" > dummy.cc
+
+# Make it easy for developers :)
+hashtables:
+ cd $(srcdir); \
+ rm -f data/*lut* ; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGElementImpl.cc > data/SVGElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGSVGElementImpl.cc > data/SVGSVGElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGRectElementImpl.cc > data/SVGRectElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLineElementImpl.cc > data/SVGLineElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGCircleElementImpl.cc > data/SVGCircleElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGImageElementImpl.cc > data/SVGImageElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGEllipseElementImpl.cc > data/SVGEllipseElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedPointsImpl.cc > data/SVGAnimatedPointsImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPointImpl.cc > data/SVGPointImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGRectImpl.cc > data/SVGRectImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGNumberImpl.cc > data/SVGNumberImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedAngleImpl.cc > data/SVGAnimatedAngleImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedRectImpl.cc > data/SVGAnimatedRectImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedNumberImpl.cc > data/SVGAnimatedNumberImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedNumberListImpl.cc > data/SVGAnimatedNumberListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedIntegerImpl.cc > data/SVGAnimatedIntegerImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedBooleanImpl.cc > data/SVGAnimatedBooleanImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedEnumerationImpl.cc > data/SVGAnimatedEnumerationImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedStringImpl.cc > data/SVGAnimatedStringImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedLengthImpl.cc > data/SVGAnimatedLengthImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedLengthListImpl.cc > data/SVGAnimatedLengthListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedPreserveAspectRatioImpl.cc > data/SVGAnimatedPreserveAspectRatioImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPreserveAspectRatioImpl.cc > data/SVGPreserveAspectRatioImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLengthImpl.cc > data/SVGLengthImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGMatrixImpl.cc > data/SVGMatrixImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAngleImpl.cc > data/SVGAngleImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLocatableImpl.cc > data/SVGLocatableImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTestsImpl.cc > data/SVGTestsImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLangSpaceImpl.cc > data/SVGLangSpaceImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGExternalResourcesRequiredImpl.cc > data/SVGExternalResourcesRequiredImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGURIReferenceImpl.cc > data/SVGURIReferenceImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPaintImpl.cc > data/SVGPaintImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGColorImpl.cc > data/SVGColorImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGICCColorImpl.cc > data/SVGICCColorImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTextPositioningElementImpl.cc > data/SVGTextPositioningElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTextContentElementImpl.cc > data/SVGTextContentElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTransformImpl.cc > data/SVGTransformImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTransformableImpl.cc > data/SVGTransformableImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPointListImpl.cc > data/SVGPointListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGNumberListImpl.cc > data/SVGNumberListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLengthListImpl.cc > data/SVGLengthListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGStringListImpl.cc > data/SVGStringListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedPathDataImpl.cc > data/SVGAnimatedPathDataImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegImpl.cc > data/SVGPathSegImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegArcImpl.cc > data/SVGPathSegArcImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegMovetoImpl.cc > data/SVGPathSegMovetoImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegLinetoImpl.cc > data/SVGPathSegLinetoImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegLinetoHorizontalImpl.cc > data/SVGPathSegLinetoHorizontalImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegLinetoVerticalImpl.cc > data/SVGPathSegLinetoVerticalImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegCurvetoCubicImpl.cc > data/SVGPathSegCurvetoCubicImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegCurvetoCubicSmoothImpl.cc > data/SVGPathSegCurvetoCubicSmoothImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegCurvetoQuadraticImpl.cc > data/SVGPathSegCurvetoQuadraticImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc > data/SVGPathSegCurvetoQuadraticSmoothImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathElementImpl.cc > data/SVGPathElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPathSegListImpl.cc > data/SVGPathSegListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTransformListImpl.cc > data/SVGTransformListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimatedTransformListImpl.cc > data/SVGAnimatedTransformListImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAElementImpl.cc > data/SVGAElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGUseElementImpl.cc > data/SVGUseElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGDocumentImpl.cc > data/SVGDocumentImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGForeignObjectElementImpl.cc > data/SVGForeignObjectElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGScriptElementImpl.cc > data/SVGScriptElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGStyleElementImpl.cc > data/SVGStyleElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGZoomAndPanImpl.cc > data/SVGZoomAndPanImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGFitToViewBoxImpl.cc > data/SVGFitToViewBoxImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGStylableImpl.cc > data/SVGStylableImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGEventImpl.cc > data/SVGEventImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGEcma.cc > data/SVGEcma.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGMarkerElementImpl.cc > data/SVGMarkerElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGViewElementImpl.cc > data/SVGViewElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTextContentElementImpl.cc > data/SVGTextContentElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGClipPathElementImpl.cc > data/SVGClipPathElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGColorProfileElementImpl.cc > data/SVGColorProfileElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGPatternElementImpl.cc > data/SVGPatternElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGGradientElementImpl.cc > data/SVGGradientElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGLinearGradientElementImpl.cc > data/SVGLinearGradientElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGRadialGradientElementImpl.cc > data/SVGRadialGradientElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGStopElementImpl.cc > data/SVGStopElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGAnimationElementImpl.cc > data/SVGAnimationElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGCursorElementImpl.cc > data/SVGCursorElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGSymbolElementImpl.cc > data/SVGSymbolElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGMaskElementImpl.cc > data/SVGMaskElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGGlyphElementImpl.cc > data/SVGGlyphElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGMissingGlyphElementImpl.cc > data/SVGMissingGlyphElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGGlyphRefElementImpl.cc > data/SVGGlyphRefElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGTextPathElementImpl.cc > data/SVGTextPathElementImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table impl/SVGZoomEventImpl.cc > data/SVGZoomEventImpl.lut.h; \
+ ../../kdelibs/kjs/create_hash_table ecma/ksvg_window.cpp > data/ksvg_window.lut.h;
+
+generatedata:
+ cd $(srcdir); \
+ rm impl/generateddata.cpp -f; \
+ cd impl && ../scripts/generate.pl
+
+redo:
+ make hashtables && make generatedata
diff --git a/ksvg/NEWS b/ksvg/NEWS
new file mode 100644
index 00000000..19fead3e
--- /dev/null
+++ b/ksvg/NEWS
@@ -0,0 +1,8 @@
+Mon Sep 8 ??:??:?? CEST 2003
+ o Moved to kdegraphics
+
+Sun Jul 15 13:26:39 CEST 2001
+ o First code
+
+Thu Jun 14 17:44:21 CEST 2001
+ o KSVG Idea
diff --git a/ksvg/README b/ksvg/README
new file mode 100644
index 00000000..a2ad11bc
--- /dev/null
+++ b/ksvg/README
@@ -0,0 +1,9 @@
+KSVG 0.1
+-----------------------------------
+
+KSVG is a KDE implementation of the
+Scalable Vector Graphics Specifications.
+
+Have a lot of fun!
+
+The KSVG Team
diff --git a/ksvg/RELEASE-TODO b/ksvg/RELEASE-TODO
new file mode 100644
index 00000000..d520aaef
--- /dev/null
+++ b/ksvg/RELEASE-TODO
@@ -0,0 +1,10 @@
+KSVG 0.1 - Release TODO List
+--------------------------------------
+
+Task
+We should be done for 0.1 with the feature
+set as promised, years ago :)
+
+Make it nice:
+- idea: offer a tool to select a rectangle to zoom into (like asv has)
+- idea: offer a preview widget like in karbon/kghostview to easily navigate/pan around a drawing
diff --git a/ksvg/TODO b/ksvg/TODO
new file mode 100644
index 00000000..7d407484
--- /dev/null
+++ b/ksvg/TODO
@@ -0,0 +1,10 @@
+Not ordered!
+
+" - unfinished tasks"
+" x finished tasks"
+
+x textPath [Progressing: Niko, Rob]
+- viewBox
+- perhaps seperate parsing and rendering better
+- check events handling (prepareMouseEvent)
+- kill render()
diff --git a/ksvg/VERSION b/ksvg/VERSION
new file mode 100644
index 00000000..fe57fc6a
--- /dev/null
+++ b/ksvg/VERSION
@@ -0,0 +1 @@
+KSVG 0.1
diff --git a/ksvg/configure.in.bot b/ksvg/configure.in.bot
new file mode 100644
index 00000000..cd823b77
--- /dev/null
+++ b/ksvg/configure.in.bot
@@ -0,0 +1,25 @@
+if test -z "$LCMS_LIBS" -o -z "$LIBART_LIBS" -o \
+ -z "$FREETYPE_LIBS" -o -z "$FRIBIDI_LIBS" -o -z "$FONTCONFIG_LIBS"; then
+ echo ""
+ echo "Some of the libraries required for KSVG are missing or too old,"
+ echo "therefore KSVG will not be compiled."
+ echo ""
+ echo "If you want to compile KSVG you should install:"
+ if test -z "$LCMS_LIBS"; then
+ echo " * lcms 1.09 or newer (http://www.littlecms.com/)"
+ fi
+ if test -z "$LIBART_LIBS"; then
+ echo " * libart 2.3.8 or newer (http://www.levien.com/libart/)"
+ fi
+ if test -z "$FREETYPE_LIBS"; then
+ echo " * freetype 2.0.6 or newer (http://www.freetype.org)"
+ fi
+ if test -z "$FONTCONFIG_LIBS"; then
+ echo " * fontconfig 2.2.0 or newer (http://fontconfig.org)"
+ fi
+ if test -z "$FRIBIDI_LIBS"; then
+ echo " * fribidi 0.10.4 or newer (http://freedesktop.org/Software/FriBidi)"
+ fi
+ echo ""
+ all_tests=bad
+fi
diff --git a/ksvg/configure.in.in b/ksvg/configure.in.in
new file mode 100644
index 00000000..34d27f52
--- /dev/null
+++ b/ksvg/configure.in.in
@@ -0,0 +1,203 @@
+# Check for libart
+KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
+
+if test -n "$LIBART_CONFIG"; then
+ vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$vers" && test "$vers" -ge 2003008
+ then
+ LIBART_LIBS="`$LIBART_CONFIG --libs`"
+ LIBART_RPATH=
+ for args in $LIBART_LIBS; do
+ case $args in
+ -L*)
+ LIBART_RPATH="$LIBART_RPATH $args"
+ ;;
+ esac
+ done
+ LIBART_RPATH=`echo $LIBART_RPATH | sed -e "s/-L/-R/g"`
+ LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
+
+ AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
+ fi
+fi
+
+AC_SUBST(LIBART_LIBS)
+AC_SUBST(LIBART_CFLAGS)
+AC_SUBST(LIBART_RPATH)
+
+if test -z "$LIBART_LIBS"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
+fi
+
+# Check for fontconfig
+KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
+ KDE_FIND_PATH( pkg-config, PKG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin],)
+ if test -n "$PKG_CONFIG"; then
+ if ! $PKG_CONFIG --exists fontconfig; then
+ unset PKG_CONFIG
+ fi
+ fi
+])
+if test -n "$FONTCONFIG_CONFIG" -o -n "$PKG_CONFIG"; then
+ if test -n "$FONTCONFIG_CONFIG"; then
+ fontconfigvers="`$FONTCONFIG_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`"
+ fontconfiglibs="`$FONTCONFIG_CONFIG --libs`"
+ fontconfigcflags="`$FONTCONFIG_CONFIG --cflags`"
+ else
+ fontconfigvers=`$PKG_CONFIG --modversion fontconfig 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3; }'`
+ fontconfiglibs=`$PKG_CONFIG --libs fontconfig`
+ fontconfigcflags="`$PKG_CONFIG --cflags fontconfig`"
+ fi
+ if test -n "$vers" && test "$vers" -ge 2002000
+ then
+ FONTCONFIG_LIBS=$fontconfiglibs
+ FONTCONFIG_RPATH=
+ for args in $FONTCONFIG_LIBS; do
+ case $args in
+ -L*)
+ FONTCONFIG_RPATH="$FONTCONFIG_RPATH $args"
+ ;;
+ esac
+ done
+ FONTCONFIG_RPATH=`echo $FONTCONFIG_RPATH | sed -e "s/-L/-R/g"`
+ FONTCONFIG_CFLAGS=$fontconfigcflags
+
+ AC_DEFINE_UNQUOTED(HAVE_FONTCONFIG, 1, [Defines if your system has the fontconfig library])
+ fi
+fi
+
+AC_SUBST(FONTCONFIG_LIBS)
+AC_SUBST(FONTCONFIG_CFLAGS)
+AC_SUBST(FONTCONFIG_RPATH)
+
+if test -z "$FONTCONFIG_LIBS"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
+fi
+
+# Check for freetype2
+KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
+
+if test -n "$FREETYPE_CONFIG"; then
+ vers=`$FREETYPE_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$vers" && test "$vers" -ge 8000002
+ then
+ FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
+ FREETYPE_RPATH=
+ for args in $FREETYPE_LIBS; do
+ case $args in
+ -L*)
+ FREETYPE_RPATH="$FREETYPE_RPATH $args"
+ ;;
+ esac
+ done
+ FREETYPE_RPATH=`echo $FREETYPE_RPATH | sed -e "s/-L/-R/g"`
+ FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
+
+ AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the freetype library])
+
+ ftvers=`$FREETYPE_CONFIG --ftversion 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$ftvers" && test "$ftvers" -ge 2002000
+ then
+ AC_DEFINE_UNQUOTED(HAVE_FREETYPE_2_2_x, 1, [Defines if your system has the 2.2.x freetype library])
+ fi
+ fi
+fi
+
+AC_SUBST(FREETYPE_LIBS)
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_RPATH)
+
+if test -z "$FREETYPE_LIBS"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
+fi
+
+# Check for lcms
+have_lcms_header='no'
+KDE_CHECK_HEADER(lcms/lcms.h,have_lcms_header='yes',,)
+if test "$have_lcms_header" = 'yes'
+then
+ LCMS_LIBS='-llcms'
+ AC_DEFINE(LCMS_HEADER, <lcms/lcms.h>, [The correct header])
+else
+ # Alternative! Debian does it this way...
+ KDE_CHECK_HEADER(lcms.h,have_lcms_header='yes',,)
+ if test "$have_lcms_header" = 'yes'
+ then
+ LCMS_LIBS='-llcms'
+ AC_DEFINE(LCMS_HEADER, <lcms.h>, [The correct header])
+
+ # Try to find the full path of lcms.h
+ for a in $includedir $prefix/include /usr/include /usr/local/include $kde_extra_includes; do
+ for b in lcms.h lcms/lcms.h ; do
+ if test -d "$a" && test -f "$a/$b" ; then
+ LCMSHDR="$a/$b"
+ fi
+ done
+ done
+ # Check if lcms.h was found. If not then it means that we didn't search
+ # the right dirs since the kde check already found a usable lcms.h
+ if test -n "$LCMSHDR" ; then
+ # Get lcms version
+ lcms_ver_line=`cat $LCMSHDR | grep '^// Version' `
+ if test -z "$lcms_ver_line" ; then
+ # Some versions of lcms have the version in /* */
+ lcms_ver_line=`cat $LCMSHDR | grep '^/\* Version' `
+ fi
+ lcms_ver=`echo "$lcms_ver_line" | head -n 1 | cut -d ' ' -f 3 `
+
+ # Get major and minor version numbers
+ lcms_var_maj=`echo $lcms_ver | cut -d . -f 1`
+
+ # Some versions have a character attached to the end of minor version
+ lcms_var_min=`echo $lcms_ver | cut -d . -f 2 | sed 's,[^0-9],,g'`
+
+ if test "$lcms_var_maj" -gt 1 || test "$lcms_var_min" -lt 9 ; then
+ LCMS_LIBS=''
+ fi
+ fi
+ else
+ LCMS_LIBS=''
+ fi
+fi
+
+if test -z "$LCMS_LIBS"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
+fi
+
+AC_SUBST(LCMS_LIBS)
+
+# Check for fribidi
+KDE_FIND_PATH(fribidi-config, FRIBIDI_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin],)
+
+if test -n "$FRIBIDI_CONFIG"; then
+ vers=`$FRIBIDI_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+ if test -n "$vers" && test "$vers" -ge 10004
+ then
+ FRIBIDI_LIBS="`$FRIBIDI_CONFIG --libs`"
+ FRIBIDI_RPATH=
+ for args in $FIBIDI_LIBS; do
+ case $args in
+ -L*)
+ FRIBIDI_RPATH="$FRIBIDI_CONFIG $args"
+ ;;
+ esac
+ done
+ FRIBIDI_RPATH=`echo $FRIBIDI_RPATH | sed -e "s/-L/-R/g"`
+ FRIBIDI_CFLAGS="`$FRIBIDI_CONFIG --cflags`"
+
+ AC_DEFINE_UNQUOTED(HAVE_FRIBIDI, 1, [Defines if your system has the fribidi library])
+ fi
+fi
+
+AC_SUBST(FRIBIDI_LIBS)
+AC_SUBST(FRIBIDI_CFLAGS)
+AC_SUBST(FRIBIDI_RPATH)
+
+if test -z "$FRIBIDI_LIBS"; then
+ DO_NOT_COMPILE="$DO_NOT_COMPILE ksvg"
+fi
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_CHECK_HEADERS(sstream)
+AC_LANG_RESTORE
diff --git a/ksvg/core/CanvasFactory.cpp b/ksvg/core/CanvasFactory.cpp
new file mode 100644
index 00000000..ca2822b2
--- /dev/null
+++ b/ksvg/core/CanvasFactory.cpp
@@ -0,0 +1,176 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qfile.h>
+
+#include <kdebug.h>
+#include <ksimpleconfig.h>
+#include <kparts/componentfactory.h>
+
+#include "KSVGCanvas.h"
+#include "CanvasFactory.h"
+
+using namespace KSVG;
+
+CanvasFactory *CanvasFactory::s_factory = 0;
+
+CanvasFactory::CanvasFactory()
+{
+ m_canvasList.setAutoDelete(true);
+}
+
+CanvasFactory::~CanvasFactory()
+{
+}
+
+CanvasFactory *CanvasFactory::self()
+{
+ if(!s_factory)
+ s_factory = new CanvasFactory();
+
+ return s_factory;
+}
+
+void CanvasFactory::cleanup()
+{
+ m_canvasList.clear();
+}
+
+void CanvasFactory::queryCanvas()
+{
+ m_canvasList.clear();
+
+ QValueList<KService::Ptr> traderList = KTrader::self()->query("KSVG/Renderer", "(Type == 'Service')");
+ KTrader::OfferList::Iterator it(traderList.begin());
+ for( ; it != traderList.end(); ++it)
+ {
+ KService::Ptr ptr = (*it);
+
+ QString name = ptr->property("Name").toString();
+ QString internal = ptr->property("X-KSVG-InternalName").toString();
+ if(name.isEmpty() || internal.isEmpty())
+ continue;
+
+ CanvasInfo *cinfo = new CanvasInfo();
+ cinfo->service = ptr;
+ cinfo->canvas = 0;
+ cinfo->name = name;
+ cinfo->internal = internal;
+
+ m_canvasList.append(cinfo);
+ }
+
+ if(m_canvasList.isEmpty())
+ {
+ kdError(26001) << "Couldn't load any canvas!!! FATAL ERROR." << endl;
+ return;
+ }
+}
+
+KSVGCanvas *CanvasFactory::loadCanvas(int width, int height)
+{
+ queryCanvas();
+
+ KSimpleConfig *config = new KSimpleConfig("ksvgpluginrc", false);
+ config->setGroup("Canvas");
+ QString load = config->readEntry("ActiveCanvas", "libart");
+ delete config;
+
+ QPtrListIterator<CanvasInfo> it(m_canvasList);
+ CanvasInfo *info = it.current();
+ while((info = it.current()) != 0)
+ {
+ if(info->internal == load)
+ {
+ QStringList args;
+ args.prepend(QString::number(width));
+ args.prepend(QString::number(height));
+
+ info->canvas = KParts::ComponentFactory::createInstanceFromLibrary<KSVGCanvas>(QFile::encodeName(info->service->library()), 0, 0, args);
+
+ if(info->canvas)
+ return info->canvas;
+ else
+ {
+ kdError(26001) << "Failed to load canvas: " << load << " FATAL ERROR." << endl;
+ break;
+ }
+ }
+
+ ++it;
+ }
+
+ return 0;
+}
+
+int CanvasFactory::itemInList(KSVGCanvas *canvas)
+{
+ QPtrListIterator<CanvasInfo> it(m_canvasList);
+ CanvasInfo *info = it.current();
+ unsigned int i = 0;
+ while((info = it.current()) != 0)
+ {
+ if(info->canvas == canvas)
+ return i;
+
+ i++;
+ ++it;
+ }
+
+ return 0;
+}
+
+QString CanvasFactory::internalNameFor(const QString &name)
+{
+ QPtrListIterator<CanvasInfo> it(m_canvasList);
+ CanvasInfo *info = it.current();
+ while((info = it.current()) != 0)
+ {
+ if(info->name == name)
+ return info->internal;
+
+ ++it;
+ }
+
+ return QString::null;
+}
+
+void CanvasFactory::deleteCanvas(KSVGCanvas *canvas)
+{
+ QPtrListIterator<CanvasInfo> it(m_canvasList);
+ CanvasInfo *info = it.current();
+ while((info = it.current()) != 0)
+ {
+ if(info->canvas == canvas)
+ {
+ delete info->canvas;
+ info->canvas = 0;
+ }
+
+ ++it;
+ }
+}
+
+QPtrList<CanvasInfo> CanvasFactory::canvasList()
+{
+ return m_canvasList;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/CanvasFactory.h b/ksvg/core/CanvasFactory.h
new file mode 100644
index 00000000..dc272700
--- /dev/null
+++ b/ksvg/core/CanvasFactory.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CANVASFACTORY_H
+#define CANVASFACTORY_H
+
+#include <ktrader.h>
+
+#include <qstring.h>
+#include <qptrlist.h>
+
+namespace KSVG
+{
+
+class KSVGCanvas;
+class CanvasInfo
+{
+public:
+ KService::Ptr service;
+ KSVGCanvas *canvas;
+ QString name, internal;
+};
+
+class CanvasFactory
+{
+public:
+ CanvasFactory();
+ ~CanvasFactory();
+
+ static CanvasFactory *self();
+
+ void cleanup();
+ KSVGCanvas *loadCanvas(int width, int height);
+
+ int itemInList(KSVGCanvas *canvas);
+ QString internalNameFor(const QString &name);
+ void deleteCanvas(KSVGCanvas *canvas);
+
+ QPtrList<CanvasInfo> canvasList();
+
+private:
+ void queryCanvas();
+
+ static CanvasFactory *s_factory;
+ QPtrList<CanvasInfo> m_canvasList;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/CanvasItem.h b/ksvg/core/CanvasItem.h
new file mode 100644
index 00000000..7ffc7ad9
--- /dev/null
+++ b/ksvg/core/CanvasItem.h
@@ -0,0 +1,154 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CANVASITEM_H
+#define CANVASITEM_H
+
+#include <qrect.h>
+#include <qpoint.h>
+#include <qvaluelist.h>
+
+#define CHUNK_SIZE_HORIZONTAL 32
+#define CHUNK_SIZE_VERTICAL 32
+
+namespace KSVG
+{
+
+class SVGElementImpl;
+
+enum RenderContext
+{
+ /* NONE = for initializing */
+ NONE = 0,
+ /* NORMAL = use baseVal()'s for calculation, and fillRule */
+ NORMAL = 1,
+ /* CLIPPING = use baseVal()'s for calculation, and clipRule */
+ CLIPPING = 2,
+ /* ANIMATION = use animVal()'s for calculation, and fillRule */
+ ANIMATION = 4
+};
+
+enum CanvasItemUpdate
+{
+ UPDATE_STYLE,
+ UPDATE_LINEWIDTH,
+ UPDATE_TRANSFORM,
+ UPDATE_ZOOM,
+ UPDATE_PAN
+};
+
+class CanvasItem
+{
+public:
+ CanvasItem() { m_zIndex = 0; m_referenced = false; }
+ virtual ~CanvasItem() { }
+
+ virtual QRect bbox() const = 0;
+ virtual bool fillContains(const QPoint &) = 0;
+ virtual bool strokeContains(const QPoint &) = 0;
+ virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0) = 0;
+ virtual void draw() = 0;
+ virtual bool isVisible() = 0;
+
+ void setZIndex(unsigned int zIndex) { m_zIndex = zIndex; }
+ unsigned int zIndex() const { return m_zIndex; }
+
+ void setReferenced(bool referenced) { m_referenced = referenced; }
+ bool referenced() const { return m_referenced; }
+
+ virtual SVGElementImpl *element() const { return 0; }
+
+protected:
+ unsigned int m_zIndex;
+ bool m_referenced;
+};
+
+class CanvasItemPtr
+{
+public:
+ CanvasItemPtr() : ptr(0) { }
+ CanvasItemPtr(CanvasItem *p) : ptr(p) { }
+
+ bool operator<=(const CanvasItemPtr& that) const
+ {
+ // Order same-z objects by identity.
+ if(that.ptr->zIndex() == ptr->zIndex())
+ return that.ptr >= ptr;
+ return that.ptr->zIndex() >= ptr->zIndex();
+ }
+ bool operator<(const CanvasItemPtr& that) const
+ {
+ // Order same-z objects by identity.
+ if(that.ptr->zIndex() == ptr->zIndex())
+ return that.ptr > ptr;
+ return that.ptr->zIndex() > ptr->zIndex();
+ }
+ bool operator>(const CanvasItemPtr& that) const
+ {
+ // Order same-z objects by identity.
+ if(that.ptr->zIndex() == ptr->zIndex())
+ return that.ptr < ptr;
+ return that.ptr->zIndex() < ptr->zIndex();
+ }
+ bool operator==(const CanvasItemPtr& that) const { return that.ptr == ptr; }
+ operator CanvasItem *() const { return ptr; }
+
+private:
+ CanvasItem *ptr;
+};
+
+class CanvasItemList : public QValueList<CanvasItem *>
+{
+public:
+ void sort() { qHeapSort(*((QValueList<CanvasItemPtr> *) this)); }
+};
+
+class CanvasChunk
+{
+public:
+ CanvasChunk(short x, short y) : m_x(x), m_y(y), m_dirty(false) { }
+
+ void sort() { m_list.sort(); }
+ const CanvasItemList &list() const { return m_list; }
+
+ void add(CanvasItem *item) { m_list.prepend(item); m_dirty = true; }
+ void remove(CanvasItem *item) { m_list.remove(item); m_dirty = true; }
+
+ void setDirty() { m_dirty = true; }
+ bool unsetDirty() { bool y = m_dirty; m_dirty = false; return y; }
+ bool isDirty() const { return m_dirty; }
+
+ short x() const { return m_x; }
+ short y() const { return m_y; }
+
+ QRect bbox() const { return QRect(m_x * CHUNK_SIZE_HORIZONTAL, m_y * CHUNK_SIZE_VERTICAL, CHUNK_SIZE_HORIZONTAL, CHUNK_SIZE_VERTICAL); }
+
+private:
+ CanvasItemList m_list;
+ short m_x;
+ short m_y;
+ bool m_dirty : 1;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/CanvasItems.cpp b/ksvg/core/CanvasItems.cpp
new file mode 100644
index 00000000..0ffd017c
--- /dev/null
+++ b/ksvg/core/CanvasItems.cpp
@@ -0,0 +1,509 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "KSVGCanvas.h"
+#include "KSVGHelper.h"
+#include "KSVGTextChunk.h"
+
+#include "CanvasItems.h"
+
+#include "SVGMatrixImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPathElementImpl.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGTSpanElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+#include <Glyph.h>
+#include <Converter.h>
+#include <Font.h>
+
+#include <kdebug.h>
+
+using namespace KSVG;
+
+CanvasText::CanvasText(SVGTextElementImpl *text) : CanvasItem(), m_text(text)
+{
+}
+
+CanvasText::~CanvasText()
+{
+}
+
+void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int &curx, int &cury, int &endx, int &endy, SVGElementImpl *element, KSVGTextChunk *textChunk, T2P::BezierPath *bpath)
+{
+ SVGTSpanElementImpl *tspan = dynamic_cast<SVGTSpanElementImpl *>(element);
+ if(!tspan)
+ return;
+
+ if(!tspan->text().isEmpty() || element->nodeName() == "tref")
+ {
+ if((KSVG_TOKEN_NOT_PARSED_ELEMENT(SVGTextPositioningElementImpl::X, tspan) && KSVG_TOKEN_NOT_PARSED_ELEMENT(SVGTextPositioningElementImpl::Y, tspan)))// && !bpath)
+ textChunk->addText(tspan->text(), tspan);
+ else
+ {
+ // new absolute value for next textChunk, render old one
+ if(textChunk->count() > 0)
+ {
+ createGlyphs(textChunk, canvas, screenCTM, curx, cury, curx, cury, bpath);
+ textChunk->clear();
+ }
+
+ int usex, usey;
+ bool bMultipleX = false;
+ bool bMultipleY = false;
+
+ if(tspan->x()->baseVal()->numberOfItems() == 0)
+ {
+ usex = curx;
+
+ if(tspan->dx()->baseVal()->numberOfItems() > 0)
+ usex += int(tspan->dx()->baseVal()->getItem(0)->value());
+ }
+ else
+ {
+ if(tspan->x()->baseVal()->numberOfItems() > 1)
+ bMultipleX = true;
+
+ usex = int(tspan->x()->baseVal()->getItem(0)->value());
+ }
+
+ if(tspan->y()->baseVal()->numberOfItems() == 0)
+ {
+ usey = cury;
+
+ if(tspan->dy()->baseVal()->numberOfItems() > 0)
+ usey += int(tspan->dy()->baseVal()->getItem(0)->value());
+ }
+ else
+ {
+ if(tspan->y()->baseVal()->numberOfItems() > 1)
+ bMultipleY = true;
+
+ usey = int(tspan->y()->baseVal()->getItem(0)->value());
+ }
+
+ QString text = tspan->text();
+ if(!text.isEmpty())
+ {
+ T2P::GlyphLayoutParams *params = tspan->layoutParams();
+
+ if(bMultipleX || bMultipleY)
+ {
+ for(unsigned int i = 0; i < text.length(); i++)
+ {
+ if(bMultipleX && i < tspan->x()->baseVal()->numberOfItems())
+ usex = int(tspan->x()->baseVal()->getItem(i)->value());
+ if(bMultipleY && i < tspan->y()->baseVal()->numberOfItems())
+ usey = int(tspan->y()->baseVal()->getItem(i)->value());
+
+ textChunk->addText(QString(text.at(i)), tspan);
+ createGlyphs(textChunk, canvas, screenCTM, usex, usey, endx, endy, bpath);
+ textChunk->clear();
+
+ if(!params->tb())
+ usex += endx;
+ else
+ usey += endy;
+ }
+ }
+ else
+ {
+ textChunk->addText(text, tspan);
+ //createGlyphs(textChunk, canvas, screenCTM, usex, usey, endx, endy, bpath);
+ //textChunk->clear();
+ }
+
+ curx = usex;
+ cury = usey;
+
+ if(!params->tb())
+ curx += endx;
+ else
+ cury += endy;
+
+ delete params;
+ }
+ }
+ }
+
+ DOM::Node node = (tspan->getTextDirection() == LTR) ? tspan->firstChild() : tspan->lastChild();
+
+ bool tspanFound = false;
+ for(; !node.isNull(); node = ((tspan->getTextDirection() == LTR) ? node.nextSibling() : node.previousSibling()))
+ {
+ SVGElementImpl *element = m_text->ownerDoc()->getElementFromHandle(node.handle());
+ if(node.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ if(tspanFound)
+ {
+ DOM::Text text = node;
+ QString temp = text.data().string();
+ textChunk->addText(temp, tspan);
+ }
+ }
+ else if(element->nodeName() == "tspan" || element->nodeName() == "tref")
+ {
+ tspanFound = true;
+ handleTSpan(canvas, screenCTM, curx, cury, endx, endy, element, textChunk, 0);
+ }
+ }
+
+}
+
+KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int &curx, int &cury, int &endx, int &endy)
+{
+ KSVGTextChunk *textChunk = new KSVGTextChunk();
+
+ SVGLengthImpl *length = m_text->x()->baseVal()->getItem(0);
+ if(length)
+ curx = int(length->value());
+
+ length = m_text->y()->baseVal()->getItem(0);
+ if(length)
+ cury = int(length->value());
+
+ // Otherwhise some js scripts which require a child, don't work (Niko)
+ if(!m_text->hasChildNodes())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(m_text->ownerDoc())->createTextNode(DOM::DOMString(""));
+ m_text->appendChild(impl);
+ }
+ else
+ {
+ DOM::Node node = (m_text->getTextDirection() == LTR) ? m_text->firstChild() : m_text->lastChild();
+
+ for(; !node.isNull(); node = ((m_text->getTextDirection() == LTR) ? node.nextSibling() : node.previousSibling()))
+ {
+ if(node.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ DOM::Text text = node;
+ QString temp = text.data().string();
+
+ if(!temp.isEmpty())
+ {
+ if(m_text->getTextDirection() != LTR)
+ {
+ QString convert = temp;
+
+ for(int i = temp.length(); i > 0; i--)
+ convert[temp.length() - i] = temp[i - 1];
+
+ temp = convert;
+ }
+
+ textChunk->addText(temp, m_text);
+ }
+ }
+ else
+ {
+ SVGElementImpl *element = m_text->ownerDoc()->getElementFromHandle(node.handle());
+ if(element->nodeName() == "textPath")
+ {
+ // new absolute value for next textChunk, render old one
+ if(textChunk->count() > 0)
+ {
+ createGlyphs(textChunk, canvas, screenCTM, curx, cury, curx, cury);
+ textChunk->clear();
+ }
+
+ SVGTextPathElementImpl *tpath = dynamic_cast<SVGTextPathElementImpl *>(element);
+ QString target = SVGURIReferenceImpl::getTarget(tpath->href()->baseVal().string());
+ SVGPathElementImpl *path = dynamic_cast<SVGPathElementImpl *>(tpath->ownerSVGElement()->getElementById(target));
+
+ T2P::BezierPath *bpath = 0;
+ if(path && path->item())
+ bpath = tpath->ownerDoc()->canvas()->toBezierPath(path->item());
+
+ DOM::Node iterate = tpath->firstChild();
+ for(; !iterate.isNull(); iterate = iterate.nextSibling())
+ {
+ if(iterate.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ DOM::Text text = iterate;
+ QString temp = text.data().string();
+
+ if(!temp.isEmpty())
+ textChunk->addText(temp, tpath);
+ }
+ else
+ {
+ kdDebug() << "FOUND TSPAN IN TEXTPATH! BPATH:" << bpath <<endl;
+
+ SVGElementImpl *itelement = m_text->ownerDoc()->getElementFromHandle(iterate.handle());
+ handleTSpan(canvas, screenCTM, curx, cury, endx, endy, itelement, textChunk, bpath);
+ }
+ }
+
+ if(textChunk->count() > 0)
+ {
+ int usex = 0, usey = 0;
+ createGlyphs(textChunk, canvas, screenCTM, usex, usey, endx, endy, bpath);
+ textChunk->clear();
+
+ curx = usex;
+ cury = usey;
+
+ T2P::GlyphLayoutParams *params = tpath->layoutParams();
+
+ if(!params->tb())
+ curx += endx;
+ else
+ cury += endy;
+
+ delete params;
+ }
+ }
+ else if(element->nodeName() == "tspan" || element->nodeName() == "tref")
+ handleTSpan(canvas, screenCTM, curx, cury, endx, endy, element, textChunk, 0);
+ }
+ }
+ }
+
+ return textChunk;
+}
+
+void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int curx, int cury, int &endx, int &endy, T2P::BezierPath *bpath) const
+{
+ double _curx = double(curx);
+ QMemArray<double> _cury(1);
+ _cury[0] = double(cury);
+
+ T2P::GlyphLayoutParams *params = m_text->layoutParams();
+ SVGTextPositioningElementImpl *tp = textChunk->getTextElement(0);
+ SVGTextContentElementImpl *tc = textChunk->getTextContentElement(0);
+ SVGTextContentElementImpl *tc0 = tc;
+
+ T2P::SharedFont font;
+ QString text;
+ QPtrList<T2P::GlyphSet> glyphs;
+ glyphs.setAutoDelete(true);
+
+ double pathAdvance = 0;
+ SVGTextPathElementImpl *tpath = dynamic_cast<SVGTextPathElementImpl *>(tc0);
+ if(tpath)
+ pathAdvance = tpath->startOffset()->baseVal()->value();
+ double pathLength = bpath ? bpath->length() : 0;
+ double pathDy = 0;
+ for(unsigned int i = 0; i < textChunk->count(); i++)
+ {
+ tp = textChunk->getTextElement(i);
+ tc = textChunk->getTextContentElement(i);
+
+ if(tp && tp->dx()->baseVal()->numberOfItems() > 0)
+ if(bpath)
+ pathAdvance += tp->dx()->baseVal()->getItem(0)->value() / pathLength;
+ else
+ _curx += tp->dx()->baseVal()->getItem(0)->value();
+ _cury[i] += (tp && tp->dy()->baseVal()->numberOfItems() > 0) ? tp->dy()->baseVal()->getItem(0)->value() : 0;
+
+ SVGMatrixImpl *tempMatrix = SVGSVGElementImpl::createSVGMatrix();
+ tempMatrix->translate(_curx, _cury[i]);
+
+ text = textChunk->getText(i);
+ if(i != textChunk->count() - 1)
+ text += QChar(' ');
+
+ if(!canvas->fontContext()->ready())
+ canvas->fontContext()->init();
+
+ font = canvas->fontContext()->requestFont(canvas->fontVisualParams(tc));
+
+ if(!font)
+ break;
+
+ double addLetterSpacing = 0;
+
+ // Apply affine corrections, through lengthAdjust + textLength
+ if(tp && tp->textLength()->baseVal()->value() != -1)
+ {
+ // #1 Measure text
+ SVGTextElementImpl *textElement = dynamic_cast<SVGTextElementImpl *>(tp);
+ const SVGMatrixImpl *ctm = textElement->screenCTM();
+
+ T2P::Affine affine;
+ {
+ SVGMatrixImpl *temp = SVGSVGElementImpl::createSVGMatrix();
+
+ temp->multiply(ctm);
+ temp->translate(_curx, _cury[0]);
+
+ KSVGHelper::matrixToAffine(temp, affine);
+
+ temp->deref();
+ }
+
+ T2P::GlyphSet *measure = canvas->fontContext()->calcString(font.get(), text.ucs2(), text.length(), affine, params, bpath);
+
+ // Free bpath's
+ measure->set().clear();
+
+ // #2 Calculate textLength
+ double textLength = tp->textLength()->baseVal()->value();
+
+ // #3 Apply the spacing
+ if(tp->lengthAdjust()->baseVal() == LENGTHADJUST_SPACINGANDGLYPHS)
+ tempMatrix->scaleNonUniform((textLength * ctm->a()) / measure->width(), 1);
+ else if(tp->lengthAdjust()->baseVal() == LENGTHADJUST_SPACING)
+ addLetterSpacing = ((textLength - (measure->width() / ctm->a())) / text.length());
+
+ // #4 cleanup
+ delete measure;
+ }
+
+ {
+ T2P::GlyphLayoutParams *params = tc->layoutParams();
+ params->setLetterSpacing(params->letterSpacing() + addLetterSpacing);
+ if(bpath)
+ {
+ params->setTextPathStartOffset(pathAdvance);
+ if(tp && tp->dy()->baseVal()->numberOfItems() > 0)
+ pathDy += tp->dy()->baseVal()->getItem(0)->value();
+ QString shift = QString("%1%%").arg((pathDy / font->fontParams()->size()) * -100.0);
+ params->setBaselineShift(shift.latin1());
+ }
+
+ T2P::Affine affine;
+ KSVGHelper::matrixToAffine(tempMatrix, affine);
+ tempMatrix->deref();
+
+ T2P::GlyphSet *glyph = canvas->fontContext()->calcString(font.get(), text.ucs2(), text.length(), affine, params, bpath);
+ if(bpath)
+ pathAdvance += double(glyph->width()) / pathLength;
+ _curx += (params->tb() ? 0 : glyph->xpen());
+ _cury.resize(i + 2);
+ _cury[i + 1] = _cury[i] + (params->tb() ? glyph->ypen() : 0);
+ if(!glyph)
+ break;
+ else
+ glyphs.append(glyph);
+
+ delete params;
+ }
+ }
+
+ // Calculate text-anchor
+ double anchor = 0;
+
+ // anchor == "start" is the default here (Rob)
+ if(tc->getTextAnchor() == TAMIDDLE)
+ {
+ if(!params->tb())
+ anchor = ((_curx - curx) + 1) / 2;
+ else
+ anchor = ((_cury[textChunk->count()] - cury) + 1) / 2;
+ }
+ else if(tc->getTextAnchor() == TAEND)
+ {
+ if(!params->tb())
+ anchor = (_curx - curx);
+ else
+ anchor = (_cury[textChunk->count()] - cury);
+ }
+
+ // Render all glyphs of the text chunk
+ // Take first glyphset
+ T2P::GlyphSet *glyph = glyphs.at(0);
+ if(!glyph)
+ return;
+
+ // Draw 'text-decoration'
+ // TODO: Currently just ignore text-decoration on vertical layouts, is that correct?
+ // Underline and overline have to be drawn before the glyphs are rendered
+ if(tc0->getTextDecoration() & UNDERLINE && !params->tb())
+ addTextDecoration(tc0, (curx - anchor), (cury + (glyph->underlinePosition() - glyph->pixelBaseline())),
+ _curx - curx, glyph->underlineThickness());
+ if(tc0->getTextDecoration() & OVERLINE && !params->tb())
+ addTextDecoration(tc0, (curx - anchor), (cury + (glyph->overlinePosition() - glyph->pixelBaseline())),
+ _curx - curx, glyph->underlineThickness());
+
+ for(unsigned int j = 0; j < glyphs.count(); j++)
+ {
+ glyph = glyphs.at(j);
+ SVGTextContentElementImpl *style = textChunk->getTextContentElement(j);
+
+ // Draw 'text-decoration'
+ // TODO: Currently just ignore text-decoration on vertical layouts, is that correct?
+ // Underline and overline have to be drawn before the glyphs are rendered
+ if(style->getAttribute("text-decoration") == "underline" && !params->tb())
+ addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->underlinePosition() - glyph->pixelBaseline())),
+ glyph->width(), glyph->underlineThickness());
+ else if(style->getAttribute("text-decoration") == "overline" && !params->tb())
+ addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->overlinePosition() - glyph->pixelBaseline())),
+ glyph->width(), glyph->underlineThickness());
+
+ renderCallback(style, screenCTM, glyph, params, anchor);
+
+ // Clear GlyphAffinePair's
+ for(std::vector<T2P::GlyphAffinePair *>::iterator it = glyph->set().begin(); it != glyph->set().end(); ++it)
+ {
+ T2P::GlyphAffinePair *glyphAffine = *it;
+ delete glyphAffine;
+ }
+
+ glyph->set().clear();
+
+ // Draw 'line-through' text decoration
+ // Line-through has to be drawn after the glyphs are rendered
+ if(style->getAttribute("text-decoration") == "line-through" && !params->tb())
+ addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->strikeThroughPosition() - glyph->pixelBaseline())), glyph->width(), glyph->underlineThickness());
+
+ }
+
+ endx = glyph->bboxX() + glyph->width();
+ endy = int(_cury[glyphs.count() - 1]);
+
+ // Draw 'line-through' text decoration
+ // Line-through has to be drawn after the glyphs are rendered
+ if(tc0->getTextDecoration() & LINE_THROUGH && !params->tb())
+ addTextDecoration(tc0, (curx - anchor), (cury + (glyph->strikeThroughPosition() - glyph->pixelBaseline())), _curx - curx, glyph->underlineThickness());
+
+ delete params;
+}
+
+// #####
+
+void MarkerHelper::doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const QString &markerId)
+{
+ SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(shape->ownerSVGElement()->getElementById(markerId));
+ if(marker)
+ marker->draw(shape, x, y, style->getStrokeWidth()->baseVal()->value(), angle);
+}
+
+void MarkerHelper::doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
+{
+ doMarker(shape, style, x, y, angle, style->getStartMarker());
+}
+
+void MarkerHelper::doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
+{
+ doMarker(shape, style, x, y, angle, style->getMidMarker());
+}
+
+void MarkerHelper::doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle)
+{
+ doMarker(shape, style, x, y, angle, style->getEndMarker());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/CanvasItems.h b/ksvg/core/CanvasItems.h
new file mode 100644
index 00000000..8959d6ba
--- /dev/null
+++ b/ksvg/core/CanvasItems.h
@@ -0,0 +1,133 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CANVASITEMS_H
+#define CANVASITEMS_H
+
+#include <qptrlist.h>
+#include "CanvasItem.h"
+#include "SVGTextElementImpl.h"
+#include "SVGTextPathElementImpl.h"
+
+#include "svgpathparser.h"
+#include "SVGBBoxTarget.h"
+
+namespace T2P
+{
+ class GlyphSet;
+ class BezierPath;
+ class GlyphLayoutParams;
+}
+
+namespace KSVG
+{
+
+class KSVGCanvas;
+class KSVGTextChunk;
+class SVGPathParser;
+class SVGMatrixImpl;
+class SVGMarkerElementImpl;
+class SVGClipPathElementImpl;
+class SVGTextContentElementImpl;
+class SVGTextPathElementImpl;
+
+#define CANVAS_CLASS(Prefix, Class, Postfix, Member) \
+class Canvas##Class : public CanvasItem \
+{ \
+public: \
+ Canvas##Class(Prefix##Class##Postfix *Member) : CanvasItem(), m_##Member(Member) { } \
+ virtual ~Canvas##Class() { } \
+ virtual SVGElementImpl *element() { return reinterpret_cast<SVGElementImpl *>(m_##Member); } \
+protected: \
+ Prefix##Class##Postfix *m_##Member; \
+};
+
+CANVAS_CLASS(SVG, ClipPath, ElementImpl, clipPath)
+
+class CanvasMarker : public CanvasItem
+{
+public:
+ CanvasMarker(SVGMarkerElementImpl *marker) : CanvasItem(), m_marker(marker) {}
+ virtual ~CanvasMarker() {}
+ virtual SVGElementImpl *element() { return reinterpret_cast<SVGElementImpl *>(m_marker); }
+
+ virtual void draw(SVGShapeImpl *obj, double x, double y, double lwidth = 1.0, double angle = 0.0)
+ {
+ Q_UNUSED(obj); Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(lwidth); Q_UNUSED(angle);
+ }
+
+protected:
+ SVGMarkerElementImpl *m_marker;
+};
+
+class MarkerHelper
+{
+protected:
+ void doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
+ void doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
+ void doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
+
+private:
+ void doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const QString &marker);
+};
+
+class CanvasText : public CanvasItem
+{
+public:
+ CanvasText(SVGTextElementImpl *text);
+ virtual ~CanvasText();
+
+ KSVGTextChunk *createTextChunk(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int &curx, int &cury, int &endx, int &endy);
+ virtual SVGElementImpl *element() const { return m_text; }
+
+ virtual void renderCallback(SVGTextContentElementImpl *element, const SVGMatrixImpl *screenCTM, T2P::GlyphSet *glyph, T2P::GlyphLayoutParams *params, double anchor) const = 0;
+ void createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int curx, int cury, int &endx, int &endy, T2P::BezierPath *bpath = 0) const;
+
+ virtual void addTextDecoration(SVGTextContentElementImpl *element, double x, double y, double w, double h) const = 0;
+
+private:
+ void handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int &curx, int &cury, int &endx, int &endy, SVGElementImpl *element, KSVGTextChunk *textChunk, T2P::BezierPath *bpath);
+
+protected:
+ SVGTextElementImpl *m_text;
+};
+
+class CanvasPaintServer : public SVGBBoxTarget
+{
+public:
+ CanvasPaintServer() : SVGBBoxTarget() { m_finalized = false; }
+ virtual ~CanvasPaintServer() {}
+
+ void setFinalized() { m_finalized = true; }
+ void resetFinalized() { m_finalized = false; }
+ bool finalized() { return m_finalized; }
+
+ virtual void finalizePaintServer() = 0;
+ virtual void reference(const QString &href) = 0;
+
+private:
+ bool m_finalized;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/DocumentFactory.cpp b/ksvg/core/DocumentFactory.cpp
new file mode 100644
index 00000000..bcc0ddcb
--- /dev/null
+++ b/ksvg/core/DocumentFactory.cpp
@@ -0,0 +1,110 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qobject.h>
+
+#include <kdebug.h>
+#include <kstaticdeleter.h>
+
+#include "SVGDocument.h"
+#include "SVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "DocumentFactory.h"
+
+using namespace KSVG;
+
+namespace KSVG
+{
+ class DocumentFactory::Private
+ {
+ public:
+ Private() { m_docs.setAutoDelete(true); }
+ ~Private() { m_docs.clear(); }
+
+ void setup(bool bFit) { m_docs.append(new SVGDocumentImpl(!bFit /* animations */, bFit)); }
+ SVGDocumentImpl *doc() const { return m_docs.current(); }
+
+ private:
+ QPtrList<SVGDocumentImpl> m_docs;
+ };
+}
+
+static KStaticDeleter<DocumentFactory> s_deleter;
+static DocumentFactory *s_factory = 0;
+
+DocumentFactory::DocumentFactory() : m_d(new Private())
+{
+}
+
+DocumentFactory::~DocumentFactory()
+{
+ delete m_d;
+}
+
+DocumentFactory *DocumentFactory::self()
+{
+ if(!s_factory)
+ s_deleter.setObject(s_factory, new DocumentFactory());
+ return s_factory;
+}
+
+SVGDocument *DocumentFactory::requestDocument(QObject *notifyObject, const char *notifySlot) const
+{
+ SVGDocumentImpl *impl = requestDocumentImpl(false);
+ QObject::connect(impl, SIGNAL(finishedParsing(bool, const QString &)), notifyObject, notifySlot);
+
+ return new SVGDocument(impl);
+}
+
+bool DocumentFactory::startParsing(SVGDocument *document, const KURL &url)
+{
+ if(!document || !document->handle())
+ return false;
+
+ return reinterpret_cast<SVGDocumentImpl *>(document->handle())->open(url);
+}
+
+bool DocumentFactory::attachCanvas(KSVGCanvas *canvas, SVGDocument *document)
+{
+ if(!canvas || !document || !document->handle())
+ return false;
+
+ SVGDocumentImpl *docImpl = reinterpret_cast<SVGDocumentImpl *>(document->handle());
+
+ if(docImpl)
+ {
+ docImpl->attach(canvas);
+ return true;
+ }
+
+ return false;
+}
+
+SVGDocumentImpl *DocumentFactory::requestDocumentImpl(bool bFit) const
+{
+ m_d->setup(bFit);
+
+ SVGDocumentImpl *impl = m_d->doc();
+ impl->ref();
+
+ return impl;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/DocumentFactory.h b/ksvg/core/DocumentFactory.h
new file mode 100644
index 00000000..290d54ac
--- /dev/null
+++ b/ksvg/core/DocumentFactory.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef DocumentFactory_H
+#define DocumentFactory_H
+
+#include <kurl.h>
+#include <qobject.h>
+
+namespace KSVG
+{
+
+class KSVGCanvas;
+class SVGDocument;
+class SVGDocumentImpl;
+class DocumentFactory
+{
+public:
+ DocumentFactory();
+ ~DocumentFactory();
+
+ static DocumentFactory *self();
+
+ // Creates a document and connects the parsingFinished() signal to the notifySlot...
+ SVGDocument *requestDocument(QObject *notifyObject, const char *notifySlot) const;
+
+ // Loads 'url' and emits parsingFinisihed() signal, when done
+ bool startParsing(SVGDocument *document, const KURL &url);
+
+ // Attaches the a canvas to the document, that is ksvg specific code
+ bool attachCanvas(KSVGCanvas *canvas, SVGDocument *document);
+
+ // Internal use only - external coders don't have the
+ // possibility to use SVGDocumentImpl anyway
+ SVGDocumentImpl *requestDocumentImpl(bool bFit) const;
+
+private:
+ class Private;
+ Private *m_d;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGCanvas.cpp b/ksvg/core/KSVGCanvas.cpp
new file mode 100644
index 00000000..d4e75d79
--- /dev/null
+++ b/ksvg/core/KSVGCanvas.cpp
@@ -0,0 +1,786 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "CanvasItem.h"
+#include "CanvasItems.h"
+#include "KSVGCanvas.moc"
+
+#include "SVGRectImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGDocumentImpl.h"
+
+#include <kdebug.h>
+#include <kglobal.h>
+
+#include <qstring.h>
+#include <qdatetime.h>
+#include <qpaintdevicemetrics.h>
+#include <qwmatrix.h>
+
+#include <X11/Xlib.h>
+
+#include <math.h>
+
+#include <libs/xrgbrender/gdk-pixbuf-xlibrgb.h>
+
+#include <Font.h>
+#include <fontconfig/fontconfig.h>
+
+#define USE_TIMER
+
+using namespace KSVG;
+
+KSVGCanvas::KSVGCanvas(unsigned int width, unsigned int height) : m_viewportWidth(width), m_viewportHeight(height), m_width(width), m_height(height)
+{
+ m_fontContext = 0;
+
+ m_items.setAutoDelete(true);
+
+ m_chunkSizeVer = CHUNK_SIZE_VERTICAL;
+ m_chunkSizeHor = CHUNK_SIZE_HORIZONTAL;
+
+ m_zoom = 1;
+
+ m_buffer = 0;
+
+ m_backgroundColor = QColor(250, 250, 250);
+
+ m_immediateUpdate = false;
+}
+
+void KSVGCanvas::setup(QPaintDevice *drawWindow, QPaintDevice *directWindow)
+{
+ m_drawWindow = drawWindow;
+ m_directWindow = directWindow;
+
+ m_buffer = 0;
+ m_nrChannels = 3;
+
+ setRenderBufferSize(m_width, m_height);
+
+ xlib_rgb_init_with_depth(m_drawWindow->x11Display(), XScreenOfDisplay(m_drawWindow->x11Display(), m_drawWindow->x11Screen()), m_drawWindow->x11Depth());
+ m_gc = XCreateGC(m_drawWindow->x11Display(), m_drawWindow->handle(), 0, 0);
+}
+
+void KSVGCanvas::setViewportDimension(unsigned int w, unsigned int h)
+{
+ m_viewportWidth = w;
+ m_viewportHeight = h;
+ setRenderBufferSize(w, h);
+}
+
+void KSVGCanvas::setup(unsigned char *buffer, unsigned int width, unsigned int height)
+{
+ setBuffer(buffer);
+ m_drawWindow = 0;
+ m_directWindow = 0;
+
+ m_nrChannels = 4;
+
+ if(height > 0)
+ {
+ m_width = width;
+ m_height = height;
+ }
+
+ setRenderBufferSize(m_width, m_height);
+
+ m_gc = 0;
+}
+
+void KSVGCanvas::setBuffer(unsigned char *buffer)
+{
+ m_buffer = buffer;
+}
+
+KSVGCanvas::~KSVGCanvas()
+{
+ if(m_fontContext)
+ delete m_fontContext;
+
+ if(m_buffer && m_gc)
+ delete []m_buffer;
+
+ if(m_gc)
+ XFreeGC(m_drawWindow->x11Display(), m_gc);
+
+ reset();
+}
+
+void KSVGCanvas::retune(unsigned int csh, unsigned int csv)
+{
+ m_chunkSizeHor = csh;
+ m_chunkSizeVer = csv;
+}
+
+void KSVGCanvas::resize(unsigned int w, unsigned int h)
+{
+ if(m_buffer && (m_width != int(w) || m_height != int(h)))
+ {
+ unsigned char *oldbuffer = m_buffer;
+
+ m_buffer = new unsigned char[w * h * m_nrChannels];
+
+ int minw = kMin(int(w), m_width);
+ int minh = kMin(int(h), m_height);
+
+ int origstride = m_width * m_nrChannels;
+ int newstride = w * m_nrChannels;
+
+ // Redraw new areas, if any
+ int diffw = w - m_width;
+ int diffh = h - m_height;
+
+ QRect r(m_width, 0, diffw, m_height + diffh);
+ QRect r3(0, m_height, m_width + diffw, diffh);
+
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ m_width = w;
+ m_height = h;
+
+ setBuffer(m_buffer);
+ fill();
+
+ if(diffw > 0 || diffh > 0)
+ {
+ CanvasItemList drawables;
+ if(diffw > 0)
+ {
+ QRect r2 = mtx.invert().map(r);
+
+ // Recalc items
+ for(int j = r2.top() / int(m_chunkSizeVer); j <= r2.bottom() / int(m_chunkSizeVer); j++)
+ {
+ for(int i = r2.left() / int(m_chunkSizeHor); i <= r2.right() / int(m_chunkSizeHor); i++)
+ {
+ CanvasChunk *chunk = m_chunkManager.getChunk(i, j);
+ if(chunk)
+ {
+ for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it)
+ {
+ if(!drawables.contains(*it))
+ drawables.append(*it);
+ }
+ }
+ }
+ }
+ }
+
+ if(diffh > 0)
+ {
+ QRect r4 = mtx.invert().map(r3);
+
+ // Recalc items
+ for(int j = r4.top() / int(m_chunkSizeVer); j <= r4.bottom() / int(m_chunkSizeVer); j++)
+ {
+ for(int i = r4.left() / int(m_chunkSizeHor); i <= r4.right() / int(m_chunkSizeHor); i++)
+ {
+ CanvasChunk *chunk = m_chunkManager.getChunk(i, j);
+ if(chunk)
+ {
+ for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it)
+ {
+ if(!drawables.contains(*it))
+ drawables.append(*it);
+ }
+ }
+ }
+ }
+ }
+
+ drawables.sort();
+
+ for(CanvasItemList::Iterator it = drawables.begin(); it != drawables.end(); ++it)
+ (*it)->draw();
+ }
+
+ for(int y = 0; y < minh; y++)
+ memcpy(m_buffer + y * newstride, oldbuffer + y * origstride, minw * m_nrChannels);
+
+ delete []oldbuffer;
+ }
+}
+
+void KSVGCanvas::setRenderBufferSize(int w, int h)
+{
+ kdDebug(26005) << k_funcinfo << endl;
+
+ if(m_drawWindow)
+ {
+ bool needsRedraw = (!m_buffer) || (m_width != w || m_height != h);
+
+ if(needsRedraw)
+ {
+ QPaintDeviceMetrics metrics(m_drawWindow);
+ m_width = kMin(int(w), metrics.width());
+ m_height = kMin(int(h), metrics.height());
+
+ if(m_buffer)
+ delete []m_buffer;
+
+ m_buffer = new unsigned char[m_width * m_height * m_nrChannels];
+ }
+ }
+
+ fill();
+}
+
+void KSVGCanvas::clear(const QRect &r)
+{
+ QRect r2 = r & QRect(0, 0, m_width, m_height);
+ if(!r2.isEmpty() && m_buffer)
+ {
+ for(int i = 0; i < r2.height(); i++)
+ memset(m_buffer + int(r2.x() * m_nrChannels) + int((r2.y() + i) * (m_width * m_nrChannels)), qRgba(250, 250, 250, 250), r2.width() * m_nrChannels);
+ }
+}
+
+void KSVGCanvas::fill()
+{
+ if(m_buffer)
+ {
+ unsigned char r = m_backgroundColor.red();
+ unsigned char g = m_backgroundColor.green();
+ unsigned char b = m_backgroundColor.blue();
+
+ if(m_nrChannels == 3)
+ {
+ if(r == g && r == b)
+ memset(m_buffer, r, m_width * m_height * m_nrChannels);
+ else
+ {
+ unsigned char *p = m_buffer;
+
+ for(int i = 0; i < m_width * m_height; i++)
+ {
+ *p++ = r;
+ *p++ = g;
+ *p++ = b;
+ }
+ }
+ }
+ else
+ {
+ Q_UINT32 *p = reinterpret_cast<Q_UINT32 *>(m_buffer);
+ unsigned char a = qAlpha(m_backgroundColor.rgb());
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+ Q_UINT32 rgba = (a << 24) | (b << 16) | (g << 8) | r;
+#else
+ Q_UINT32 rgba = (r << 24) | (g << 16) | (b << 8) | a;
+#endif
+ for(int i = 0; i < m_width * m_height; i++)
+ *p++ = rgba;
+ }
+ }
+}
+
+// Clipping
+void KSVGCanvas::clipToBuffer(int &x0, int &y0, int &x1, int &y1) const
+{
+ // clamp to viewport
+ x0 = QMAX(x0, 0);
+ x0 = QMIN(x0, int(m_width - 1));
+
+ y0 = QMAX(y0, 0);
+ y0 = QMIN(y0, int(m_height - 1));
+
+ x1 = QMAX(x1, 0);
+ x1 = QMIN(x1, int(m_width - 1));
+
+ y1 = QMAX(y1, 0);
+ y1 = QMIN(y1, int(m_height - 1));
+}
+
+T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) const
+{
+ T2P::FontVisualParams *fontVisualParams = new T2P::FontVisualParams();
+
+ // Calc weight & slant
+ int weight = 0, slant = 0;
+ EFontStyle fontStyle = style->getFontStyle();
+ QString fontWeight = style->getFontWeight();
+
+ if(fontWeight.contains("bold"))
+ weight |= FC_WEIGHT_DEMIBOLD;
+ if(fontWeight.contains("bolder"))
+ weight |= FC_WEIGHT_BOLD;
+ if(fontWeight.contains("lighter"))
+ weight |= FC_WEIGHT_LIGHT;
+
+ bool ok = true;
+ int weightNumber = fontWeight.toInt(&ok);
+
+ if(ok)
+ weight = weightNumber;
+
+ if(fontStyle == FSNORMAL)
+ slant |= FC_SLANT_ROMAN;
+ else if(fontStyle == ITALIC)
+ slant |= FC_SLANT_ITALIC;
+ else if(fontStyle == OBLIQUE)
+ slant |= FC_SLANT_OBLIQUE;
+
+ // Calc font names
+ SVGStringListImpl *fontList = style->getFontFamily();
+
+ for(unsigned int i = 0; i <= fontList->numberOfItems(); i++)
+ {
+ DOM::DOMString *string = fontList->getItem(i);
+
+ if(string)
+ fontVisualParams->fontList().push_back(string->string().latin1());
+ }
+
+ fontVisualParams->setWeight(weight);
+ fontVisualParams->setSlant(slant);
+ fontVisualParams->setSize(style->getFontSize());
+
+ return fontVisualParams;
+}
+
+void KSVGCanvas::invalidate(CanvasItem *item, bool recalc)
+{
+ if(m_chunksByItem.find(item) != m_chunksByItem.end())
+ {
+ if(recalc)
+ {
+ removeFromChunks(item);
+ addToChunks(item);
+ }
+
+ QPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
+ for(it.toFirst(); it.current(); ++it)
+ {
+ (*it)->setDirty();
+ if(!m_dirtyChunks.contains(*it))
+ m_dirtyChunks.append(*it);
+ }
+ }
+ else
+ addToChunks(item);
+}
+
+void KSVGCanvas::insert(CanvasItem *item, int z)
+{
+ if(z == -1)
+ {
+ item->setZIndex(m_chunksByItem.size());
+ m_chunksByItem[item] = QPtrList<CanvasChunk>();
+ addToChunks(item);
+ m_items.append(item);
+
+ bool visible = item->isVisible();
+ if(visible)
+ invalidate(item, false);
+
+ if(m_immediateUpdate)
+ {
+ if(visible)
+ {
+ item->draw();
+ QRect bbox = item->bbox();
+ blit(bbox, true);
+ }
+ }
+ }
+ else
+ {
+ // make some space
+ for(unsigned int i = z; i < m_items.count(); i++)
+ m_items.at(i)->setZIndex(m_items.at(i)->zIndex() + 1);
+
+ item->setZIndex(z);
+ }
+}
+
+void KSVGCanvas::removeItem(CanvasItem *item)
+{
+ removeFromChunks(item);
+ m_items.remove(item);
+}
+
+void KSVGCanvas::removeFromChunks(CanvasItem *item)
+{
+ QPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
+ for(it.toFirst(); it.current(); ++it)
+ {
+ (*it)->remove(item);
+ if(!m_dirtyChunks.contains(*it))
+ m_dirtyChunks.append(*it);
+ }
+ m_chunksByItem.remove(item);
+}
+
+void KSVGCanvas::addToChunks(CanvasItem *item)
+{
+ QRect bbox = item->bbox();
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ bbox = mtx.invert().map(bbox);
+ for(int j = bbox.top() / m_chunkSizeVer; j <= (bbox.bottom() / m_chunkSizeVer); j++)
+ {
+ for(int i = bbox.left() / int(m_chunkSizeHor); i <= (bbox.right() / m_chunkSizeHor); i++)
+ {
+ CanvasChunk *chunk = m_chunkManager.getChunk(i, j);
+ if(!chunk)
+ {
+ chunk = new CanvasChunk(i, j);
+ m_chunkManager.addChunk(chunk);
+ }
+
+ chunk->add(item);
+ m_chunksByItem[item].append(chunk);
+ }
+ }
+}
+
+unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z)
+{
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+
+ if(shape)
+ {
+ CanvasItem *item = shape->item();
+
+ if(item)
+ {
+ SVGImageElementImpl *image = dynamic_cast<SVGImageElementImpl *>(shape);
+
+ if(image && image->svgImageRootElement())
+ {
+ // Set the z for all items in the svg image, since they live in the
+ // same canvas.
+ z = setElementItemZIndexRecursive(image->svgImageRootElement(), z);
+ }
+ else
+ {
+ item->setZIndex(z);
+ invalidate(item, false);
+ z++;
+ }
+ }
+ }
+
+ for(DOM::Node node = element->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *e = element->ownerDoc()->getElementFromHandle(node.handle());
+
+ if(e)
+ z = setElementItemZIndexRecursive(e, z);
+ }
+
+ return z;
+}
+
+void KSVGCanvas::update(const QPoint &panPoint, bool erase)
+{
+#ifdef USE_TIMER
+ QTime t;
+ t.start();
+#endif
+
+ int dx = panPoint.x() - m_pan.x();
+ int dy = panPoint.y() - m_pan.y();
+ m_pan = panPoint;
+
+ if(erase)
+ fill();
+
+ // reset clip paths
+ QDictIterator<CanvasClipPath> itr(m_clipPaths);
+ for(; itr.current(); ++itr)
+ (*itr)->update(UPDATE_TRANSFORM);
+
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ QRect r(0, 0, m_width, m_height);
+ QRect r2 = mtx.invert().map(r);
+
+ // pan all items
+ for(unsigned int i = 0; i < m_items.count(); i++)
+ m_items.at(i)->update(UPDATE_PAN, dx, dy);
+
+ // recalc items
+ CanvasItemList drawables;
+ QPtrListIterator<CanvasItem> it = m_items;
+ for(int j = r2.top() / m_chunkSizeVer; j <= (r2.bottom() / m_chunkSizeVer); j++)
+ {
+ for(int i = r2.left() / m_chunkSizeHor; i <= (r2.right() / m_chunkSizeHor); i++)
+ {
+ CanvasChunk *chunk = m_chunkManager.getChunk(i, j);
+ if(chunk)
+ {
+ for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it)
+ {
+ if(!drawables.contains(*it))
+ drawables.append(*it);
+ }
+ }
+ }
+ }
+
+ drawables.sort();
+ for(CanvasItemList::Iterator it = drawables.begin(); it != drawables.end(); ++it)
+ (*it)->draw();
+
+ if(m_drawWindow)
+ blit(QRect(0, 0, m_width, m_height), false);
+
+ m_dirtyChunks.clear();
+
+#ifdef USE_TIMER
+ kdDebug(26000) << k_funcinfo << " Total time: " << t.elapsed() << endl;
+#endif
+}
+
+void KSVGCanvas::update(float zoomFactor)
+{
+#ifdef USE_TIMER
+ QTime t;
+ t.start();
+#endif
+
+ if(zoomFactor >= 1)
+ {
+ int newWidth = static_cast<int>(m_viewportWidth * zoomFactor);
+ int newHeight = static_cast<int>(m_viewportHeight * zoomFactor);
+ setRenderBufferSize(newWidth, newHeight);
+ }
+ else
+ fill();
+
+ // reset clip paths
+ QDictIterator<CanvasClipPath> itr(m_clipPaths);
+ for(; itr.current(); ++itr)
+ (*itr)->update(UPDATE_TRANSFORM);
+
+ m_zoom = zoomFactor;
+
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ QRect r(0, 0, m_width, m_height);
+ QRect r2 = mtx.invert().map(r);
+
+ // zoom all items
+ for(unsigned int i = 0; i < m_items.count(); i++)
+ m_items.at(i)->update(UPDATE_ZOOM);
+
+ // recalc items
+ CanvasItemList drawables;
+ QPtrListIterator<CanvasItem> it = m_items;
+ for(int j = r2.top() / m_chunkSizeVer; j <= (r2.bottom() / m_chunkSizeVer); j++)
+ {
+ for(int i = r2.left() / m_chunkSizeHor; i <= (r2.right() / m_chunkSizeHor); i++)
+ {
+ CanvasChunk *chunk = m_chunkManager.getChunk(i, j);
+ if(chunk)
+ {
+ for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it)
+ {
+ if(!drawables.contains(*it))
+ drawables.append(*it);
+ }
+ }
+ }
+ }
+
+ drawables.sort();
+ for(CanvasItemList::Iterator it = drawables.begin(); it != drawables.end(); ++it)
+ (*it)->draw();
+
+ if(m_drawWindow)
+ blit(QRect(0, 0, m_width, m_height), false);
+
+ m_dirtyChunks.clear();
+
+#ifdef USE_TIMER
+ kdDebug(26000) << k_funcinfo << " Total time: " << t.elapsed() << endl;
+#endif
+}
+
+void KSVGCanvas::reset()
+{
+ m_items.clear();
+ m_chunkManager.clear();
+ m_chunksByItem.clear();
+ m_dirtyChunks.clear();
+ m_pan.setX(0);
+ m_pan.setY(0);
+ m_zoom = 1;
+}
+
+void KSVGCanvas::update()
+{
+#ifdef USE_TIMER
+ QTime t;
+ t.start();
+#endif
+
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ // Process dirty chunks
+ QPtrList<CanvasChunk> chunkList;
+ CanvasItemList drawables;
+ for(unsigned int i = 0; i < m_dirtyChunks.count(); i++)
+ {
+ CanvasChunk *chunk = m_dirtyChunks[i];
+ Q_ASSERT(chunk->isDirty());
+
+ QRect r = chunk->bbox();
+ QRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
+ clear(chunkbox);
+ chunkList.append(chunk);
+
+ for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it)
+ {
+// kdDebug(26005) << k_funcinfo << " Checking: " << *it << endl;
+ if(!drawables.contains(*it))
+ {
+// kdDebug(26005) << k_funcinfo << " Yes, appending to update list!" << endl;
+ drawables.append(*it);
+ }
+ }
+
+ chunk->unsetDirty();
+ }
+
+ drawables.sort();
+
+ // Draw dirty chunks
+ for(CanvasItemList::Iterator it = drawables.begin(); it != drawables.end(); ++it)
+ {
+// kdDebug(26005) << " Need to redraw dirty : " << (*it) << " with z : " << (*it)->zIndex() << endl;
+ (*it)->draw();
+ }
+
+ // Blit dirty chunks
+ QPtrListIterator<CanvasChunk> it = chunkList;
+ for(it.toFirst(); it.current(); ++it)
+ {
+ QRect r = (*it)->bbox();
+ QRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
+ blit(chunkbox, false);
+ }
+
+ m_dirtyChunks.clear();
+
+#ifdef USE_TIMER
+ kdDebug(26005) << k_funcinfo << " Total time: " << t.elapsed() << endl;
+#endif
+}
+
+CanvasItemList KSVGCanvas::collisions(const QPoint &p, bool exact) const
+{
+ QWMatrix mtx;
+ mtx.translate(m_pan.x(), m_pan.y());
+ mtx.scale(m_zoom, m_zoom);
+
+ QPoint p2 = mtx.invert().map(p);
+ if(p2.x() < 0 || p2.y() < 0)
+ return CanvasItemList();
+
+ unsigned int x = p2.x() / int(m_chunkSizeHor);
+ unsigned int y = p2.y() / int(m_chunkSizeVer);
+
+ CanvasItemList result;
+ CanvasChunk *chunk = m_chunkManager.getChunk(x, y);
+ if(!chunk)
+ return result;
+
+ CanvasItemList list = chunk->list();
+ if(exact)
+ {
+ for(CanvasItemList::Iterator it = list.begin(); it != list.end(); ++it)
+ {
+ if((*it)->fillContains(p) || (*it)->strokeContains(p) || (*it)->bbox().contains(p))
+ result.append(*it);
+ }
+
+ return result;
+ }
+ else
+ return list;
+}
+
+void KSVGCanvas::blit(const QRect &rect, bool direct)
+{
+ if(m_drawWindow && m_width && m_height)
+ {
+ // clamp to viewport
+ int x0 = rect.x();
+ x0 = QMAX(x0, 0);
+ x0 = QMIN(x0, int(m_width - 1));
+
+ int y0 = rect.y();
+ y0 = QMAX(y0, 0);
+ y0 = QMIN(y0, int(m_height - 1));
+
+ int x1 = rect.x() + rect.width() + 1;
+ x1 = QMAX(x1, 0);
+ x1 = QMIN(x1, int(m_width));
+
+ int y1 = rect.y() + rect.height() + 1;
+ y1 = QMAX(y1, 0);
+ y1 = QMIN(y1, int(m_height));
+
+ xlib_draw_rgb_image(direct ? m_directWindow->handle() : m_drawWindow->handle(), m_gc, x0, y0, x1 - x0, y1 - y0, XLIB_RGB_DITHER_NONE, m_buffer + (m_width * y0 + x0) * m_nrChannels, m_width * m_nrChannels);
+ }
+}
+
+void KSVGCanvas::blit()
+{
+ return blit(QRect(0, 0, m_width, m_height), false);
+}
+
+void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk)
+{
+ QString key = QString("%1 %2").arg(chunk->x()).arg(chunk->y());
+// kdDebug(26005) << k_funcinfo << "Adding chunk : " << chunk << endl;
+ m_chunks.insert(key, chunk);
+}
+
+CanvasChunk *KSVGCanvas::ChunkManager::getChunk(short x, short y) const
+{
+// kdDebug(26005) << k_funcinfo << "getting chunk from : " << x << ", " << y << endl;
+ QString key = QString("%1 %2").arg(x).arg(y);
+ return m_chunks[key];
+}
+
+void KSVGCanvas::ChunkManager::clear()
+{
+ m_chunks.clear();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGCanvas.h b/ksvg/core/KSVGCanvas.h
new file mode 100644
index 00000000..7b26997c
--- /dev/null
+++ b/ksvg/core/KSVGCanvas.h
@@ -0,0 +1,190 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGCANVAS_H
+#define KSVGCANVAS_H
+
+#include <qmap.h>
+#include <qdict.h>
+#include <qcolor.h>
+#include <qobject.h>
+#include <qptrlist.h>
+#include <qdict.h>
+
+#include <Converter.h>
+
+namespace KSVG
+{
+
+class SVGShapeImpl;
+class SVGMatrixImpl;
+class SVGStylableImpl;
+class SVGElementImpl;
+class SVGTextElementImpl;
+class SVGRectElementImpl;
+class SVGLineElementImpl;
+class SVGPathElementImpl;
+class SVGImageElementImpl;
+class SVGCircleElementImpl;
+class SVGMarkerElementImpl;
+class SVGEllipseElementImpl;
+class SVGPolygonElementImpl;
+class SVGPolylineElementImpl;
+class SVGClipPathElementImpl;
+
+class CanvasItem;
+class CanvasChunk;
+class CanvasItemList;
+class CanvasClipPath;
+class CanvasPaintServer;
+
+// Must be a QObject to be able to be loaded by KLibLoader...
+class KSVGCanvas : public QObject
+{
+Q_OBJECT
+public:
+ KSVGCanvas(unsigned int width, unsigned int height);
+ virtual ~KSVGCanvas();
+
+ void setViewportDimension(unsigned int w, unsigned int h);
+
+ void setup(QPaintDevice *drawWidget, QPaintDevice *directWindow);
+ void setup(unsigned char *buffer, unsigned int width = 0, unsigned int height = 0);
+
+ void reset();
+ void update();
+ void update(float zoomFactor);
+ void update(const QPoint &panPoint, bool erase = true);
+ void resize(unsigned int w, unsigned int h);
+ void retune(unsigned int csh, unsigned int csv);
+ void invalidate(CanvasItem *item, bool recalc = true);
+ CanvasItemList collisions(const QPoint &p, bool exact = false) const;
+
+ void setBackgroundColor(const QColor &c) { m_backgroundColor = c; }
+ void blit();
+ void blit(const QRect &rect, bool direct);
+
+ float zoom() const { return m_zoom; }
+ QPoint pan() const { return m_pan; }
+ void setPan(const QPoint &pan) { m_pan = pan; }
+
+ int width() const { return m_width; }
+ int height() const { return m_height; }
+
+ virtual void setRenderBufferSize(int w, int h);
+ void clipToBuffer(int &x0, int &y0, int &x1, int &y1) const;
+
+ // creating canvas items
+ virtual CanvasItem *createRectangle(SVGRectElementImpl *rect) = 0;
+ virtual CanvasItem *createEllipse(SVGEllipseElementImpl *ellipse) = 0;
+ virtual CanvasItem *createCircle(SVGCircleElementImpl *circle) = 0;
+ virtual CanvasItem *createLine(SVGLineElementImpl *line) = 0;
+ virtual CanvasItem *createPolyline(SVGPolylineElementImpl *poly) = 0;
+ virtual CanvasItem *createPolygon(SVGPolygonElementImpl *poly) = 0;
+ virtual CanvasItem *createPath(SVGPathElementImpl *path) = 0;
+ virtual CanvasItem *createClipPath(SVGClipPathElementImpl *clippath) = 0;
+ virtual CanvasItem *createImage(SVGImageElementImpl *image) = 0;
+ virtual CanvasItem *createCanvasMarker(SVGMarkerElementImpl *marker) = 0;
+ virtual CanvasItem *createText(SVGTextElementImpl *text) = 0;
+ virtual CanvasPaintServer *createPaintServer(SVGElementImpl *pserver) = 0;
+
+ void insert(CanvasItem *item, int z = -1);
+ void removeItem(CanvasItem *);
+
+ // Enable to have the canvas updated and blitted on item insertion.
+ void setImmediateUpdate(bool immediateUpdate) { m_immediateUpdate = immediateUpdate; }
+ bool immediateUpdate() const { return m_immediateUpdate; }
+
+ QPtrList<CanvasItem> allItems() const { return m_items; }
+
+ unsigned char *renderingBuffer() const { return m_buffer; }
+ unsigned int nrChannels() const { return m_nrChannels; }
+ unsigned int rowStride() const { return m_nrChannels * m_width; }
+
+ T2P::Converter *fontContext() { return m_fontContext; }
+ QPaintDevice *drawWindow() { return m_drawWindow; }
+ QPaintDevice *directWindow() { return m_directWindow; }
+
+ T2P::FontVisualParams *fontVisualParams(SVGStylableImpl *style) const;
+ virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const { Q_UNUSED(item); return 0; }
+
+ // Assign z indices to the element and its children, starting with z, and
+ // return the next z value to be used.
+ unsigned int setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z);
+
+protected:
+ void addToChunks(CanvasItem *item);
+ void removeFromChunks(CanvasItem *item);
+
+ void initVars();
+
+ void fill();
+ void clear(const QRect &r);
+
+ virtual void setBuffer(unsigned char *buffer);
+
+protected:
+ class ChunkManager
+ {
+ public:
+ ChunkManager() { m_chunks.setAutoDelete(true); }
+ void addChunk(CanvasChunk *chunk);
+ CanvasChunk *getChunk(short x, short y) const;
+
+ void clear();
+
+ private:
+ QDict<CanvasChunk> m_chunks;
+ } m_chunkManager;
+
+ QValueList<CanvasChunk *> m_dirtyChunks;
+
+ QMap<CanvasItem *, QPtrList<CanvasChunk> > m_chunksByItem;
+ QPtrList<CanvasItem> m_items;
+
+ QDict<CanvasClipPath> m_clipPaths;
+
+ unsigned int m_viewportWidth, m_viewportHeight;
+ int m_width, m_height;
+ int m_chunkSizeHor, m_chunkSizeVer;
+
+ QPaintDevice *m_drawWindow;
+ QPaintDevice *m_directWindow;
+
+ float m_zoom;
+ QPoint m_pan;
+
+ GC m_gc;
+
+ T2P::Converter *m_fontContext;
+
+ unsigned char *m_buffer;
+ unsigned int m_nrChannels;
+
+ QColor m_backgroundColor;
+
+ bool m_immediateUpdate;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGHelper.cpp b/ksvg/core/KSVGHelper.cpp
new file mode 100644
index 00000000..86d111a6
--- /dev/null
+++ b/ksvg/core/KSVGHelper.cpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include "KSVGHelper.h"
+
+using namespace KSVG;
+
+bool KSVGHelper::m_initialised = false;
+
+int KSVGHelper::m_linearRGBFromsRGB[256];
+int KSVGHelper::m_sRGBFromLinearRGB[256];
+
+// Force initialisation of the lookup tables
+static KSVGHelper ksvgHelper;
+
+KSVGHelper::KSVGHelper()
+{
+ if(!m_initialised)
+ {
+ initialise();
+ m_initialised = true;
+ }
+}
+
+void KSVGHelper::initialise()
+{
+ // Set up linearRGB - sRGB conversion tables
+ for(int i = 0; i < 256; i++)
+ {
+ m_linearRGBFromsRGB[i] = calcLinearRGBFromsRGB(i);
+ m_sRGBFromLinearRGB[i] = calcSRGBFromLinearRGB(i);
+ }
+}
+
+int KSVGHelper::calcLinearRGBFromsRGB(int sRGB8bit)
+{
+ double sRGB = sRGB8bit / 255.0;
+ double linearRGB;
+
+ if(sRGB <= 0.04045)
+ linearRGB = sRGB / 12.92;
+ else
+ linearRGB = pow((sRGB + 0.055) / 1.055, 2.4);
+
+ return static_cast<int>(linearRGB * 255 + 0.5);
+}
+
+int KSVGHelper::calcSRGBFromLinearRGB(int linearRGB8bit)
+{
+ double linearRGB = linearRGB8bit / 255.0;
+ double sRGB;
+
+ if(linearRGB <= 0.0031308)
+ sRGB = linearRGB * 12.92;
+ else
+ sRGB = 1.055 * pow(linearRGB, 1 / 2.4) - 0.055;
+
+ return static_cast<int>(sRGB * 255 + 0.5);
+}
+
+extern "C"
+int linearRGBFromsRGB(int sRGB8bit)
+{
+ return KSVGHelper::linearRGBFromsRGB(sRGB8bit);
+}
+
+extern "C"
+int sRGBFromLinearRGB(int linearRGB8bit)
+{
+ return KSVGHelper::sRGBFromLinearRGB(linearRGB8bit);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGHelper.h b/ksvg/core/KSVGHelper.h
new file mode 100644
index 00000000..e310889f
--- /dev/null
+++ b/ksvg/core/KSVGHelper.h
@@ -0,0 +1,144 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGHelper_H
+#define KSVGHelper_H
+
+#ifdef __cplusplus
+
+#include <qcolor.h>
+#include <qvaluevector.h>
+#include "Affine.h"
+#include "Point.h"
+#include "SVGMatrixImpl.h"
+
+namespace KSVG
+{
+
+class KSVGHelper
+{
+public:
+ KSVGHelper();
+
+ static void matrixToAffine(SVGMatrixImpl *matrix, double affine[6])
+ {
+ affine[0] = matrix->a();
+ affine[1] = matrix->b();
+ affine[2] = matrix->c();
+ affine[3] = matrix->d();
+ affine[4] = matrix->e();
+ affine[5] = matrix->f();
+ }
+
+ static void matrixToAffine(const SVGMatrixImpl *matrix, double affine[6])
+ {
+ KSVGHelper::matrixToAffine(const_cast<SVGMatrixImpl *>(matrix), affine);
+ }
+
+ static void matrixToAffine(const SVGMatrixImpl *matrix, T2P::Affine &affine)
+ {
+ KSVGHelper::matrixToAffine(const_cast<SVGMatrixImpl *>(matrix), affine.data());
+ }
+
+ static void matrixToAffine(SVGMatrixImpl *matrix, T2P::Affine &affine)
+ {
+ KSVGHelper::matrixToAffine(matrix, affine.data());
+ }
+
+ static QString toColorString(QColor color)
+ {
+ int r = color.red();
+ int g = color.green();
+ int b = color.blue();
+
+ return "rgb(" + QString::number(r) + "," + QString::number(g) + "," + QString::number(b) + ")";
+ }
+
+ static unsigned int toArtColor(const QColor &color)
+ {
+ return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (qAlpha(color.rgb()));
+ }
+
+ static unsigned int toArtColor(const QColor &color, short opacity)
+ {
+ return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (opacity);
+ }
+
+ static int linearRGBFromsRGB(int sRGB8bit) { return m_linearRGBFromsRGB[sRGB8bit]; }
+ static int sRGBFromLinearRGB(int linearRGB8bit) { return m_sRGBFromLinearRGB[linearRGB8bit]; }
+
+private:
+ static void initialise();
+ static int calcLinearRGBFromsRGB(int sRGB8bit);
+ static int calcSRGBFromLinearRGB(int linearRGB8bit);
+
+ static bool m_initialised;
+
+ static int m_linearRGBFromsRGB[256];
+ static int m_sRGBFromLinearRGB[256];
+};
+
+typedef T2P::Point KSVGPoint;
+
+class KSVGPolygon
+{
+public:
+ KSVGPolygon() {}
+
+ void addPoint(const KSVGPoint& point) { m_points.append(point); }
+ void addPoint(double x, double y) { m_points.append(KSVGPoint(x, y)); }
+
+ KSVGPoint point(unsigned int index) const { return index < m_points.count() ? m_points[index] : KSVGPoint(); }
+
+ unsigned int numPoints() const { return m_points.count(); }
+ bool isEmpty() const { return m_points.isEmpty(); }
+
+ void clear() { m_points.clear(); }
+
+private:
+ QValueVector<KSVGPoint> m_points;
+};
+
+class KSVGRectangle : public KSVGPolygon
+{
+public:
+ KSVGRectangle() { addPoint(0, 0); addPoint(0, 0); addPoint(0, 0); addPoint(0, 0); }
+
+ // Convenience constructor for an axis-aligned rectangle
+ KSVGRectangle(double x, double y, double width, double height)
+ { addPoint(KSVGPoint(x, y)); addPoint(KSVGPoint(x, y + height)); addPoint(KSVGPoint(x + width, y + height)); addPoint(KSVGPoint(x + width, y)); }
+
+};
+}
+
+extern "C"
+{
+#endif // __cplusplus
+
+int linearRGBFromsRGB(int sRGB8bit);
+int sRGBFromLinearRGB(int linearRGB8bit);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGLoader.cpp b/ksvg/core/KSVGLoader.cpp
new file mode 100644
index 00000000..7f7591d7
--- /dev/null
+++ b/ksvg/core/KSVGLoader.cpp
@@ -0,0 +1,449 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qxml.h>
+#include <qfile.h>
+#include <qimage.h>
+#include <qbuffer.h>
+
+#include <kurl.h>
+#include <kdebug.h>
+#include <kio/job.h>
+#include <kfilterdev.h>
+#include <kio/netaccess.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGImageElementImpl.h"
+
+#include "KSVGLoader.moc"
+
+using namespace KSVG;
+
+KSVGLoader::KSVGLoader() : m_data(0)
+{
+ m_job = 0;
+}
+
+KSVGLoader::~KSVGLoader()
+{
+}
+
+QString KSVGLoader::loadXML(::KURL url)
+{
+ QString tmpFile;
+ if(KIO::NetAccess::download(url, tmpFile, 0))
+ {
+ QIODevice *dev = KFilterDev::deviceForFile(tmpFile, "application/x-gzip", true);
+ QByteArray contents;
+ if(dev->open(IO_ReadOnly))
+ contents = dev->readAll();
+ delete dev;
+ KIO::NetAccess::removeTempFile(tmpFile);
+ return QString(contents);
+ }
+
+ return QString::null;
+}
+
+void KSVGLoader::getSVGContent(::KURL url)
+{
+ if(!url.prettyURL().isEmpty())
+ {
+ if(m_job == 0)
+ m_job = KIO::get(url, false, false);
+
+ m_job->setAutoErrorHandlingEnabled(true);
+
+ connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
+ connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ }
+}
+
+void KSVGLoader::newImageJob(SVGImageElementImpl *image, ::KURL baseURL)
+{
+ if(image && image->fileName().isEmpty())
+ {
+ kdDebug(26001) << "Image Element has no URL!" << endl;
+ return;
+ }
+
+ ImageStreamMap *map = new ImageStreamMap();
+ map->data = new QByteArray();
+ map->imageElement = image;
+
+ KIO::TransferJob *imageJob = KIO::get(::KURL(baseURL, map->imageElement->fileName()), false, false);
+ connect(imageJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
+ connect(imageJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+
+ m_imageJobs.insert(imageJob, map);
+}
+
+void KSVGLoader::slotData(KIO::Job *job, const QByteArray &data)
+{
+ if(job == m_job)
+ {
+ QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
+ dataStream.writeRawBytes(data.data(), data.size());
+ }
+ else
+ {
+ QMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
+ for(it = m_imageJobs.begin(); it != m_imageJobs.end(); ++it)
+ {
+ if(it.key() == job)
+ {
+ QDataStream dataStream(*(it.data())->data, IO_WriteOnly | IO_Append);
+ dataStream.writeRawBytes(data.data(), data.size());
+ break;
+ }
+ }
+ }
+}
+
+void KSVGLoader::slotResult(KIO::Job *job)
+{
+ if(job == m_job)
+ {
+ if(m_job->error() == 0)
+ {
+ QString check = static_cast<KIO::TransferJob *>(job)->url().prettyURL();
+ if(check.contains(".svgz") || check.contains(".svg.gz"))
+ {
+ // decode the gzipped svg and emit it
+ QIODevice *dev = KFilterDev::device(new QBuffer(m_data), "application/x-gzip");
+ dev->open(IO_ReadOnly);
+ emit gotResult(dev);
+ }
+ else
+ {
+ m_job = 0;
+ emit gotResult(new QBuffer(m_data));
+ m_data.resize(0);
+ }
+ }
+ }
+ else if(m_postUrlData.job == job)
+ {
+ // Notify that we're done
+ KJS::List callBackArgs;
+ callBackArgs.append(*m_postUrlData.status);
+
+ m_postUrlData.status->put(m_postUrlData.exec, KJS::Identifier("success"), KJS::Boolean(true));
+ m_postUrlData.callBackFunction->call(m_postUrlData.exec, *m_postUrlData.callBackFunction, callBackArgs);
+ }
+ else
+ {
+ QMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
+ for(it = m_imageJobs.begin(); it != m_imageJobs.end(); ++it)
+ {
+ if(it.key() == job)
+ {
+ ImageStreamMap *streamMap = it.data();
+
+ QBuffer buffer(*(streamMap->data));
+
+ if(buffer.open(IO_ReadOnly))
+ {
+ const char *imageFormat = QImageIO::imageFormat(&buffer);
+
+ if(imageFormat != 0)
+ {
+ QImageIO imageIO(&buffer, imageFormat);
+
+ // Gamma correction
+ imageIO.setGamma(1/0.45454);
+
+ if(imageIO.read())
+ {
+ QImage *image = new QImage(imageIO.image());
+ image->detach();
+ (streamMap->imageElement)->setImage(image);
+ }
+ }
+
+ buffer.close();
+ }
+
+ (streamMap->data)->resize(0);
+
+ m_imageJobs.remove(static_cast<KIO::TransferJob *>(job));
+
+ emit imageReady(streamMap->imageElement);
+ break;
+ }
+ }
+ }
+}
+
+QString KSVGLoader::getUrl(::KURL url, bool local)
+{
+ // Security issue: Only retrieve http and https
+ if(local || (!url.prettyURL().isEmpty()) && ((url.protocol() == "http") || (url.protocol() == "https")))
+ return loadXML(url);
+
+ return QString::null;
+}
+
+void KSVGLoader::postUrl(::KURL url, const QByteArray &data, const QString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status)
+{
+ KIO::TransferJob *job = KIO::http_post(url, data, false);
+ job->addMetaData("content-type", mimeType);
+
+ m_postUrlData.job = job;
+ m_postUrlData.exec = exec;
+ m_postUrlData.status = &status;
+ m_postUrlData.callBackFunction = &callBackFunction;
+
+ connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+}
+
+class CharacterDataSearcher : public QXmlDefaultHandler
+{
+public:
+ CharacterDataSearcher(const QString &id) : m_id(id) { }
+
+ virtual bool startDocument()
+ {
+ m_foundCount = 0;
+ return true;
+ }
+
+ virtual bool startElement(const QString &, const QString &, const QString &qName, const QXmlAttributes &atts)
+ {
+ kdDebug(26001) << "CharacterDataSearcher::startElement, qName " << qName << endl;
+
+ int pos = atts.index("id");
+ if(pos > -1 && atts.value(pos) == m_id)
+ {
+ m_foundCount++;
+ m_tagFound = qName;
+ }
+
+ return true;
+ }
+
+ virtual bool endElement(const QString &, const QString &, const QString &qName)
+ {
+ if(m_tagFound == qName && m_foundCount > 0)
+ {
+ m_foundCount--;
+ if(m_foundCount == 0)
+ return false; // done!
+ }
+
+ return true;
+ }
+
+ virtual bool characters(const QString &ch)
+ {
+ kdDebug(26001) << "CharacterDataSearcher::characters, read " << ch.latin1() << endl;
+
+ if(m_tagFound != 0)
+ m_result += ch;
+
+ return true;
+ }
+
+ QString result() { return m_result; }
+
+private:
+ QString m_id, m_result, m_tagFound;
+ int m_foundCount;
+};
+
+QString KSVGLoader::getCharacterData(::KURL url, const QString &id)
+{
+ QXmlSimpleReader reader;
+
+ CharacterDataSearcher searcher(id);
+ reader.setContentHandler(&searcher);
+ reader.setErrorHandler(&searcher);
+
+ QString s = loadXML(url);
+
+ QXmlInputSource source;
+ source.setData(s);
+
+ reader.parse(&source);
+
+ return searcher.result();
+}
+
+
+
+class SVGFragmentSearcher : public QXmlDefaultHandler
+{
+public:
+ SVGFragmentSearcher(SVGDocumentImpl *doc, const QString &id, ::KURL url) : m_id(id), m_url(url), m_doc(doc) { }
+
+ virtual bool startDocument()
+ {
+ m_result = 0;
+ m_currentNode = 0;
+
+ return true;
+ }
+
+ virtual bool startElement(const QString &namespaceURI, const QString &, const QString &qName, const QXmlAttributes &attrs)
+ {
+ kdDebug(26001) << "SVGFragmentSearcher::startElement, namespaceURI " << namespaceURI << ", qName " << qName << endl;
+ bool parse = m_result;
+ if(!parse)
+ {
+ int pos = attrs.index("id");
+ if(pos > -1 && attrs.value(pos) == m_id)
+ parse = true;
+ }
+
+ if(parse)
+ {
+ DOM::Element impl = static_cast<DOM::Document *>(m_doc)->createElementNS(namespaceURI, qName);
+ SVGElementImpl *newElement = SVGDocumentImpl::createElement(qName, impl, m_doc);
+ newElement->setViewportElement(m_doc->rootElement());
+
+ if(m_currentNode)
+ m_currentNode->appendChild(*newElement);
+ else
+ m_result = newElement;
+
+ QXmlAttributes newAttrs;
+
+ for(int i = 0; i < attrs.count(); i++)
+ {
+ QString name = attrs.localName(i);
+ QString value = attrs.value(i);
+
+ if(name == "id")
+ {
+ value = "@fragment@" + m_url.prettyURL() + "@" + value;
+ m_idMap[value] = newElement;
+ }
+ else
+ if(name == "href")
+ {
+ value.stripWhiteSpace();
+
+ if(value.startsWith("#"))
+ {
+ value.remove(0, 1);
+
+ // Convert the id to its mangled version.
+ QString id = "@fragment@" + m_url.prettyURL() + "@" + value;
+
+ if(m_idMap.contains(id))
+ {
+ // This is a local reference to an element within the fragment.
+ // Just convert the href.
+ value = id;
+ }
+ else
+ {
+ // This is a local reference to an id outside of the fragment.
+ // Change it into an absolute href.
+ value = m_url.prettyURL() + "#" + value;
+ }
+ }
+ }
+
+ newAttrs.append(attrs.qName(i), attrs.uri(i), attrs.localName(i), value);
+ }
+
+ newElement->setAttributes(newAttrs);
+ m_currentNode = newElement;
+ }
+
+ return true;
+ }
+
+ virtual bool endElement(const QString &, const QString &, const QString &)
+ {
+ if(m_result)
+ {
+ m_parentNode = m_currentNode->parentNode();
+
+ if(m_parentNode.isNull())
+ return false; // done!
+
+ m_currentNode = &m_parentNode;
+ }
+
+ return true;
+ }
+
+ virtual bool characters(const QString &ch)
+ {
+ kdDebug(26001) << "SVGFragmentSearcher::characters, read " << ch.latin1() << endl;
+
+ if(m_result)
+ {
+ SVGElementImpl *element = m_result->ownerDoc()->getElementFromHandle(m_currentNode->handle());
+ if(element)
+ {
+ QString t = ch;
+
+ SVGLangSpaceImpl *langSpace = dynamic_cast<SVGLangSpaceImpl *>(element);
+ if(langSpace)
+ t = langSpace->handleText(ch);
+
+ if(!t.isEmpty())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(m_result->ownerDoc())->createTextNode(t);
+ element->appendChild(impl);
+ }
+ }
+ }
+
+ return true;
+ }
+
+ SVGElementImpl *result() { return m_result; }
+
+private:
+ QString m_id;
+ ::KURL m_url;
+
+ SVGDocumentImpl *m_doc;
+ SVGElementImpl *m_result;
+
+ DOM::Node *m_currentNode, m_parentNode;
+ QMap<QString, SVGElementImpl *> m_idMap;
+};
+
+SVGElementImpl *KSVGLoader::getSVGFragment(::KURL url, SVGDocumentImpl *doc, const QString &id)
+{
+ QXmlSimpleReader reader;
+
+ kdDebug(26001) << "getSVGFragment: " << url.prettyURL() << "#" << id << endl;
+ SVGFragmentSearcher searcher(doc, id, url);
+ reader.setContentHandler(&searcher);
+ reader.setErrorHandler(&searcher);
+
+ QString s = loadXML(url);
+
+ QXmlInputSource source;
+ source.setData(s);
+
+ reader.parse(&source);
+
+ return searcher.result();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGLoader.h b/ksvg/core/KSVGLoader.h
new file mode 100644
index 00000000..d0418411
--- /dev/null
+++ b/ksvg/core/KSVGLoader.h
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGLoader_H
+#define KSVGLoader_H
+
+#include <qobject.h>
+
+class KURL;
+
+namespace KIO
+{
+ class Job;
+ class TransferJob;
+}
+
+namespace KJS
+{
+ class Object;
+ class ExecState;
+}
+
+namespace KSVG
+{
+
+struct ImageStreamMap;
+
+typedef struct
+{
+ KIO::Job *job;
+ KJS::ExecState *exec;
+ KJS::Object *callBackFunction, *status;
+} PostUrlData;
+
+class SVGImageElementImpl;
+class SVGElementImpl;
+class SVGDocumentImpl;
+class KSVGLoader : public QObject
+{
+Q_OBJECT
+public:
+ KSVGLoader();
+ ~KSVGLoader();
+
+ void getSVGContent(::KURL url);
+ void newImageJob(SVGImageElementImpl *impl, ::KURL url);
+
+ static QString getUrl(::KURL url, bool local = false);
+ void postUrl(::KURL url, const QByteArray &data, const QString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status);
+ static QString getCharacterData(::KURL url, const QString &id);
+ static SVGElementImpl *getSVGFragment(::KURL, SVGDocumentImpl *doc, const QString &id);
+
+signals:
+ void gotResult(QIODevice *);
+ void imageReady(SVGImageElementImpl *);
+
+private slots:
+ void slotData(KIO::Job *, const QByteArray &);
+ void slotResult(KIO::Job *);
+
+private:
+ static QString loadXML(::KURL);
+
+ PostUrlData m_postUrlData;
+
+ QByteArray m_data;
+ KIO::TransferJob *m_job;
+ QMap<KIO::TransferJob *, ImageStreamMap *> m_imageJobs;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGReader.cc b/ksvg/core/KSVGReader.cc
new file mode 100644
index 00000000..dd73e420
--- /dev/null
+++ b/ksvg/core/KSVGReader.cc
@@ -0,0 +1,500 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <dom/dom_exception.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <qmap.h>
+#include <ksimpleconfig.h>
+#include <KSVGCanvas.h>
+#include "KSVGReader.moc"
+#include "SVGSVGElementImpl.h"
+#include "SVGViewSpecImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGLengthImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGUseElementImpl.h"
+
+namespace KSVG
+{
+
+class Helper
+{
+public:
+ static Helper *self(KSVGReader *reader = 0);
+
+ void destroy();
+
+ void setFit(bool bFit = true) { m_bFit = bFit; }
+ bool fit() { return m_bFit; }
+
+ SVGDocumentImpl *doc() const { return m_reader->doc(); }
+ KSVGCanvas *canvas() const { return m_reader->canvas(); }
+
+ void addSVGElement(SVGSVGElementImpl *one, DOM::NodeImpl *two) { m_svgMap.insert(two, one); }
+ SVGSVGElementImpl *nextSVGElement(SVGElementImpl *elem);
+ SVGSVGElementImpl *nextSVGElement(DOM::Node elem);
+ void setFinished(bool error, const QString &errorDesc = "") { m_reader->setFinished(error, errorDesc); }
+
+ // Error handling
+ void setErrorDescription(const QString &err) { m_errorDesc = err; }
+ QString errorDescription() { return m_errorDesc; }
+ bool hasError() const { return !m_errorDesc.isEmpty(); }
+
+ bool getURLMode() const { return m_getURLMode; }
+ void setGetURLMode(bool mode) { m_getURLMode = mode; }
+
+ QString SVGFragmentId() const { return m_SVGFragmentId; }
+ void setSVGFragmentId(const QString &SVGFragmentId) { m_SVGFragmentId = SVGFragmentId; }
+
+protected:
+ Helper(KSVGReader *reader);
+
+private:
+ Helper();
+ Helper(const Helper &rhs);
+ Helper &operator=(const Helper &rhs);
+
+ static Helper *m_instance;
+ QMap<DOM::NodeImpl *, SVGSVGElementImpl *> m_svgMap;
+ KSVGReader *m_reader;
+ bool m_bFit;
+ bool m_getURLMode;
+ QString m_errorDesc;
+ QString m_SVGFragmentId;
+};
+
+class InputHandler : public QXmlDefaultHandler
+{
+public:
+ virtual bool startDocument();
+ virtual bool endDocument();
+ virtual bool startElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName,
+ const QXmlAttributes &atts);
+ virtual bool endElement(const QString &namespaceURI,
+ const QString &localName,
+ const QString &qName);
+ virtual bool characters(const QString &ch);
+ virtual bool warning(const QXmlParseException &e);
+ virtual bool error(const QXmlParseException &e);
+ virtual bool fatalError(const QXmlParseException &e);
+
+private:
+ DOM::Node *m_rootNode;
+ DOM::Node *m_currentNode;
+ DOM::Node m_parentNode;
+
+ bool m_noRendering, m_progressive;
+};
+
+}
+
+using namespace KSVG;
+
+Helper *Helper::m_instance = 0;
+
+Helper::Helper(KSVGReader *reader)
+{
+ m_reader = reader;
+}
+
+Helper *Helper::self(KSVGReader *reader)
+{
+ if(m_instance && reader != 0)
+ m_instance->m_reader = reader;
+ if(!m_instance)
+ {
+ Q_ASSERT(reader != 0);
+ m_instance = new Helper(reader);
+ }
+
+ return m_instance;
+}
+
+void Helper::destroy()
+{
+ m_svgMap.clear();
+}
+
+SVGSVGElementImpl *Helper::nextSVGElement(SVGElementImpl *elem)
+{
+ return nextSVGElement(*elem);
+}
+
+SVGSVGElementImpl *Helper::nextSVGElement(DOM::Node elem)
+{
+ DOM::Node foundSVG;
+ DOM::Node shape = elem.parentNode();
+
+ for(; !shape.isNull(); shape = shape.parentNode())
+ {
+ if(reinterpret_cast<DOM::Element &>(shape).nodeName() == "svg")
+ {
+ foundSVG = shape;
+ break;
+ }
+ }
+
+ SVGSVGElementImpl *svg = m_svgMap[foundSVG.handle()];
+ return svg;
+}
+
+bool InputHandler::startDocument()
+{
+ m_rootNode = 0;
+ m_currentNode = 0;
+ m_noRendering = false;
+
+ KSimpleConfig config("ksvgpluginrc");
+ config.setGroup("Rendering");
+ m_progressive = config.readBoolEntry("ProgressiveRendering", true);
+
+ if(Helper::self()->canvas())
+ Helper::self()->canvas()->setImmediateUpdate(m_progressive);
+
+ return true;
+}
+
+bool InputHandler::endDocument()
+{
+ Helper::self()->setFinished(false);
+ if (Helper::self()->canvas())
+ Helper::self()->canvas()->setImmediateUpdate(false);
+
+ return true;
+}
+
+bool InputHandler::characters(const QString &ch)
+{
+ kdDebug(26001) << "InputHandler::characters, read " << ch << endl;
+
+ if(ch.simplifyWhiteSpace().isEmpty())
+ return true;
+
+ QString t = ch;
+
+ SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode);
+ if(root)
+ {
+ SVGElementImpl *element = root->ownerDoc()->getElementFromHandle(m_currentNode->handle());
+ SVGLangSpaceImpl *langSpace = dynamic_cast<SVGLangSpaceImpl *>(element);
+
+ if(langSpace)
+ t = langSpace->handleText(ch);
+ }
+
+ if(!t.isEmpty())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(Helper::self()->doc())->createTextNode(t);
+ m_currentNode->appendChild(impl);
+ }
+
+ return true;
+}
+
+bool InputHandler::startElement(const QString &namespaceURI, const QString &, const QString &qName, const QXmlAttributes &attrs)
+{
+ kdDebug(26001) << "InputHandler::startElement, namespaceURI " << namespaceURI << " qName " << qName << endl;
+
+ SVGElementImpl *newElement = 0;
+ SVGSVGElementImpl *svg = 0;
+
+ if(qName == "svg")
+ {
+ DOM::Element impl = static_cast<DOM::Document *>(Helper::self()->doc())->createElementNS(namespaceURI, qName);
+ newElement = SVGDocumentImpl::createElement(qName, impl, Helper::self()->doc());
+ svg = dynamic_cast<SVGSVGElementImpl *>(newElement);
+
+ Helper::self()->addSVGElement(svg, impl.handle());
+
+ // Need this before we can find our ownerSVGElement (AP)
+ if(m_currentNode != 0)
+ m_currentNode->appendChild(*svg);
+ else
+ // TODO: Those set/get attribute callls have NO effect anymore
+ // Convert to the new system, Rob? (Niko)
+ {
+ if(Helper::self()->fit())
+ { // handle fitting of svg into small drawing area(thumb)
+ // TODO : aspectratio? and what about svgs that dont provide width and height?
+ if(svg->getAttribute("viewBox").string().isEmpty())
+ {
+ SVGLengthImpl *width = SVGSVGElementImpl::createSVGLength();
+ SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength();
+ width->setValueAsString(svg->getAttribute("width").string());
+ height->setValueAsString(svg->getAttribute("height").string());
+ QString viewbox = QString("0 0 %1 %2").arg(width->value()).arg(height->value());
+ //kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl;
+ svg->setAttribute("viewBox", viewbox);
+ width->deref();
+ height->deref();
+ }
+ svg->setAttribute("width", QString::number(Helper::self()->canvas()->width()));
+ svg->setAttribute("height", QString::number(Helper::self()->canvas()->height()));
+ }
+
+ if(!Helper::self()->SVGFragmentId().isEmpty())
+ {
+ if(svg->currentView()->parseViewSpec(Helper::self()->SVGFragmentId()))
+ svg->setUseCurrentView(true);
+ }
+ }
+
+ if(m_rootNode == 0)
+ {
+ Helper::self()->doc()->appendChild(*svg);
+ Helper::self()->doc()->setRootElement(svg);
+
+ m_rootNode = svg;
+ }
+ }
+ else
+ {
+ if(!m_rootNode && !Helper::self()->getURLMode())
+ {
+ Helper::self()->setErrorDescription(i18n("A legal svg document requires a <svg> root element"));
+ return false;
+ }
+
+ DOM::Element impl = static_cast<DOM::Document *>(Helper::self()->doc())->createElementNS(namespaceURI, qName);
+ newElement = SVGDocumentImpl::createElement(qName, impl, Helper::self()->doc());
+
+ // m_currentNode == 0 if we are dynamically extending the dom (parsexml...)
+ // and the file doesn't have a root element
+ if(m_currentNode != 0)
+ m_currentNode->appendChild(*newElement);
+ else
+ Helper::self()->doc()->appendChild(*newElement);
+
+ // Special logics:
+ if(qName == "switch" || qName == "pattern" || qName == "mask")
+ m_noRendering = true;
+ }
+
+ newElement->setOwnerSVGElement(Helper::self()->nextSVGElement(newElement));
+ newElement->setViewportElement(newElement->ownerSVGElement());
+
+ newElement->setAttributes(attrs);
+
+ if(svg && svg->ownerSVGElement() == 0)
+ {
+ SVGImageElementImpl *parentImage = Helper::self()->doc()->parentImage();
+
+ if(parentImage)
+ {
+ // We're being displayed in a document via an 'image' element. Set
+ // us up to fit into it's rectangle.
+ parentImage->setupSVGElement(svg);
+ }
+ }
+
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(newElement);
+
+ if(locatable)
+ {
+ // Set up the cached screenCTM
+ SVGLocatableImpl *locatableParent = 0;
+ DOM::Node parentNode = newElement->parentNode();
+
+ if(!parentNode.isNull())
+ {
+ SVGElementImpl *parent = Helper::self()->doc()->getElementFromHandle(parentNode.handle());
+
+ if(parent)
+ locatableParent = dynamic_cast<SVGLocatableImpl *>(parent);
+ }
+
+ SVGMatrixImpl *parentMatrix = 0;
+
+ if(locatableParent)
+ parentMatrix = locatableParent->getScreenCTM();
+ else
+ parentMatrix = SVGSVGElementImpl::createSVGMatrix();
+
+ locatable->updateCachedScreenCTM(parentMatrix);
+ parentMatrix->deref();
+ }
+
+ m_currentNode = newElement;
+ return !Helper::self()->hasError();
+}
+
+bool InputHandler::endElement(const QString &, const QString &, const QString &qName)
+{
+ kdDebug(26001) << "InputHandler::endElement, qName " << qName << endl;
+
+ bool haveCanvas = Helper::self()->canvas();
+
+ SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode);
+ SVGElementImpl *element = root ? root->ownerDoc()->getElementFromHandle(m_currentNode->handle()) : Helper::self()->doc()->getElementFromHandle(m_currentNode->handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ if(qName != "script" && !m_noRendering && !Helper::self()->getURLMode())
+ {
+ if(!root)
+ {
+ if(haveCanvas)
+ {
+ if(!m_progressive)
+ Helper::self()->canvas()->update();
+
+ Helper::self()->canvas()->blit();
+
+ QValueList<SVGUseElementImpl *> forwardReferencingUseElements = Helper::self()->doc()->forwardReferencingUseElements();
+
+ if(!forwardReferencingUseElements.isEmpty())
+ {
+ // Create the elements again now that we have parsed the whole document.
+ QValueList<SVGUseElementImpl *>::iterator it;
+
+ Helper::self()->canvas()->setImmediateUpdate(false);
+
+ for(it = forwardReferencingUseElements.begin(); it != forwardReferencingUseElements.end(); it++)
+ (*it)->createItem(Helper::self()->canvas());
+
+ // The newly created items will need to be moved into their correct z-order positions.
+ Helper::self()->doc()->resortZIndicesOnFinishedLoading();
+ }
+ }
+
+ return true; // we have reached the bottom
+ }
+
+ if(haveCanvas && (tests ? tests->ok() : true))
+ {
+ if((shape && !shape->isContainer()) || (!shape && element))
+ element->createItem();
+ }
+ }
+
+ // Special logics:
+ if(qName == "switch" || qName == "pattern" || qName == "mask")
+ {
+ m_noRendering = false;
+ bool ok = tests ? tests->ok() : true;
+
+ if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (shape && shape->directRender()))
+ element->createItem();
+ }
+
+ m_parentNode = m_currentNode->parentNode(); // this is needed since otherwise we get temporary vars
+ m_currentNode = &m_parentNode;
+
+ return true;
+}
+
+bool InputHandler::warning(const QXmlParseException &e)
+{
+ kdDebug(26001) << "[" << e.lineNumber() << ":" << e.columnNumber() << "]: WARNING: " << e.message() << endl;
+ return true;
+}
+
+bool InputHandler::error(const QXmlParseException &e)
+{
+ kdDebug(26001) << "[" << e.lineNumber() << ":" << e.columnNumber() << "]: ERROR: " << e.message() << endl;
+ return true;
+}
+
+bool InputHandler::fatalError(const QXmlParseException &e)
+{
+ QString error;
+
+ if(Helper::self()->hasError())
+ {
+ error = Helper::self()->errorDescription();
+ Helper::self()->setErrorDescription(QString::null);
+ }
+ else
+ error = QString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message());
+
+ kdDebug(26001) << "InputHandler::fatalError, " << error << endl;
+
+ Helper::self()->setFinished(true, error);
+ return true;
+}
+
+struct KSVGReader::Private
+{
+ QXmlSimpleReader *reader;
+ InputHandler *inputHandler;
+ SVGDocumentImpl *doc;
+ KSVGCanvas *canvas;
+};
+
+KSVGReader::KSVGReader(SVGDocumentImpl *doc, KSVGCanvas *canvas, ParsingArgs args) : QObject(), d(new Private)
+{
+ d->doc = doc;
+ d->canvas = canvas;
+
+ d->reader = new QXmlSimpleReader();
+ d->inputHandler = new InputHandler();
+
+ Helper::self(this);
+ Helper::self()->setFit(args.fit);
+ Helper::self()->setGetURLMode(args.getURLMode);
+ Helper::self()->setSVGFragmentId(args.SVGFragmentId);
+
+ d->reader->setContentHandler(d->inputHandler);
+ d->reader->setErrorHandler(d->inputHandler);
+}
+
+KSVGReader::~KSVGReader()
+{
+ Helper::self()->destroy();
+
+ delete d->reader;
+ delete d->inputHandler;
+ delete d;
+}
+
+void KSVGReader::parse(QXmlInputSource *source)
+{
+ d->reader->parse(source);
+}
+
+void KSVGReader::finishParsing(bool, const QString &errorDesc)
+{
+ Helper::self()->setErrorDescription(errorDesc);
+}
+
+void KSVGReader::setFinished(bool error, const QString &errorDesc)
+{
+ kdDebug(26001) << "KSVGReader::setFinished" << endl;
+ emit finished(error, errorDesc);
+}
+
+SVGDocumentImpl *KSVGReader::doc()
+{
+ return d->doc;
+}
+
+KSVG::KSVGCanvas *KSVGReader::canvas()
+{
+ return d->canvas;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGReader.h b/ksvg/core/KSVGReader.h
new file mode 100644
index 00000000..722720e1
--- /dev/null
+++ b/ksvg/core/KSVGReader.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGReader_H
+#define KSVGReader_H
+
+#include <qxml.h>
+#include <qobject.h>
+
+namespace KSVG
+{
+
+class SVGDocumentImpl;
+class KSVGReader : public QObject
+{
+Q_OBJECT
+public:
+ struct ParsingArgs
+ {
+ bool fit;
+ bool getURLMode;
+
+ QString SVGFragmentId;
+ };
+
+ KSVGReader(SVGDocumentImpl *doc, KSVGCanvas *canvas, ParsingArgs args);
+ virtual ~KSVGReader();
+
+ void parse(QXmlInputSource *source);
+ void finishParsing(bool, const QString &);
+
+signals:
+ void finished(bool, const QString &);
+
+protected:
+ friend class Helper;
+
+ SVGDocumentImpl *doc();
+ KSVGCanvas *canvas();
+
+ void setFinished(bool error, const QString &errorDesc = 0);
+
+private:
+ struct Private;
+ Private *d;
+};
+
+}
+
+#endif
diff --git a/ksvg/core/KSVGTextChunk.cpp b/ksvg/core/KSVGTextChunk.cpp
new file mode 100644
index 00000000..b8eddcad
--- /dev/null
+++ b/ksvg/core/KSVGTextChunk.cpp
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTextContentElementImpl.h"
+#include "SVGTextPositioningElementImpl.h"
+#include "KSVGTextChunk.h"
+
+using namespace KSVG;
+
+// Text chunks (class to store text data)
+KSVGTextChunk::KSVGTextChunk()
+{
+}
+
+KSVGTextChunk::~KSVGTextChunk()
+{
+}
+
+unsigned int KSVGTextChunk::count() const
+{
+ return m_text.count();
+}
+
+QString KSVGTextChunk::getText(unsigned int index) const
+{
+ return m_text[index];
+}
+
+SVGTextPositioningElementImpl *KSVGTextChunk::getTextElement(unsigned int index)
+{
+ SVGTextContentElementImpl *content = getTextContentElement(index);
+ return dynamic_cast<SVGTextPositioningElementImpl *>(content);
+}
+
+SVGTextContentElementImpl *KSVGTextChunk::getTextContentElement(unsigned int index)
+{
+ return m_textElements.at(index);
+}
+
+void KSVGTextChunk::clear()
+{
+ m_text.clear();
+ m_textElements.clear();
+}
+
+void KSVGTextChunk::addText(const QString &text, SVGTextContentElementImpl *textElement)
+{
+ m_text.append(text);
+ m_textElements.append(textElement);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/core/KSVGTextChunk.h b/ksvg/core/KSVGTextChunk.h
new file mode 100644
index 00000000..d684087a
--- /dev/null
+++ b/ksvg/core/KSVGTextChunk.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGTEXTCHUNK_H
+#define KSVGTEXTCHUNK_H
+
+#include <qstringlist.h>
+
+namespace KSVG
+{
+
+class SVGTextContentElementImpl;
+class SVGTextPositioningElementImpl;
+class KSVGTextChunk
+{
+public:
+ KSVGTextChunk();
+ ~KSVGTextChunk();
+
+ unsigned int count() const;
+ QString getText(unsigned int index) const;
+ SVGTextPositioningElementImpl *getTextElement(unsigned int index);
+ SVGTextContentElementImpl *getTextContentElement(unsigned int index);
+
+ void clear();
+ void addText(const QString &text, SVGTextContentElementImpl *textElement);
+
+private:
+ QStringList m_text;
+ QPtrList<SVGTextContentElementImpl> m_textElements;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/core/Makefile.am b/ksvg/core/Makefile.am
new file mode 100644
index 00000000..e1867428
--- /dev/null
+++ b/ksvg/core/Makefile.am
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = libksvgcore.la
+
+libksvgcore_la_SOURCES = KSVGLoader.cpp KSVGCanvas.cpp KSVGReader.cc KSVGTextChunk.cpp CanvasFactory.cpp CanvasItems.cpp KSVGHelper.cpp DocumentFactory.cpp
+libksvgcore_la_METASOURCES = AUTO
+
+servicetypedir = $(kde_servicetypesdir)
+servicetype_DATA = ksvgrenderer.desktop
+
+ksvginclude_HEADERS = KSVGCanvas.h CanvasItems.h CanvasItem.h CanvasFactory.h DocumentFactory.h
+ksvgincludedir = $(includedir)/ksvg
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+INCLUDES = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+
+KDE_OPTIONS = nofinal
+
diff --git a/ksvg/core/ksvgrenderer.desktop b/ksvg/core/ksvgrenderer.desktop
new file mode 100644
index 00000000..f9307621
--- /dev/null
+++ b/ksvg/core/ksvgrenderer.desktop
@@ -0,0 +1,56 @@
+[Desktop Entry]
+Type=ServiceType
+X-KDE-ServiceType=KSVG/Renderer
+X-KDE-Derived=
+Comment=KSVG Rendering Backend
+Comment[ar]=خلÙية رسم KSVG
+Comment[bs]=KSVG renderiranje
+Comment[ca]=Representació en segon pla de KSVG
+Comment[cs]=Vykreslovací nástroj KSVG
+Comment[cy]=Ôl-wyneb Llunio KSVG
+Comment[da]=Underliggende program for KSVG-visning
+Comment[de]=KSVG-Darstellungsmodul
+Comment[el]=ΣÏστημα υποστήÏιξης αποτÏπωσης του KSVG
+Comment[es]=Motor de procesado de KSVG
+Comment[et]=KSVG renderdamise taustarakendus
+Comment[eu]=KSVG errendatze programa
+Comment[fa]=پایانۀ پشتیبانی پرداخت KSVG
+Comment[fi]=KSVG-piirtäjän taustaohjelma
+Comment[fr]=Moteur de rendu KSVG
+Comment[ga]=Inneall Rindreála KSVG
+Comment[gl]=Backend de Renderizado KSVG
+Comment[he]=מנוע רינדור KSVG
+Comment[hi]=के-à¤à¤¸à¤µà¥€à¤œà¥€ रेंडरिंग बैकà¤à¤£à¥à¤¡
+Comment[hu]=KSVG megjelenítőmotor
+Comment[is]=KSVG teiknari
+Comment[it]=Backend di KSVG per il rendering
+Comment[ja]=KSVG レンダリングãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰
+Comment[kk]=KSVG кеÑкіндеу бағдарламаÑÑ‹
+Comment[km]=កម្មវិធី​សម្រាប់​បង្ហាញ KSVG
+Comment[lt]=KSVG atkūrimo programinė sąsaja
+Comment[ms]=Tepi Belakang Menrealisasi KSVG
+Comment[nb]=Modul for KSVG-tegning
+Comment[nds]=KSVG-Dorstellhölper
+Comment[ne]=KSVG रेनà¥à¤¡à¤°à¤¿à¤™ बà¥à¤¯à¤¾à¤•à¤‡à¤¨à¥à¤¡
+Comment[nl]=KSVG weergavecomponent
+Comment[nn]=Modul for KSVG-teikning
+Comment[pl]=Narzędzie do renderowania KSVG
+Comment[pt]=Infra-Estrutura de Desenho KSVG
+Comment[pt_BR]=Estrutura de Renderização do KSVG
+Comment[ro]=Motorul de randare KSVG
+Comment[ru]=Движок прориÑовки KSVG
+Comment[sk]=Nástroj pre zobrazovanie KSVG
+Comment[sl]=Izrisovalnik KSVG
+Comment[sr]=KSVG-ов позадинÑки ÑиÑтем за рендеровање
+Comment[sr@Latn]=KSVG-ov pozadinski sistem za renderovanje
+Comment[sv]=KSVG-uppritningsmodul
+Comment[ta]=KSVG வழஙà¯à®•à¯à®®à¯ பின௠அமைபà¯à®ªà¯
+Comment[tg]=Лағжандаи таÑовироти KSVG
+Comment[tr]=KSVG Tarama Arkayüzü
+Comment[uk]=Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ KSVG
+Comment[zh_CN]=KSVG 渲染åŽç«¯
+Comment[zh_HK]=KSVG åˆæˆå¾Œç«¯
+Comment[zh_TW]=KSVG 上色後端介é¢
+
+[PropertyDef::X-KSVG-InternalName]
+Type=QString
diff --git a/ksvg/data/SVGAElementImpl.lut.h b/ksvg/data/SVGAElementImpl.lut.h
new file mode 100644
index 00000000..9ef7a610
--- /dev/null
+++ b/ksvg/data/SVGAElementImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGAElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "target\0"
+};
+
+
+static const struct HashEntry SVGAElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGAElementImpl::Target, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGAElementImpl::s_hashTable = { 2, 2, SVGAElementImpl__s_hashTableEntries, 2, SVGAElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAngleImpl.lut.h b/ksvg/data/SVGAngleImpl.lut.h
new file mode 100644
index 00000000..b57f44e1
--- /dev/null
+++ b/ksvg/data/SVGAngleImpl.lut.h
@@ -0,0 +1,77 @@
+/* Automatically generated from impl/SVGAngleImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAngleImpl__s_hashTableStrings[] = {
+ "\0"
+ "valueInSpecifiedUnits\0"
+ "valueAsString\0"
+ "unitType\0"
+ "value\0"
+};
+
+
+static const struct HashEntry SVGAngleImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 46, SVGAngleImpl::Value, DontDelete, 0, 5 },
+ { 23, SVGAngleImpl::ValueAsString, DontDelete, 0, -1 },
+ { 1, SVGAngleImpl::ValueInSpecifiedUnits, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 37, SVGAngleImpl::UnitType, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGAngleImpl::s_hashTable = { 2, 6, SVGAngleImpl__s_hashTableEntries, 5, SVGAngleImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAngleImplProto__s_hashTableStrings[] = {
+ "\0"
+ "convertToSpecifiedUnits\0"
+ "newValueSpecifiedUnits\0"
+};
+
+
+static const struct HashEntry SVGAngleImplProto__s_hashTableEntries[] = {
+ { 1, SVGAngleImpl::ConvertToSpecifiedUnits, DontDelete|Function, 1, -1 },
+ { 25, SVGAngleImpl::NewValueSpecifiedUnits, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAngleImplProto::s_hashTable = { 2, 3, SVGAngleImplProto__s_hashTableEntries, 3, SVGAngleImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAngleImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_ANGLETYPE_UNSPECIFIED\0"
+ "SVG_ANGLETYPE_UNKNOWN\0"
+ "SVG_ANGLETYPE_GRAD\0"
+ "SVG_ANGLETYPE_DEG\0"
+ "SVG_ANGLETYPE_RAD\0"
+};
+
+
+static const struct HashEntry SVGAngleImplConstructor__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_ANGLETYPE_UNSPECIFIED, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 86, KSVG::SVG_ANGLETYPE_RAD, DontDelete|ReadOnly, 0, 7 },
+ { 49, KSVG::SVG_ANGLETYPE_GRAD, DontDelete|ReadOnly, 0, -1 },
+ { 27, KSVG::SVG_ANGLETYPE_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 68, KSVG::SVG_ANGLETYPE_DEG, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGAngleImplConstructor::s_hashTable = { 2, 8, SVGAngleImplConstructor__s_hashTableEntries, 7, SVGAngleImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedAngleImpl.lut.h b/ksvg/data/SVGAnimatedAngleImpl.lut.h
new file mode 100644
index 00000000..8635120a
--- /dev/null
+++ b/ksvg/data/SVGAnimatedAngleImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedAngleImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedAngleImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedAngleImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedAngleImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedAngleImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedAngleImpl::s_hashTable = { 2, 3, SVGAnimatedAngleImpl__s_hashTableEntries, 3, SVGAnimatedAngleImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedBooleanImpl.lut.h b/ksvg/data/SVGAnimatedBooleanImpl.lut.h
new file mode 100644
index 00000000..928b3f0f
--- /dev/null
+++ b/ksvg/data/SVGAnimatedBooleanImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedBooleanImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedBooleanImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedBooleanImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedBooleanImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedBooleanImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedBooleanImpl::s_hashTable = { 2, 3, SVGAnimatedBooleanImpl__s_hashTableEntries, 3, SVGAnimatedBooleanImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedEnumerationImpl.lut.h b/ksvg/data/SVGAnimatedEnumerationImpl.lut.h
new file mode 100644
index 00000000..b9a48bde
--- /dev/null
+++ b/ksvg/data/SVGAnimatedEnumerationImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedEnumerationImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedEnumerationImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedEnumerationImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedEnumerationImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedEnumerationImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedEnumerationImpl::s_hashTable = { 2, 3, SVGAnimatedEnumerationImpl__s_hashTableEntries, 3, SVGAnimatedEnumerationImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedIntegerImpl.lut.h b/ksvg/data/SVGAnimatedIntegerImpl.lut.h
new file mode 100644
index 00000000..91934787
--- /dev/null
+++ b/ksvg/data/SVGAnimatedIntegerImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedIntegerImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedIntegerImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedIntegerImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedIntegerImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedIntegerImpl::AnimVal, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedIntegerImpl::s_hashTable = { 2, 3, SVGAnimatedIntegerImpl__s_hashTableEntries, 3, SVGAnimatedIntegerImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedLengthImpl.lut.h b/ksvg/data/SVGAnimatedLengthImpl.lut.h
new file mode 100644
index 00000000..b969bf35
--- /dev/null
+++ b/ksvg/data/SVGAnimatedLengthImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedLengthImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedLengthImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedLengthImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedLengthImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedLengthImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedLengthImpl::s_hashTable = { 2, 3, SVGAnimatedLengthImpl__s_hashTableEntries, 3, SVGAnimatedLengthImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedLengthListImpl.lut.h b/ksvg/data/SVGAnimatedLengthListImpl.lut.h
new file mode 100644
index 00000000..463d834d
--- /dev/null
+++ b/ksvg/data/SVGAnimatedLengthListImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedLengthListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedLengthListImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedLengthListImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedLengthListImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedLengthListImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedLengthListImpl::s_hashTable = { 2, 3, SVGAnimatedLengthListImpl__s_hashTableEntries, 3, SVGAnimatedLengthListImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedNumberImpl.lut.h b/ksvg/data/SVGAnimatedNumberImpl.lut.h
new file mode 100644
index 00000000..7563430b
--- /dev/null
+++ b/ksvg/data/SVGAnimatedNumberImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedNumberImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedNumberImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedNumberImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedNumberImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedNumberImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedNumberImpl::s_hashTable = { 2, 3, SVGAnimatedNumberImpl__s_hashTableEntries, 3, SVGAnimatedNumberImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedNumberListImpl.lut.h b/ksvg/data/SVGAnimatedNumberListImpl.lut.h
new file mode 100644
index 00000000..e73471fe
--- /dev/null
+++ b/ksvg/data/SVGAnimatedNumberListImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedNumberListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedNumberListImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedNumberListImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedNumberListImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedNumberListImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedNumberListImpl::s_hashTable = { 2, 3, SVGAnimatedNumberListImpl__s_hashTableEntries, 3, SVGAnimatedNumberListImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedPathDataImpl.lut.h b/ksvg/data/SVGAnimatedPathDataImpl.lut.h
new file mode 100644
index 00000000..8e0e8395
--- /dev/null
+++ b/ksvg/data/SVGAnimatedPathDataImpl.lut.h
@@ -0,0 +1,28 @@
+/* Automatically generated from impl/SVGAnimatedPathDataImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedPathDataImpl__s_hashTableStrings[] = {
+ "\0"
+ "animatedNormalizedPathSegList\0"
+ "normalizedPathSegList\0"
+ "animatedPathSegList\0"
+ "pathSegList\0"
+};
+
+
+static const struct HashEntry SVGAnimatedPathDataImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 53, SVGAnimatedPathDataImpl::AnimatedPathSegList, DontDelete|ReadOnly, 0, 6 },
+ { 0, 0, 0, 0, -1 },
+ { 73, SVGAnimatedPathDataImpl::PathSegList, DontDelete|ReadOnly, 0, 5 },
+ { 0, 0, 0, 0, -1 },
+ { 31, SVGAnimatedPathDataImpl::NormalizedPathSegList, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedPathDataImpl::AnimatedNormalizedPathSegList, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedPathDataImpl::s_hashTable = { 2, 7, SVGAnimatedPathDataImpl__s_hashTableEntries, 5, SVGAnimatedPathDataImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedPointsImpl.lut.h b/ksvg/data/SVGAnimatedPointsImpl.lut.h
new file mode 100644
index 00000000..6b48313a
--- /dev/null
+++ b/ksvg/data/SVGAnimatedPointsImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedPointsImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedPointsImpl__s_hashTableStrings[] = {
+ "\0"
+ "animatedPoints\0"
+ "points\0"
+};
+
+
+static const struct HashEntry SVGAnimatedPointsImpl__s_hashTableEntries[] = {
+ { 16, SVGAnimatedPointsImpl::Points, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGAnimatedPointsImpl::AnimatedPoints, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedPointsImpl::s_hashTable = { 2, 3, SVGAnimatedPointsImpl__s_hashTableEntries, 3, SVGAnimatedPointsImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedPreserveAspectRatioImpl.lut.h b/ksvg/data/SVGAnimatedPreserveAspectRatioImpl.lut.h
new file mode 100644
index 00000000..a681a408
--- /dev/null
+++ b/ksvg/data/SVGAnimatedPreserveAspectRatioImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedPreserveAspectRatioImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedPreserveAspectRatioImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedPreserveAspectRatioImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedPreserveAspectRatioImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedPreserveAspectRatioImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedPreserveAspectRatioImpl::s_hashTable = { 2, 3, SVGAnimatedPreserveAspectRatioImpl__s_hashTableEntries, 3, SVGAnimatedPreserveAspectRatioImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedRectImpl.lut.h b/ksvg/data/SVGAnimatedRectImpl.lut.h
new file mode 100644
index 00000000..9a16c899
--- /dev/null
+++ b/ksvg/data/SVGAnimatedRectImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedRectImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedRectImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedRectImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedRectImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedRectImpl::AnimVal, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedRectImpl::s_hashTable = { 2, 3, SVGAnimatedRectImpl__s_hashTableEntries, 3, SVGAnimatedRectImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedStringImpl.lut.h b/ksvg/data/SVGAnimatedStringImpl.lut.h
new file mode 100644
index 00000000..add905dd
--- /dev/null
+++ b/ksvg/data/SVGAnimatedStringImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedStringImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedStringImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedStringImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedStringImpl::BaseVal, DontDelete, 0, -1 },
+ { 1, SVGAnimatedStringImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedStringImpl::s_hashTable = { 2, 3, SVGAnimatedStringImpl__s_hashTableEntries, 3, SVGAnimatedStringImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimatedTransformListImpl.lut.h b/ksvg/data/SVGAnimatedTransformListImpl.lut.h
new file mode 100644
index 00000000..7974a00e
--- /dev/null
+++ b/ksvg/data/SVGAnimatedTransformListImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGAnimatedTransformListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimatedTransformListImpl__s_hashTableStrings[] = {
+ "\0"
+ "animVal\0"
+ "baseVal\0"
+};
+
+
+static const struct HashEntry SVGAnimatedTransformListImpl__s_hashTableEntries[] = {
+ { 9, SVGAnimatedTransformListImpl::BaseVal, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimatedTransformListImpl::AnimVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimatedTransformListImpl::s_hashTable = { 2, 3, SVGAnimatedTransformListImpl__s_hashTableEntries, 3, SVGAnimatedTransformListImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGAnimationElementImpl.lut.h b/ksvg/data/SVGAnimationElementImpl.lut.h
new file mode 100644
index 00000000..af8ea0d5
--- /dev/null
+++ b/ksvg/data/SVGAnimationElementImpl.lut.h
@@ -0,0 +1,94 @@
+/* Automatically generated from impl/SVGAnimationElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimationElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "attributeName\0"
+ "attributeType\0"
+ "targetElement\0"
+ "repeatCount\0"
+ "accumulate\0"
+ "keySplines\0"
+ "repeatDur\0"
+ "additive\0"
+ "calcMode\0"
+ "keyTimes\0"
+ "restart\0"
+ "values\0"
+ "begin\0"
+ "fill\0"
+ "from\0"
+ "href\0"
+ "dur\0"
+ "end\0"
+ "max\0"
+ "min\0"
+ "by\0"
+ "to\0"
+};
+
+
+static const struct HashEntry SVGAnimationElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 55, SVGAnimationElementImpl::Accumulate, DontDelete|ReadOnly, 0, 25 },
+ { 0, 0, 0, 0, -1 },
+ { 29, SVGAnimationElementImpl::TargetElement, DontDelete|ReadOnly, 0, 26 },
+ { 66, SVGAnimationElementImpl::KeySplines, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 145, SVGAnimationElementImpl::Href, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGAnimationElementImpl::AttributeName, DontDelete|ReadOnly, 0, -1 },
+ { 150, SVGAnimationElementImpl::Dur, DontDelete|ReadOnly, 0, 30 },
+ { 96, SVGAnimationElementImpl::CalcMode, DontDelete|ReadOnly, 0, -1 },
+ { 129, SVGAnimationElementImpl::Begin, DontDelete|ReadOnly, 0, -1 },
+ { 122, SVGAnimationElementImpl::Values, DontDelete|ReadOnly, 0, 23 },
+ { 0, 0, 0, 0, -1 },
+ { 87, SVGAnimationElementImpl::Additive, DontDelete|ReadOnly, 0, 27 },
+ { 105, SVGAnimationElementImpl::KeyTimes, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 15, SVGAnimationElementImpl::AttributeType, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 169, SVGAnimationElementImpl::To, DontDelete|ReadOnly, 0, 29 },
+ { 0, 0, 0, 0, -1 },
+ { 140, SVGAnimationElementImpl::From, DontDelete|ReadOnly, 0, -1 },
+ { 166, SVGAnimationElementImpl::By, DontDelete|ReadOnly, 0, 24 },
+ { 154, SVGAnimationElementImpl::End, DontDelete|ReadOnly, 0, 28 },
+ { 162, SVGAnimationElementImpl::Min, DontDelete|ReadOnly, 0, -1 },
+ { 158, SVGAnimationElementImpl::Max, DontDelete|ReadOnly, 0, -1 },
+ { 114, SVGAnimationElementImpl::Restart, DontDelete|ReadOnly, 0, -1 },
+ { 43, SVGAnimationElementImpl::RepeatCount, DontDelete|ReadOnly, 0, -1 },
+ { 77, SVGAnimationElementImpl::RepeatDur, DontDelete|ReadOnly, 0, -1 },
+ { 135, SVGAnimationElementImpl::Fill, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGAnimationElementImpl::s_hashTable = { 2, 31, SVGAnimationElementImpl__s_hashTableEntries, 23, SVGAnimationElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGAnimationElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getSimpleDuration\0"
+ "getCurrentTime\0"
+ "getStartTime\0"
+};
+
+
+static const struct HashEntry SVGAnimationElementImplProto__s_hashTableEntries[] = {
+ { 34, SVGAnimationElementImpl::GetStartTime, DontDelete|Function, 0, -1 },
+ { 1, SVGAnimationElementImpl::GetSimpleDuration, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 19, SVGAnimationElementImpl::GetCurrentTime, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGAnimationElementImplProto::s_hashTable = { 2, 5, SVGAnimationElementImplProto__s_hashTableEntries, 5, SVGAnimationElementImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGCircleElementImpl.lut.h b/ksvg/data/SVGCircleElementImpl.lut.h
new file mode 100644
index 00000000..dc7fb0cc
--- /dev/null
+++ b/ksvg/data/SVGCircleElementImpl.lut.h
@@ -0,0 +1,26 @@
+/* Automatically generated from impl/SVGCircleElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGCircleElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "cx\0"
+ "cy\0"
+ "r\0"
+};
+
+
+static const struct HashEntry SVGCircleElementImpl__s_hashTableEntries[] = {
+ { 4, SVGCircleElementImpl::Cy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGCircleElementImpl::Cx, DontDelete|ReadOnly, 0, 5 },
+ { 7, SVGCircleElementImpl::R, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGCircleElementImpl::s_hashTable = { 2, 6, SVGCircleElementImpl__s_hashTableEntries, 5, SVGCircleElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGClipPathElementImpl.lut.h b/ksvg/data/SVGClipPathElementImpl.lut.h
new file mode 100644
index 00000000..5f5c7df2
--- /dev/null
+++ b/ksvg/data/SVGClipPathElementImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGClipPathElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGClipPathElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "clipPathUnits\0"
+};
+
+
+static const struct HashEntry SVGClipPathElementImpl__s_hashTableEntries[] = {
+ { 1, SVGClipPathElementImpl::ClipPathUnits, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGClipPathElementImpl::s_hashTable = { 2, 2, SVGClipPathElementImpl__s_hashTableEntries, 2, SVGClipPathElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGColorImpl.lut.h b/ksvg/data/SVGColorImpl.lut.h
new file mode 100644
index 00000000..e6e0fe48
--- /dev/null
+++ b/ksvg/data/SVGColorImpl.lut.h
@@ -0,0 +1,76 @@
+/* Automatically generated from impl/SVGColorImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGColorImpl__s_hashTableStrings[] = {
+ "\0"
+ "colorType\0"
+ "ICCColor\0"
+ "RGBColor\0"
+};
+
+
+static const struct HashEntry SVGColorImpl__s_hashTableEntries[] = {
+ { 20, SVGColorImpl::RGBColor, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGColorImpl::ColorType, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 11, SVGColorImpl::ICCColor, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGColorImpl::s_hashTable = { 2, 5, SVGColorImpl__s_hashTableEntries, 5, SVGColorImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGColorImplProto__s_hashTableStrings[] = {
+ "\0"
+ "setRGBColorICCColor\0"
+ "setRGBColor\0"
+ "setColor\0"
+};
+
+
+static const struct HashEntry SVGColorImplProto__s_hashTableEntries[] = {
+ { 1, SVGColorImpl::SetRGBColorICCColor, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 21, SVGColorImpl::SetRGBColor, DontDelete|Function, 1, -1 },
+ { 33, SVGColorImpl::SetColor, DontDelete|Function, 3, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGColorImplProto::s_hashTable = { 2, 5, SVGColorImplProto__s_hashTableEntries, 5, SVGColorImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGColorImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_COLORTYPE_RGBCOLOR_ICCCOLOR\0"
+ "SVG_COLORTYPE_CURRENTCOLOR\0"
+ "SVG_COLORTYPE_RGBCOLOR\0"
+ "SVG_COLORTYPE_UNKNOWN\0"
+};
+
+
+static const struct HashEntry SVGColorImplConstructor__s_hashTableEntries[] = {
+ { 83, KSVG::SVG_COLORTYPE_UNKNOWN, DontDelete|ReadOnly, 0, 6 },
+ { 0, 0, 0, 0, -1 },
+ { 60, KSVG::SVG_COLORTYPE_RGBCOLOR, DontDelete|ReadOnly, 0, 5 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, DontDelete|ReadOnly, 0, -1 },
+ { 33, KSVG::SVG_COLORTYPE_CURRENTCOLOR, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGColorImplConstructor::s_hashTable = { 2, 7, SVGColorImplConstructor__s_hashTableEntries, 5, SVGColorImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGColorProfileElementImpl.lut.h b/ksvg/data/SVGColorProfileElementImpl.lut.h
new file mode 100644
index 00000000..40c11854
--- /dev/null
+++ b/ksvg/data/SVGColorProfileElementImpl.lut.h
@@ -0,0 +1,26 @@
+/* Automatically generated from impl/SVGColorProfileElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGColorProfileElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "rendering-intent\0"
+ "href\0"
+ "name\0"
+};
+
+
+static const struct HashEntry SVGColorProfileElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 18, SVGColorProfileElementImpl::Href, DontDelete|ReadOnly, 0, 5 },
+ { 23, SVGColorProfileElementImpl::Name, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGColorProfileElementImpl::RenderingIntent, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGColorProfileElementImpl::s_hashTable = { 2, 6, SVGColorProfileElementImpl__s_hashTableEntries, 5, SVGColorProfileElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGCursorElementImpl.lut.h b/ksvg/data/SVGCursorElementImpl.lut.h
new file mode 100644
index 00000000..94527e0c
--- /dev/null
+++ b/ksvg/data/SVGCursorElementImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGCursorElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGCursorElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGCursorElementImpl__s_hashTableEntries[] = {
+ { 1, SVGCursorElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 3, SVGCursorElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGCursorElementImpl::s_hashTable = { 2, 3, SVGCursorElementImpl__s_hashTableEntries, 3, SVGCursorElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGDocumentImpl.lut.h b/ksvg/data/SVGDocumentImpl.lut.h
new file mode 100644
index 00000000..92b7ed14
--- /dev/null
+++ b/ksvg/data/SVGDocumentImpl.lut.h
@@ -0,0 +1,67 @@
+/* Automatically generated from impl/SVGDocumentImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDocumentImpl__s_hashTableStrings[] = {
+ "\0"
+ "documentElement\0"
+ "implementation\0"
+ "rootElement\0"
+ "referrer\0"
+ "doctype\0"
+ "domain\0"
+ "title\0"
+ "URL\0"
+};
+
+
+static const struct HashEntry SVGDocumentImpl__s_hashTableEntries[] = {
+ { 74, SVGDocumentImpl::Url, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 61, SVGDocumentImpl::Domain, DontDelete|ReadOnly, 0, 10 },
+ { 0, 0, 0, 0, -1 },
+ { 53, SVGDocumentImpl::DocType, DontDelete|ReadOnly, 0, -1 },
+ { 32, SVGDocumentImpl::RootElement, DontDelete|ReadOnly, 0, -1 },
+ { 68, SVGDocumentImpl::Title, DontDelete|ReadOnly, 0, 9 },
+ { 17, SVGDocumentImpl::Implementation, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 44, SVGDocumentImpl::Referrer, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGDocumentImpl::DocumentElement, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGDocumentImpl::s_hashTable = { 2, 11, SVGDocumentImpl__s_hashTableEntries, 9, SVGDocumentImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDocumentImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getElementsByTagNameNS\0"
+ "getElementsByTagName\0"
+ "createElementNS\0"
+ "createTextNode\0"
+ "getElementById\0"
+ "createElement\0"
+};
+
+
+static const struct HashEntry SVGDocumentImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 76, SVGDocumentImpl::GetElementById, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 24, SVGDocumentImpl::GetElementsByTagName, DontDelete|Function, 1, 8 },
+ { 61, SVGDocumentImpl::CreateTextNode, DontDelete|Function, 1, -1 },
+ { 91, SVGDocumentImpl::CreateElement, DontDelete|Function, 1, 7 },
+ { 0, 0, 0, 0, -1 },
+ { 45, SVGDocumentImpl::CreateElementNS, DontDelete|Function, 2, -1 },
+ { 1, SVGDocumentImpl::GetElementsByTagNameNS, DontDelete|Function, 2, -1 }
+};
+
+const struct HashTable SVGDocumentImplProto::s_hashTable = { 2, 9, SVGDocumentImplProto__s_hashTableEntries, 7, SVGDocumentImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGEcma.lut.h b/ksvg/data/SVGEcma.lut.h
new file mode 100644
index 00000000..54909bab
--- /dev/null
+++ b/ksvg/data/SVGEcma.lut.h
@@ -0,0 +1,396 @@
+/* Automatically generated from impl/SVGEcma.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMNodeBridge__s_hashTableStrings[] = {
+ "\0"
+ "previousSibling\0"
+ "ownerDocument\0"
+ "namespaceURI\0"
+ "nextSibling\0"
+ "attributes\0"
+ "childNodes\0"
+ "firstChild\0"
+ "parentNode\0"
+ "lastChild\0"
+ "localName\0"
+ "nodeValue\0"
+ "nodeName\0"
+ "nodeType\0"
+ "prefix\0"
+};
+
+
+static const struct HashEntry SVGDOMNodeBridge__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 67, SVGDOMNodeBridge::ChildNodes, DontDelete|ReadOnly, 0, -1 },
+ { 100, SVGDOMNodeBridge::LastChild, DontDelete|ReadOnly, 0, -1 },
+ { 89, SVGDOMNodeBridge::ParentNode, DontDelete|ReadOnly, 0, 18 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 139, SVGDOMNodeBridge::NodeType, DontDelete|ReadOnly, 0, 17 },
+ { 130, SVGDOMNodeBridge::NodeName, DontDelete|ReadOnly, 0, 20 },
+ { 17, SVGDOMNodeBridge::OwnerDocument, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 120, SVGDOMNodeBridge::NodeValue, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 78, SVGDOMNodeBridge::FirstChild, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGDOMNodeBridge::PreviousSibling, DontDelete|ReadOnly, 0, 19 },
+ { 44, SVGDOMNodeBridge::NextSibling, DontDelete|ReadOnly, 0, -1 },
+ { 56, SVGDOMNodeBridge::Attributes, DontDelete|ReadOnly, 0, 22 },
+ { 31, SVGDOMNodeBridge::NamespaceURI, DontDelete|ReadOnly, 0, 21 },
+ { 148, SVGDOMNodeBridge::Prefix, DontDelete, 0, -1 },
+ { 110, SVGDOMNodeBridge::LocalName, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGDOMNodeBridge::s_hashTable = { 2, 23, SVGDOMNodeBridge__s_hashTableEntries, 17, SVGDOMNodeBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMNodeBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "removeEventListener\0"
+ "getPreviousSibling\0"
+ "addEventListener\0"
+ "getOwnerDocument\0"
+ "getNamespaceURI\0"
+ "getNextSibling\0"
+ "getAttributes\0"
+ "getChildNodes\0"
+ "getFirstChild\0"
+ "getParentNode\0"
+ "hasAttributes\0"
+ "hasChildNodes\0"
+ "getLastChild\0"
+ "getLocalName\0"
+ "getNodeValue\0"
+ "insertBefore\0"
+ "replaceChild\0"
+ "appendChild\0"
+ "getNodeName\0"
+ "getNodeType\0"
+ "isSupported\0"
+ "removeChild\0"
+ "cloneNode\0"
+ "getPrefix\0"
+ "normalize\0"
+ "contains\0"
+};
+
+
+static const struct HashEntry SVGDOMNodeBridgeProto__s_hashTableEntries[] = {
+ { 175, SVGDOMNodeBridge::HasChildNodes, DontDelete|Function, 0, -1 },
+ { 215, SVGDOMNodeBridge::GetNodeValue, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 119, SVGDOMNodeBridge::GetChildNodes, DontDelete|Function, 0, -1 },
+ { 1, SVGDOMNodeBridge::RemoveEventListener, DontDelete|Function, 3, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 302, SVGDOMNodeBridge::RemoveChild, DontDelete|Function, 1, 37 },
+ { 21, SVGDOMNodeBridge::GetPreviousSibling, DontDelete|Function, 0, -1 },
+ { 228, SVGDOMNodeBridge::InsertBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 254, SVGDOMNodeBridge::AppendChild, DontDelete|Function, 1, 36 },
+ { 0, 0, 0, 0, -1 },
+ { 161, SVGDOMNodeBridge::HasAttributes, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 133, SVGDOMNodeBridge::GetFirstChild, DontDelete|Function, 0, 32 },
+ { 314, SVGDOMNodeBridge::CloneNode, DontDelete|Function, 1, 29 },
+ { 57, SVGDOMNodeBridge::GetOwnerDocument, DontDelete|Function, 0, -1 },
+ { 344, SVGDOMNodeBridge::Contains, DontDelete|Function, 1, 30 },
+ { 147, SVGDOMNodeBridge::GetParentNode, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 40, SVGDOMNodeBridge::AddEventListener, DontDelete|Function, 3, -1 },
+ { 290, SVGDOMNodeBridge::IsSupported, DontDelete|Function, 2, 31 },
+ { 241, SVGDOMNodeBridge::ReplaceChild, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 334, SVGDOMNodeBridge::Normalize, DontDelete|Function, 0, 34 },
+ { 266, SVGDOMNodeBridge::GetNodeName, DontDelete|Function, 0, -1 },
+ { 278, SVGDOMNodeBridge::GetNodeType, DontDelete|Function, 0, 33 },
+ { 189, SVGDOMNodeBridge::GetLastChild, DontDelete|Function, 0, 35 },
+ { 90, SVGDOMNodeBridge::GetNextSibling, DontDelete|Function, 0, -1 },
+ { 105, SVGDOMNodeBridge::GetAttributes, DontDelete|Function, 0, -1 },
+ { 74, SVGDOMNodeBridge::GetNamespaceURI, DontDelete|Function, 0, -1 },
+ { 324, SVGDOMNodeBridge::GetPrefix, DontDelete|Function, 0, -1 },
+ { 202, SVGDOMNodeBridge::GetLocalName, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGDOMNodeBridgeProto::s_hashTable = { 2, 38, SVGDOMNodeBridgeProto__s_hashTableEntries, 29, SVGDOMNodeBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMElementBridge__s_hashTableStrings[] = {
+ "\0"
+ "tagName\0"
+};
+
+
+static const struct HashEntry SVGDOMElementBridge__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGDOMElementBridge::TagName, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGDOMElementBridge::s_hashTable = { 2, 2, SVGDOMElementBridge__s_hashTableEntries, 2, SVGDOMElementBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMElementBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "getElementByTagNameNS\0"
+ "getElementsByTagName\0"
+ "removeAttributeNode\0"
+ "getAttributeNodeNS\0"
+ "setAttributeNodeNS\0"
+ "removeAttributeNS\0"
+ "getAttributeNode\0"
+ "setAttributeNode\0"
+ "removeAttribute\0"
+ "getAttributeNS\0"
+ "hasAttributeNS\0"
+ "setAttributeNS\0"
+ "getAttribute\0"
+ "hasAttribute\0"
+ "setAttribute\0"
+};
+
+
+static const struct HashEntry SVGDOMElementBridgeProto__s_hashTableEntries[] = {
+ { 64, SVGDOMElementBridge::GetAttributeNodeNS, DontDelete|Function, 2, -1 },
+ { 170, SVGDOMElementBridge::GetAttributeNS, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 44, SVGDOMElementBridge::RemoveAttributeNode, DontDelete|Function, 1, -1 },
+ { 154, SVGDOMElementBridge::RemoveAttribute, DontDelete|Function, 1, 17 },
+ { 241, SVGDOMElementBridge::SetAttribute, DontDelete|Function, 2, -1 },
+ { 228, SVGDOMElementBridge::HasAttribute, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 120, SVGDOMElementBridge::GetAttributeNode, DontDelete|Function, 1, -1 },
+ { 215, SVGDOMElementBridge::GetAttribute, DontDelete|Function, 1, -1 },
+ { 1, SVGDOMElementBridge::GetElementsByTagNameNS, DontDelete|Function, 2, -1 },
+ { 102, SVGDOMElementBridge::RemoveAttributeNS, DontDelete|Function, 2, 18 },
+ { 200, SVGDOMElementBridge::SetAttributeNS, DontDelete|Function, 3, -1 },
+ { 185, SVGDOMElementBridge::HasAttributeNS, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 23, SVGDOMElementBridge::GetElementsByTagName, DontDelete|Function, 1, -1 },
+ { 137, SVGDOMElementBridge::SetAttributeNode, DontDelete|Function, 2, -1 },
+ { 83, SVGDOMElementBridge::SetAttributeNodeNS, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGDOMElementBridgeProto::s_hashTable = { 2, 19, SVGDOMElementBridgeProto__s_hashTableEntries, 17, SVGDOMElementBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMNodeListBridge__s_hashTableStrings[] = {
+ "\0"
+ "length\0"
+};
+
+
+static const struct HashEntry SVGDOMNodeListBridge__s_hashTableEntries[] = {
+ { 1, SVGDOMNodeListBridge::Length, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGDOMNodeListBridge::s_hashTable = { 2, 2, SVGDOMNodeListBridge__s_hashTableEntries, 2, SVGDOMNodeListBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMNodeListBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "getLength\0"
+ "item\0"
+};
+
+
+static const struct HashEntry SVGDOMNodeListBridgeProto__s_hashTableEntries[] = {
+ { 1, SVGDOMNodeListBridge::GetLength, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 11, SVGDOMNodeListBridge::Item, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGDOMNodeListBridgeProto::s_hashTable = { 2, 3, SVGDOMNodeListBridgeProto__s_hashTableEntries, 3, SVGDOMNodeListBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMCharacterDataBridge__s_hashTableStrings[] = {
+ "\0"
+ "length\0"
+ "data\0"
+};
+
+
+static const struct HashEntry SVGDOMCharacterDataBridge__s_hashTableEntries[] = {
+ { 1, SVGDOMCharacterDataBridge::Length, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 8, SVGDOMCharacterDataBridge::Data, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGDOMCharacterDataBridge::s_hashTable = { 2, 3, SVGDOMCharacterDataBridge__s_hashTableEntries, 3, SVGDOMCharacterDataBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMCharacterDataBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "substringData\0"
+ "replaceData\0"
+ "appendData\0"
+ "deleteData\0"
+ "insertData\0"
+ "getLength\0"
+ "getData\0"
+ "setData\0"
+};
+
+
+static const struct HashEntry SVGDOMCharacterDataBridgeProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 38, SVGDOMCharacterDataBridge::DeleteData, DontDelete|Function, 2, -1 },
+ { 70, SVGDOMCharacterDataBridge::GetData, DontDelete|Function, 0, 12 },
+ { 78, SVGDOMCharacterDataBridge::SetData, DontDelete|Function, 1, 11 },
+ { 1, SVGDOMCharacterDataBridge::SubstringData, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 27, SVGDOMCharacterDataBridge::AppendData, DontDelete|Function, 1, -1 },
+ { 15, SVGDOMCharacterDataBridge::ReplaceData, DontDelete|Function, 2, -1 },
+ { 60, SVGDOMCharacterDataBridge::GetLength, DontDelete|Function, 0, -1 },
+ { 49, SVGDOMCharacterDataBridge::InsertData, DontDelete|Function, 2, -1 }
+};
+
+const struct HashTable SVGDOMCharacterDataBridgeProto::s_hashTable = { 2, 13, SVGDOMCharacterDataBridgeProto__s_hashTableEntries, 11, SVGDOMCharacterDataBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMTextBridge__s_hashTableStrings[] = {
+ "\0"
+ "dummy\0"
+};
+
+
+static const struct HashEntry SVGDOMTextBridge__s_hashTableEntries[] = {
+ { 1, SVGDOMTextBridge::Dummy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGDOMTextBridge::s_hashTable = { 2, 2, SVGDOMTextBridge__s_hashTableEntries, 2, SVGDOMTextBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMTextBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "splitText\0"
+};
+
+
+static const struct HashEntry SVGDOMTextBridgeProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGDOMTextBridge::SplitText, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGDOMTextBridgeProto::s_hashTable = { 2, 2, SVGDOMTextBridgeProto__s_hashTableEntries, 2, SVGDOMTextBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMDOMImplementationBridge__s_hashTableStrings[] = {
+ "\0"
+ "dummy\0"
+};
+
+
+static const struct HashEntry SVGDOMDOMImplementationBridge__s_hashTableEntries[] = {
+ { 1, SVGDOMDOMImplementationBridge::Dummy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGDOMDOMImplementationBridge::s_hashTable = { 2, 2, SVGDOMDOMImplementationBridge__s_hashTableEntries, 2, SVGDOMDOMImplementationBridge__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMDOMImplementationBridgeProto__s_hashTableStrings[] = {
+ "\0"
+ "hasFeature\0"
+};
+
+
+static const struct HashEntry SVGDOMDOMImplementationBridgeProto__s_hashTableEntries[] = {
+ { 1, SVGDOMDOMImplementationBridge::HasFeature, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGDOMDOMImplementationBridgeProto::s_hashTable = { 2, 2, SVGDOMDOMImplementationBridgeProto__s_hashTableEntries, 2, SVGDOMDOMImplementationBridgeProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGDOMDocumentFragmentBridge__s_hashTableStrings[] = {
+ "\0"
+ "dummy\0"
+};
+
+
+static const struct HashEntry SVGDOMDocumentFragmentBridge__s_hashTableEntries[] = {
+ { 1, SVGDOMDocumentFragmentBridge::Dummy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGDOMDocumentFragmentBridge::s_hashTable = { 2, 2, SVGDOMDocumentFragmentBridge__s_hashTableEntries, 2, SVGDOMDocumentFragmentBridge__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGElementImpl.lut.h b/ksvg/data/SVGElementImpl.lut.h
new file mode 100644
index 00000000..fe205a71
--- /dev/null
+++ b/ksvg/data/SVGElementImpl.lut.h
@@ -0,0 +1,92 @@
+/* Automatically generated from impl/SVGElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "ownerSVGElement\0"
+ "viewportElement\0"
+ "onmouseclick\0"
+ "onmousedown\0"
+ "onmousemove\0"
+ "onmouseover\0"
+ "onactivate\0"
+ "onfocusout\0"
+ "onkeypress\0"
+ "onmouseout\0"
+ "onfocusin\0"
+ "onkeydown\0"
+ "onmouseup\0"
+ "onabort\0"
+ "onclick\0"
+ "onerror\0"
+ "onkeyup\0"
+ "xmlbase\0"
+ "onload\0"
+ "id\0"
+};
+
+
+static const struct HashEntry SVGElementImpl__s_hashTableEntries[] = {
+ { 17, SVGElementImpl::ViewportElement, DontDelete|ReadOnly, 0, -1 },
+ { 136, SVGElementImpl::OnKeyDown, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 164, SVGElementImpl::OnClick, DontDelete, 0, 27 },
+ { 33, SVGElementImpl::OnClick, DontDelete, 0, -1 },
+ { 93, SVGElementImpl::OnFocusOut, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 188, SVGElementImpl::XmlBase, DontDelete, 0, 25 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGElementImpl::OwnerSvgElement, DontDelete|ReadOnly, 0, 23 },
+ { 0, 0, 0, 0, -1 },
+ { 196, SVGElementImpl::OnLoad, DontDelete, 0, 29 },
+ { 58, SVGElementImpl::OnMouseMove, DontDelete, 0, -1 },
+ { 46, SVGElementImpl::OnMouseDown, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 191, SVGElementImpl::XmlBase, DontDelete, 0, 26 },
+ { 203, SVGElementImpl::ElementId, DontDelete, 0, 30 },
+ { 70, SVGElementImpl::OnMouseOver, DontDelete, 0, -1 },
+ { 146, SVGElementImpl::OnMouseUp, DontDelete, 0, 24 },
+ { 115, SVGElementImpl::OnMouseOut, DontDelete, 0, 28 },
+ { 82, SVGElementImpl::OnActivate, DontDelete, 0, -1 },
+ { 180, SVGElementImpl::OnKeyUp, DontDelete, 0, -1 },
+ { 104, SVGElementImpl::OnKeyPress, DontDelete, 0, -1 },
+ { 126, SVGElementImpl::OnFocusIn, DontDelete, 0, -1 },
+ { 172, SVGElementImpl::OnError, DontDelete, 0, -1 },
+ { 156, SVGElementImpl::OnAbort, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGElementImpl::s_hashTable = { 2, 31, SVGElementImpl__s_hashTableEntries, 23, SVGElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getPropertyValue\0"
+ "setProperty\0"
+ "getStyle\0"
+};
+
+
+static const struct HashEntry SVGElementImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 18, SVGElementImpl::SetProperty, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGElementImpl::GetPropertyValue, DontDelete|Function, 1, -1 },
+ { 30, SVGElementImpl::GetStyle, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGElementImplProto::s_hashTable = { 2, 5, SVGElementImplProto__s_hashTableEntries, 5, SVGElementImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGEllipseElementImpl.lut.h b/ksvg/data/SVGEllipseElementImpl.lut.h
new file mode 100644
index 00000000..a2fe34a7
--- /dev/null
+++ b/ksvg/data/SVGEllipseElementImpl.lut.h
@@ -0,0 +1,28 @@
+/* Automatically generated from impl/SVGEllipseElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGEllipseElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "cx\0"
+ "cy\0"
+ "rx\0"
+ "ry\0"
+};
+
+
+static const struct HashEntry SVGEllipseElementImpl__s_hashTableEntries[] = {
+ { 4, SVGEllipseElementImpl::Cy, DontDelete|ReadOnly, 0, 6 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGEllipseElementImpl::Cx, DontDelete|ReadOnly, 0, 5 },
+ { 7, SVGEllipseElementImpl::Rx, DontDelete|ReadOnly, 0, -1 },
+ { 10, SVGEllipseElementImpl::Ry, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGEllipseElementImpl::s_hashTable = { 2, 7, SVGEllipseElementImpl__s_hashTableEntries, 5, SVGEllipseElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGEventImpl.lut.h b/ksvg/data/SVGEventImpl.lut.h
new file mode 100644
index 00000000..3283775e
--- /dev/null
+++ b/ksvg/data/SVGEventImpl.lut.h
@@ -0,0 +1,271 @@
+/* Automatically generated from impl/SVGEventImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGEventImpl__s_hashTableStrings[] = {
+ "\0"
+ "currentTarget\0"
+ "cancelable\0"
+ "eventPhase\0"
+ "timeStamp\0"
+ "bubbles\0"
+ "target\0"
+ "type\0"
+};
+
+
+static const struct HashEntry SVGEventImpl__s_hashTableEntries[] = {
+ { 1, SVGEventImpl::CurrentTarget, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 37, SVGEventImpl::TimeStamp, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 15, SVGEventImpl::Cancelable, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 55, SVGEventImpl::Target, DontDelete|ReadOnly, 0, 11 },
+ { 62, SVGEventImpl::Type, DontDelete|ReadOnly, 0, -1 },
+ { 26, SVGEventImpl::EventPhase, DontDelete|ReadOnly, 0, 12 },
+ { 47, SVGEventImpl::Bubbles, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGEventImpl::s_hashTable = { 2, 13, SVGEventImpl__s_hashTableEntries, 11, SVGEventImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGEventImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getCurrentTarget\0"
+ "stopPropagation\0"
+ "getCurrentNode\0"
+ "preventDefault\0"
+ "getCancelable\0"
+ "getEventphase\0"
+ "getTimeStamp\0"
+ "getBubbles\0"
+ "getTarget\0"
+ "initEvent\0"
+ "getType\0"
+};
+
+
+static const struct HashEntry SVGEventImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 92, SVGEventImpl::GetTimeStamp, DontDelete|Function, 0, 17 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 34, SVGEventImpl::GetCurrentNode, DontDelete|Function, 0, 14 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 105, SVGEventImpl::GetBubbles, DontDelete|Function, 0, -1 },
+ { 136, SVGEventImpl::GetType, DontDelete|Function, 0, 13 },
+ { 78, SVGEventImpl::GetEventPhase, DontDelete|Function, 0, 15 },
+ { 116, SVGEventImpl::GetTarget, DontDelete|Function, 0, 16 },
+ { 1, SVGEventImpl::GetCurrentTarget, DontDelete|Function, 0, -1 },
+ { 64, SVGEventImpl::GetCancelable, DontDelete|Function, 0, -1 },
+ { 18, SVGEventImpl::StopPropagation, DontDelete|Function, 0, -1 },
+ { 49, SVGEventImpl::PreventDefault, DontDelete|Function, 0, -1 },
+ { 126, SVGEventImpl::InitEvent, DontDelete|Function, 3, -1 }
+};
+
+const struct HashTable SVGEventImplProto::s_hashTable = { 2, 18, SVGEventImplProto__s_hashTableEntries, 13, SVGEventImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGUIEventImpl__s_hashTableStrings[] = {
+ "\0"
+ "detail\0"
+ "view\0"
+};
+
+
+static const struct HashEntry SVGUIEventImpl__s_hashTableEntries[] = {
+ { 1, SVGUIEventImpl::Detail, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 8, SVGUIEventImpl::View, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGUIEventImpl::s_hashTable = { 2, 3, SVGUIEventImpl__s_hashTableEntries, 3, SVGUIEventImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGUIEventImplProto__s_hashTableStrings[] = {
+ "\0"
+ "initUIEvent\0"
+ "getDetail\0"
+ "getView\0"
+};
+
+
+static const struct HashEntry SVGUIEventImplProto__s_hashTableEntries[] = {
+ { 13, SVGUIEventImpl::GetDetail, DontDelete|Function, 0, -1 },
+ { 23, SVGUIEventImpl::GetView, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGUIEventImpl::InitUIEvent, DontDelete|Function, 5, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGUIEventImplProto::s_hashTable = { 2, 5, SVGUIEventImplProto__s_hashTableEntries, 5, SVGUIEventImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGKeyEventImpl__s_hashTableStrings[] = {
+ "\0"
+ "outputString\0"
+ "virtKeyVal\0"
+ "charCode\0"
+ "keyCode\0"
+ "keyVal\0"
+};
+
+
+static const struct HashEntry SVGKeyEventImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 34, SVGKeyEventImpl::KeyVal, DontDelete|ReadOnly, 0, -1 },
+ { 25, SVGKeyEventImpl::KeyVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 42, SVGKeyEventImpl::KeyVal, DontDelete|ReadOnly, 0, 7 },
+ { 14, SVGKeyEventImpl::VirtKeyVal, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGKeyEventImpl::OutputString, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGKeyEventImpl::s_hashTable = { 2, 8, SVGKeyEventImpl__s_hashTableEntries, 7, SVGKeyEventImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGKeyEventImplProto__s_hashTableStrings[] = {
+ "\0"
+ "checkModifier\0"
+ "getCharCode\0"
+ "getKeyCode\0"
+ "getKeyVal\0"
+};
+
+
+static const struct HashEntry SVGKeyEventImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGKeyEventImpl::CheckModifier, DontDelete|Function, 1, 7 },
+ { 15, SVGKeyEventImpl::GetKeyVal, DontDelete|Function, 0, 8 },
+ { 0, 0, 0, 0, -1 },
+ { 38, SVGKeyEventImpl::GetKeyVal, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 27, SVGKeyEventImpl::GetKeyVal, DontDelete|Function, 0, -1 },
+ { 15, SVGKeyEventImpl::GetCharCode, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGKeyEventImplProto::s_hashTable = { 2, 9, SVGKeyEventImplProto__s_hashTableEntries, 7, SVGKeyEventImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMouseEventImpl__s_hashTableStrings[] = {
+ "\0"
+ "relatedTarget\0"
+ "shiftKey\0"
+ "clientX\0"
+ "clientY\0"
+ "ctrlKey\0"
+ "metaKey\0"
+ "screenX\0"
+ "screenY\0"
+ "altKey\0"
+ "button\0"
+};
+
+
+static const struct HashEntry SVGMouseEventImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 24, SVGMouseEventImpl::ClientX, DontDelete|ReadOnly, 0, -1 },
+ { 56, SVGMouseEventImpl::ScreenX, DontDelete|ReadOnly, 0, 11 },
+ { 64, SVGMouseEventImpl::ScreenY, DontDelete|ReadOnly, 0, 12 },
+ { 0, 0, 0, 0, -1 },
+ { 48, SVGMouseEventImpl::MetaKey, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 40, SVGMouseEventImpl::CtrlKey, DontDelete|ReadOnly, 0, 14 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGMouseEventImpl::RelatedTarget, DontDelete|ReadOnly, 0, -1 },
+ { 32, SVGMouseEventImpl::ClientY, DontDelete|ReadOnly, 0, 13 },
+ { 15, SVGMouseEventImpl::ShiftKey, DontDelete|ReadOnly, 0, -1 },
+ { 72, SVGMouseEventImpl::AltKey, DontDelete|ReadOnly, 0, -1 },
+ { 79, SVGMouseEventImpl::Button, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGMouseEventImpl::s_hashTable = { 2, 15, SVGMouseEventImpl__s_hashTableEntries, 11, SVGMouseEventImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMouseEventImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getRelatedTarget\0"
+ "initMouseEvent\0"
+ "getShiftKey\0"
+ "getClientX\0"
+ "getClientY\0"
+ "getCtrlKey\0"
+ "getMetaKey\0"
+ "getScreenX\0"
+ "getScreenY\0"
+ "getAltKey\0"
+ "getButton\0"
+};
+
+
+static const struct HashEntry SVGMouseEventImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 45, SVGMouseEventImpl::GetClientX, DontDelete|Function, 0, -1 },
+ { 89, SVGMouseEventImpl::GetScreenX, DontDelete|Function, 0, 13 },
+ { 100, SVGMouseEventImpl::GetScreenY, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 78, SVGMouseEventImpl::GetMetaKey, DontDelete|Function, 0, 15 },
+ { 67, SVGMouseEventImpl::GetCtrlKey, DontDelete|Function, 0, -1 },
+ { 33, SVGMouseEventImpl::GetShiftKey, DontDelete|Function, 0, 14 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 56, SVGMouseEventImpl::GetClientY, DontDelete|Function, 0, 16 },
+ { 111, SVGMouseEventImpl::GetAltKey, DontDelete|Function, 0, -1 },
+ { 121, SVGMouseEventImpl::GetButton, DontDelete|Function, 0, -1 },
+ { 1, SVGMouseEventImpl::GetRelatedTarget, DontDelete|Function, 0, 17 },
+ { 18, SVGMouseEventImpl::InitMouseEvent, DontDelete|Function, 15, -1 }
+};
+
+const struct HashTable SVGMouseEventImplProto::s_hashTable = { 2, 18, SVGMouseEventImplProto__s_hashTableEntries, 13, SVGMouseEventImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGExternalResourcesRequiredImpl.lut.h b/ksvg/data/SVGExternalResourcesRequiredImpl.lut.h
new file mode 100644
index 00000000..2361f729
--- /dev/null
+++ b/ksvg/data/SVGExternalResourcesRequiredImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGExternalResourcesRequiredImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGExternalResourcesRequiredImpl__s_hashTableStrings[] = {
+ "\0"
+ "externalResourcesRequired\0"
+};
+
+
+static const struct HashEntry SVGExternalResourcesRequiredImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGExternalResourcesRequiredImpl::ExternalResourcesRequired, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGExternalResourcesRequiredImpl::s_hashTable = { 2, 2, SVGExternalResourcesRequiredImpl__s_hashTableEntries, 2, SVGExternalResourcesRequiredImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGFitToViewBoxImpl.lut.h b/ksvg/data/SVGFitToViewBoxImpl.lut.h
new file mode 100644
index 00000000..7ef28728
--- /dev/null
+++ b/ksvg/data/SVGFitToViewBoxImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGFitToViewBoxImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGFitToViewBoxImpl__s_hashTableStrings[] = {
+ "\0"
+ "preserveAspectRatio\0"
+ "viewBox\0"
+};
+
+
+static const struct HashEntry SVGFitToViewBoxImpl__s_hashTableEntries[] = {
+ { 1, SVGFitToViewBoxImpl::PreserveAspectRatio, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 21, SVGFitToViewBoxImpl::ViewBox, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGFitToViewBoxImpl::s_hashTable = { 2, 3, SVGFitToViewBoxImpl__s_hashTableEntries, 3, SVGFitToViewBoxImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGForeignObjectElementImpl.lut.h b/ksvg/data/SVGForeignObjectElementImpl.lut.h
new file mode 100644
index 00000000..a53be40e
--- /dev/null
+++ b/ksvg/data/SVGForeignObjectElementImpl.lut.h
@@ -0,0 +1,26 @@
+/* Automatically generated from impl/SVGForeignObjectElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGForeignObjectElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "height\0"
+ "width\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGForeignObjectElementImpl__s_hashTableEntries[] = {
+ { 14, SVGForeignObjectElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 16, SVGForeignObjectElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGForeignObjectElementImpl::Height, DontDelete|ReadOnly, 0, -1 },
+ { 8, SVGForeignObjectElementImpl::Width, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGForeignObjectElementImpl::s_hashTable = { 2, 5, SVGForeignObjectElementImpl__s_hashTableEntries, 5, SVGForeignObjectElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGGlyphElementImpl.lut.h b/ksvg/data/SVGGlyphElementImpl.lut.h
new file mode 100644
index 00000000..b4f54c4e
--- /dev/null
+++ b/ksvg/data/SVGGlyphElementImpl.lut.h
@@ -0,0 +1,39 @@
+/* Automatically generated from impl/SVGGlyphElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGGlyphElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "vert-origin-x\0"
+ "vert-origin-y\0"
+ "arabic-form\0"
+ "horiz-adv-x\0"
+ "orientation\0"
+ "glyph-name\0"
+ "vert-adv-y\0"
+ "unicode\0"
+ "lang\0"
+ "d\0"
+};
+
+
+static const struct HashEntry SVGGlyphElementImpl__s_hashTableEntries[] = {
+ { 95, SVGGlyphElementImpl::Lang, DontDelete|ReadOnly, 0, -1 },
+ { 100, SVGGlyphElementImpl::D, DontDelete|ReadOnly, 0, -1 },
+ { 29, SVGGlyphElementImpl::ArabicForm, DontDelete|ReadOnly, 0, -1 },
+ { 41, SVGGlyphElementImpl::HorizAdvX, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 87, SVGGlyphElementImpl::Unicode, DontDelete|ReadOnly, 0, -1 },
+ { 76, SVGGlyphElementImpl::VertAdvY, DontDelete|ReadOnly, 0, -1 },
+ { 53, SVGGlyphElementImpl::Orientation, DontDelete|ReadOnly, 0, -1 },
+ { 65, SVGGlyphElementImpl::GlyphName, DontDelete|ReadOnly, 0, 11 },
+ { 15, SVGGlyphElementImpl::VertOriginY, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGGlyphElementImpl::VertOriginX, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGGlyphElementImpl::s_hashTable = { 2, 12, SVGGlyphElementImpl__s_hashTableEntries, 11, SVGGlyphElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGGlyphRefElementImpl.lut.h b/ksvg/data/SVGGlyphRefElementImpl.lut.h
new file mode 100644
index 00000000..b64aab0f
--- /dev/null
+++ b/ksvg/data/SVGGlyphRefElementImpl.lut.h
@@ -0,0 +1,28 @@
+/* Automatically generated from impl/SVGGlyphRefElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGGlyphRefElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "glyphRef\0"
+ "format\0"
+ "dx\0"
+ "dy\0"
+};
+
+
+static const struct HashEntry SVGGlyphRefElementImpl__s_hashTableEntries[] = {
+ { 1, SVGGlyphRefElementImpl::GlyphRef, DontDelete|ReadOnly, 0, -1 },
+ { 18, SVGGlyphRefElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 21, SVGGlyphRefElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 17, SVGGlyphRefElementImpl::Dx, DontDelete|ReadOnly, 0, -1 },
+ { 20, SVGGlyphRefElementImpl::Dy, DontDelete|ReadOnly, 0, -1 },
+ { 10, SVGGlyphRefElementImpl::Format, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGGlyphRefElementImpl::s_hashTable = { 2, 7, SVGGlyphRefElementImpl__s_hashTableEntries, 7, SVGGlyphRefElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGGradientElementImpl.lut.h b/ksvg/data/SVGGradientElementImpl.lut.h
new file mode 100644
index 00000000..84f5c8d9
--- /dev/null
+++ b/ksvg/data/SVGGradientElementImpl.lut.h
@@ -0,0 +1,51 @@
+/* Automatically generated from impl/SVGGradientElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGGradientElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "gradientTransform\0"
+ "gradientUnits\0"
+ "spreadMethod\0"
+};
+
+
+static const struct HashEntry SVGGradientElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 19, SVGGradientElementImpl::GradientUnits, DontDelete|ReadOnly, 0, 5 },
+ { 33, SVGGradientElementImpl::SpreadMethod, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGGradientElementImpl::GradientTransform, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGGradientElementImpl::s_hashTable = { 2, 6, SVGGradientElementImpl__s_hashTableEntries, 5, SVGGradientElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGGradientElementImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_SPREADMETHOD_REFLECT\0"
+ "SVG_SPREADMETHOD_UNKNOWN\0"
+ "SVG_SPREADMETHOD_REPEAT\0"
+ "SVG_SPREADMETHOD_PAD\0"
+};
+
+
+static const struct HashEntry SVGGradientElementImplConstructor__s_hashTableEntries[] = {
+ { 51, KSVG::SVG_SPREADMETHOD_REPEAT, DontDelete|ReadOnly, 0, -1 },
+ { 26, KSVG::SVG_SPREADMETHOD_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_SPREADMETHOD_REFLECT, DontDelete|ReadOnly, 0, -1 },
+ { 75, KSVG::SVG_SPREADMETHOD_PAD, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGGradientElementImplConstructor::s_hashTable = { 2, 5, SVGGradientElementImplConstructor__s_hashTableEntries, 5, SVGGradientElementImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGICCColorImpl.lut.h b/ksvg/data/SVGICCColorImpl.lut.h
new file mode 100644
index 00000000..3ad22c89
--- /dev/null
+++ b/ksvg/data/SVGICCColorImpl.lut.h
@@ -0,0 +1,23 @@
+/* Automatically generated from impl/SVGICCColorImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGICCColorImpl__s_hashTableStrings[] = {
+ "\0"
+ "colorProfile\0"
+ "colors\0"
+};
+
+
+static const struct HashEntry SVGICCColorImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGICCColorImpl::ColorProfile, DontDelete, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 14, SVGICCColorImpl::Colors, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGICCColorImpl::s_hashTable = { 2, 4, SVGICCColorImpl__s_hashTableEntries, 3, SVGICCColorImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGImageElementImpl.lut.h b/ksvg/data/SVGImageElementImpl.lut.h
new file mode 100644
index 00000000..9584ecb8
--- /dev/null
+++ b/ksvg/data/SVGImageElementImpl.lut.h
@@ -0,0 +1,31 @@
+/* Automatically generated from impl/SVGImageElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGImageElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "preserveAspectRatio\0"
+ "height\0"
+ "width\0"
+ "href\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGImageElementImpl__s_hashTableEntries[] = {
+ { 1, SVGImageElementImpl::PreserveAspectRatio, DontDelete|ReadOnly, 0, -1 },
+ { 39, SVGImageElementImpl::X, DontDelete|ReadOnly, 0, 7 },
+ { 41, SVGImageElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 21, SVGImageElementImpl::Height, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 28, SVGImageElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 34, SVGImageElementImpl::Href, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGImageElementImpl::s_hashTable = { 2, 8, SVGImageElementImpl__s_hashTableEntries, 7, SVGImageElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLangSpaceImpl.lut.h b/ksvg/data/SVGLangSpaceImpl.lut.h
new file mode 100644
index 00000000..d8c727c4
--- /dev/null
+++ b/ksvg/data/SVGLangSpaceImpl.lut.h
@@ -0,0 +1,24 @@
+/* Automatically generated from impl/SVGLangSpaceImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLangSpaceImpl__s_hashTableStrings[] = {
+ "\0"
+ "xmlspace\0"
+ "xmllang\0"
+};
+
+
+static const struct HashEntry SVGLangSpaceImpl__s_hashTableEntries[] = {
+ { 10, SVGLangSpaceImpl::XmlLang, DontDelete, 0, -1 },
+ { 1, SVGLangSpaceImpl::XmlSpace, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 13, SVGLangSpaceImpl::XmlLang, DontDelete, 0, -1 },
+ { 4, SVGLangSpaceImpl::XmlSpace, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGLangSpaceImpl::s_hashTable = { 2, 5, SVGLangSpaceImpl__s_hashTableEntries, 5, SVGLangSpaceImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLengthImpl.lut.h b/ksvg/data/SVGLengthImpl.lut.h
new file mode 100644
index 00000000..dfd88b2f
--- /dev/null
+++ b/ksvg/data/SVGLengthImpl.lut.h
@@ -0,0 +1,87 @@
+/* Automatically generated from impl/SVGLengthImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLengthImpl__s_hashTableStrings[] = {
+ "\0"
+ "valueInSpecifiedUnits\0"
+ "valueAsString\0"
+ "unitType\0"
+ "value\0"
+};
+
+
+static const struct HashEntry SVGLengthImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 37, SVGLengthImpl::UnitType, DontDelete|ReadOnly, 0, 5 },
+ { 23, SVGLengthImpl::ValueAsString, DontDelete, 0, -1 },
+ { 1, SVGLengthImpl::ValueInSpecifiedUnits, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 46, SVGLengthImpl::Value, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGLengthImpl::s_hashTable = { 2, 6, SVGLengthImpl__s_hashTableEntries, 5, SVGLengthImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLengthImplProto__s_hashTableStrings[] = {
+ "\0"
+ "convertToSpecifiedUnits\0"
+ "newValueSpecifiedUnits\0"
+};
+
+
+static const struct HashEntry SVGLengthImplProto__s_hashTableEntries[] = {
+ { 1, SVGLengthImpl::ConvertToSpecifiedUnits, DontDelete|Function, 1, -1 },
+ { 25, SVGLengthImpl::NewValueSpecifiedUnits, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGLengthImplProto::s_hashTable = { 2, 3, SVGLengthImplProto__s_hashTableEntries, 3, SVGLengthImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLengthImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_LENGTHTYPE_PERCENTAGE\0"
+ "SVG_LENGTHTYPE_UNKNOWN\0"
+ "SVG_LENGTHTYPE_NUMBER\0"
+ "SVG_LENGTHTYPE_EMS\0"
+ "SVG_LENGTHTYPE_EXS\0"
+ "SVG_LENGTHTYPE_CM\0"
+ "SVG_LENGTHTYPE_MM\0"
+ "SVG_LENGTHTYPE_PC\0"
+ "SVG_LENGTHTYPE_PT\0"
+ "SVG_LENGTHTYPE_PX\0"
+};
+
+
+static const struct HashEntry SVGLengthImplConstructor__s_hashTableEntries[] = {
+ { 1, KSVG::SVG_LENGTHTYPE_PERCENTAGE, DontDelete|ReadOnly, 0, -1 },
+ { 72, KSVG::SVG_LENGTHTYPE_EMS, DontDelete|ReadOnly, 0, 11 },
+ { 27, KSVG::SVG_LENGTHTYPE_UNKNOWN, DontDelete|ReadOnly, 0, 12 },
+ { 128, KSVG::SVG_LENGTHTYPE_MM, DontDelete|ReadOnly, 0, -1 },
+ { 110, KSVG::SVG_LENGTHTYPE_CM, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 182, KSVG::SVG_LENGTHTYPE_PX, DontDelete|ReadOnly, 0, -1 },
+ { 146, KSVG::SVG_LENGTHTYPE_PC, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 50, KSVG::SVG_LENGTHTYPE_NUMBER, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 91, KSVG::SVG_LENGTHTYPE_EXS, DontDelete|ReadOnly, 0, -1 },
+ { 164, KSVG::SVG_LENGTHTYPE_PT, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGLengthImplConstructor::s_hashTable = { 2, 13, SVGLengthImplConstructor__s_hashTableEntries, 11, SVGLengthImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLengthListImpl.lut.h b/ksvg/data/SVGLengthListImpl.lut.h
new file mode 100644
index 00000000..9f263f81
--- /dev/null
+++ b/ksvg/data/SVGLengthListImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGLengthListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLengthListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGLengthListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGLengthListImpl::s_hashTable = { 2, 2, SVGLengthListImpl__s_hashTableEntries, 2, SVGLengthListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLengthListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGLengthListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGLengthListImplProto::s_hashTable = { 2, 12, SVGLengthListImplProto__s_hashTableEntries, 11, SVGLengthListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLineElementImpl.lut.h b/ksvg/data/SVGLineElementImpl.lut.h
new file mode 100644
index 00000000..857b3ee2
--- /dev/null
+++ b/ksvg/data/SVGLineElementImpl.lut.h
@@ -0,0 +1,27 @@
+/* Automatically generated from impl/SVGLineElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLineElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "x2\0"
+ "y1\0"
+ "y2\0"
+};
+
+
+static const struct HashEntry SVGLineElementImpl__s_hashTableEntries[] = {
+ { 7, SVGLineElementImpl::Y1, DontDelete|ReadOnly, 0, 5 },
+ { 10, SVGLineElementImpl::Y2, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGLineElementImpl::X1, DontDelete|ReadOnly, 0, -1 },
+ { 4, SVGLineElementImpl::X2, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGLineElementImpl::s_hashTable = { 2, 6, SVGLineElementImpl__s_hashTableEntries, 5, SVGLineElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLinearGradientElementImpl.lut.h b/ksvg/data/SVGLinearGradientElementImpl.lut.h
new file mode 100644
index 00000000..30755f58
--- /dev/null
+++ b/ksvg/data/SVGLinearGradientElementImpl.lut.h
@@ -0,0 +1,27 @@
+/* Automatically generated from impl/SVGLinearGradientElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLinearGradientElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "x2\0"
+ "y1\0"
+ "y2\0"
+};
+
+
+static const struct HashEntry SVGLinearGradientElementImpl__s_hashTableEntries[] = {
+ { 7, SVGLinearGradientElementImpl::Y1, DontDelete|ReadOnly, 0, 5 },
+ { 10, SVGLinearGradientElementImpl::Y2, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGLinearGradientElementImpl::X1, DontDelete|ReadOnly, 0, -1 },
+ { 4, SVGLinearGradientElementImpl::X2, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGLinearGradientElementImpl::s_hashTable = { 2, 6, SVGLinearGradientElementImpl__s_hashTableEntries, 5, SVGLinearGradientElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGLocatableImpl.lut.h b/ksvg/data/SVGLocatableImpl.lut.h
new file mode 100644
index 00000000..5fcafcda
--- /dev/null
+++ b/ksvg/data/SVGLocatableImpl.lut.h
@@ -0,0 +1,49 @@
+/* Automatically generated from impl/SVGLocatableImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLocatableImpl__s_hashTableStrings[] = {
+ "\0"
+ "farthestViewportElement\0"
+ "nearestViewportElement\0"
+};
+
+
+static const struct HashEntry SVGLocatableImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 25, SVGLocatableImpl::NearestViewportElement, DontDelete, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGLocatableImpl::FarthestViewportElement, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGLocatableImpl::s_hashTable = { 2, 4, SVGLocatableImpl__s_hashTableEntries, 3, SVGLocatableImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGLocatableImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getTransformToElement\0"
+ "getScreenCTM\0"
+ "getBBox\0"
+ "getCTM\0"
+};
+
+
+static const struct HashEntry SVGLocatableImplProto__s_hashTableEntries[] = {
+ { 1, SVGLocatableImpl::GetTransformToElement, DontDelete|Function, 1, -1 },
+ { 23, SVGLocatableImpl::GetScreenCTM, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 36, SVGLocatableImpl::GetBBox, DontDelete|Function, 0, 5 },
+ { 0, 0, 0, 0, -1 },
+ { 44, SVGLocatableImpl::GetCTM, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGLocatableImplProto::s_hashTable = { 2, 6, SVGLocatableImplProto__s_hashTableEntries, 5, SVGLocatableImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGMarkerElementImpl.lut.h b/ksvg/data/SVGMarkerElementImpl.lut.h
new file mode 100644
index 00000000..d89e711c
--- /dev/null
+++ b/ksvg/data/SVGMarkerElementImpl.lut.h
@@ -0,0 +1,90 @@
+/* Automatically generated from impl/SVGMarkerElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMarkerElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "markerHeight\0"
+ "markerUnits\0"
+ "markerWidth\0"
+ "orientAngle\0"
+ "orientType\0"
+ "orient\0"
+ "refX\0"
+ "refY\0"
+};
+
+
+static const struct HashEntry SVGMarkerElementImpl__s_hashTableEntries[] = {
+ { 1, SVGMarkerElementImpl::MarkerHeight, DontDelete|ReadOnly, 0, 12 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 14, SVGMarkerElementImpl::MarkerUnits, DontDelete|ReadOnly, 0, -1 },
+ { 50, SVGMarkerElementImpl::OrientType, DontDelete|ReadOnly, 0, 13 },
+ { 68, SVGMarkerElementImpl::RefX, DontDelete|ReadOnly, 0, -1 },
+ { 73, SVGMarkerElementImpl::RefY, DontDelete|ReadOnly, 0, 11 },
+ { 26, SVGMarkerElementImpl::MarkerWidth, DontDelete|ReadOnly, 0, -1 },
+ { 38, SVGMarkerElementImpl::OrientAngle, DontDelete|ReadOnly, 0, -1 },
+ { 61, SVGMarkerElementImpl::Orient, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGMarkerElementImpl::s_hashTable = { 2, 14, SVGMarkerElementImpl__s_hashTableEntries, 11, SVGMarkerElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMarkerElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "setOrientToAngle\0"
+ "setOrientToAuto\0"
+};
+
+
+static const struct HashEntry SVGMarkerElementImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 18, SVGMarkerElementImpl::SetOrientToAuto, DontDelete|Function, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGMarkerElementImpl::SetOrientToAngle, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGMarkerElementImplProto::s_hashTable = { 2, 4, SVGMarkerElementImplProto__s_hashTableEntries, 3, SVGMarkerElementImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMarkerElementImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_MARKERUNITS_USERSPACEONUSE\0"
+ "SVG_MARKERUNITS_STROKEWIDTH\0"
+ "SVG_MARKER_ORIENT_UNKNOWN\0"
+ "SVG_MARKERUNITS_UNKNOWN\0"
+ "SVG_MARKER_ORIENT_ANGLE\0"
+ "SVG_MARKER_ORIENT_AUTO\0"
+};
+
+
+static const struct HashEntry SVGMarkerElementImplConstructor__s_hashTableEntries[] = {
+ { 110, KSVG::SVG_MARKER_ORIENT_ANGLE, DontDelete|ReadOnly, 0, -1 },
+ { 1, KSVG::SVG_MARKERUNITS_USERSPACEONUSE, DontDelete|ReadOnly, 0, -1 },
+ { 86, KSVG::SVG_MARKERUNITS_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 134, KSVG::SVG_MARKER_ORIENT_AUTO, DontDelete|ReadOnly, 0, -1 },
+ { 32, KSVG::SVG_MARKERUNITS_STROKEWIDTH, DontDelete|ReadOnly, 0, -1 },
+ { 60, KSVG::SVG_MARKER_ORIENT_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGMarkerElementImplConstructor::s_hashTable = { 2, 7, SVGMarkerElementImplConstructor__s_hashTableEntries, 7, SVGMarkerElementImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGMaskElementImpl.lut.h b/ksvg/data/SVGMaskElementImpl.lut.h
new file mode 100644
index 00000000..bcc32c39
--- /dev/null
+++ b/ksvg/data/SVGMaskElementImpl.lut.h
@@ -0,0 +1,31 @@
+/* Automatically generated from impl/SVGMaskElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMaskElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "maskContentUnits\0"
+ "maskUnits\0"
+ "height\0"
+ "width\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGMaskElementImpl__s_hashTableEntries[] = {
+ { 18, SVGMaskElementImpl::MaskUnits, DontDelete|ReadOnly, 0, -1 },
+ { 41, SVGMaskElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 43, SVGMaskElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGMaskElementImpl::MaskContentUnits, DontDelete|ReadOnly, 0, 7 },
+ { 0, 0, 0, 0, -1 },
+ { 35, SVGMaskElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 28, SVGMaskElementImpl::Height, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGMaskElementImpl::s_hashTable = { 2, 8, SVGMaskElementImpl__s_hashTableEntries, 7, SVGMaskElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGMatrixImpl.lut.h b/ksvg/data/SVGMatrixImpl.lut.h
new file mode 100644
index 00000000..05b84cb3
--- /dev/null
+++ b/ksvg/data/SVGMatrixImpl.lut.h
@@ -0,0 +1,74 @@
+/* Automatically generated from impl/SVGMatrixImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMatrixImpl__s_hashTableStrings[] = {
+ "\0"
+ "a\0"
+ "b\0"
+ "c\0"
+ "d\0"
+ "e\0"
+ "f\0"
+};
+
+
+static const struct HashEntry SVGMatrixImpl__s_hashTableEntries[] = {
+ { 3, SVGMatrixImpl::B, DontDelete, 0, -1 },
+ { 5, SVGMatrixImpl::C, DontDelete, 0, -1 },
+ { 7, SVGMatrixImpl::D, DontDelete, 0, -1 },
+ { 9, SVGMatrixImpl::E, DontDelete, 0, -1 },
+ { 11, SVGMatrixImpl::F, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGMatrixImpl::A, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGMatrixImpl::s_hashTable = { 2, 7, SVGMatrixImpl__s_hashTableEntries, 7, SVGMatrixImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGMatrixImplProto__s_hashTableStrings[] = {
+ "\0"
+ "rotateFromVector\0"
+ "scaleNonUniform\0"
+ "translate\0"
+ "multiply\0"
+ "inverse\0"
+ "rotate\0"
+ "flipX\0"
+ "flipY\0"
+ "scale\0"
+ "skewX\0"
+ "skewY\0"
+};
+
+
+static const struct HashEntry SVGMatrixImplProto__s_hashTableEntries[] = {
+ { 80, SVGMatrixImpl::Scale, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 61, SVGMatrixImpl::Rotate, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 18, SVGMatrixImpl::ScaleNonUniform, DontDelete|Function, 2, 14 },
+ { 1, SVGMatrixImpl::RotateFromVector, DontDelete|Function, 2, 15 },
+ { 53, SVGMatrixImpl::Inverse, DontDelete|Function, 0, 16 },
+ { 92, SVGMatrixImpl::SkewY, DontDelete|Function, 1, -1 },
+ { 44, SVGMatrixImpl::Multiply, DontDelete|Function, 1, 13 },
+ { 34, SVGMatrixImpl::Translate, DontDelete|Function, 2, -1 },
+ { 68, SVGMatrixImpl::FlipX, DontDelete|Function, 0, -1 },
+ { 74, SVGMatrixImpl::FlipY, DontDelete|Function, 0, -1 },
+ { 86, SVGMatrixImpl::SkewX, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGMatrixImplProto::s_hashTable = { 2, 17, SVGMatrixImplProto__s_hashTableEntries, 13, SVGMatrixImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGNumberImpl.lut.h b/ksvg/data/SVGNumberImpl.lut.h
new file mode 100644
index 00000000..eefcb452
--- /dev/null
+++ b/ksvg/data/SVGNumberImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGNumberImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGNumberImpl__s_hashTableStrings[] = {
+ "\0"
+ "value\0"
+};
+
+
+static const struct HashEntry SVGNumberImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGNumberImpl::Value, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGNumberImpl::s_hashTable = { 2, 2, SVGNumberImpl__s_hashTableEntries, 2, SVGNumberImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGNumberListImpl.lut.h b/ksvg/data/SVGNumberListImpl.lut.h
new file mode 100644
index 00000000..59edbafd
--- /dev/null
+++ b/ksvg/data/SVGNumberListImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGNumberListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGNumberListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGNumberListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGNumberListImpl::s_hashTable = { 2, 2, SVGNumberListImpl__s_hashTableEntries, 2, SVGNumberListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGNumberListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGNumberListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGNumberListImplProto::s_hashTable = { 2, 12, SVGNumberListImplProto__s_hashTableEntries, 11, SVGNumberListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPaintImpl.lut.h b/ksvg/data/SVGPaintImpl.lut.h
new file mode 100644
index 00000000..48c90b33
--- /dev/null
+++ b/ksvg/data/SVGPaintImpl.lut.h
@@ -0,0 +1,59 @@
+/* Automatically generated from impl/SVGPaintImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPaintImpl__s_hashTableStrings[] = {
+ "\0"
+ "paintType\0"
+ "uri\0"
+};
+
+
+static const struct HashEntry SVGPaintImpl__s_hashTableEntries[] = {
+ { 11, SVGPaintImpl::URI, DontDelete, 0, -1 },
+ { 1, SVGPaintImpl::PaintType, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPaintImpl::s_hashTable = { 2, 3, SVGPaintImpl__s_hashTableEntries, 3, SVGPaintImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPaintImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR\0"
+ "SVG_PAINTTYPE_URI_CURRENTCOLOR\0"
+ "SVG_PAINTTYPE_CURRENTCOLOR\0"
+ "SVG_PAINTTYPE_URI_RGBCOLOR\0"
+ "SVG_PAINTTYPE_RGBCOLOR\0"
+ "SVG_PAINTTYPE_URI_NONE\0"
+ "SVG_PAINTTYPE_UNKNOWN\0"
+ "SVG_PAINTTYPE_NONE\0"
+ "SVG_PAINTTYPE_URI\0"
+};
+
+
+static const struct HashEntry SVGPaintImplConstructor__s_hashTableEntries[] = {
+ { 145, KSVG::SVG_PAINTTYPE_URI_NONE, DontDelete|ReadOnly, 0, -1 },
+ { 95, KSVG::SVG_PAINTTYPE_URI_RGBCOLOR, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR, DontDelete|ReadOnly, 0, -1 },
+ { 68, KSVG::SVG_PAINTTYPE_CURRENTCOLOR, DontDelete|ReadOnly, 0, -1 },
+ { 190, KSVG::SVG_PAINTTYPE_NONE, DontDelete|ReadOnly, 0, -1 },
+ { 122, KSVG::SVG_PAINTTYPE_RGBCOLOR, DontDelete|ReadOnly, 0, 11 },
+ { 209, KSVG::SVG_PAINTTYPE_URI, DontDelete|ReadOnly, 0, -1 },
+ { 168, KSVG::SVG_PAINTTYPE_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 37, KSVG::SVG_PAINTTYPE_URI_CURRENTCOLOR, DontDelete|ReadOnly, 0, -1 },
+ { 122, KSVG::SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPaintImplConstructor::s_hashTable = { 2, 12, SVGPaintImplConstructor__s_hashTableEntries, 11, SVGPaintImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathElementImpl.lut.h b/ksvg/data/SVGPathElementImpl.lut.h
new file mode 100644
index 00000000..ccded107
--- /dev/null
+++ b/ksvg/data/SVGPathElementImpl.lut.h
@@ -0,0 +1,87 @@
+/* Automatically generated from impl/SVGPathElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "pathLength\0"
+ "d\0"
+};
+
+
+static const struct HashEntry SVGPathElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 12, SVGPathElementImpl::D, DontDelete|ReadOnly, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathElementImpl::PathLength, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPathElementImpl::s_hashTable = { 2, 4, SVGPathElementImpl__s_hashTableEntries, 3, SVGPathElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "createSVGPathSegCurvetoQuadraticAbs\0"
+ "createSVGPathSegCurvetoQuadraticRel\0"
+ "createSVGPathSegLinetoHorizontalAbs\0"
+ "createSVGPathSegLinetoHorizontalRel\0"
+ "createSVGPathSegLinetoVerticalAbs\0"
+ "createSVGPathSegLinetoVerticalRel\0"
+ "createSVGPathSegCurvetoCubicAbs\0"
+ "createSVGPathSegCurvetoCubicRel\0"
+ "createSVGPathSegClosePath\0"
+ "createSVGPathSegLinetoAbs\0"
+ "createSVGPathSegLinetoRel\0"
+ "createSVGPathSegMovetoAbs\0"
+ "createSVGPathSegMovetoRel\0"
+ "createSVGPathSegArcAbs\0"
+ "createSVGPathSegArcRel\0"
+ "getPathSegAtLength\0"
+ "getPointAtLength\0"
+ "getTotalLength\0"
+};
+
+
+static const struct HashEntry SVGPathElementImplProto__s_hashTableEntries[] = {
+ { 472, SVGPathElementImpl::GetPointAtLength, DontDelete|Function, 1, -1 },
+ { 453, SVGPathElementImpl::GetPathSegAtLength, DontDelete|Function, 1, 23 },
+ { 0, 0, 0, 0, -1 },
+ { 355, SVGPathElementImpl::CreateSVGPathSegMovetoAbs, DontDelete|Function, 2, -1 },
+ { 1, SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticAbs, DontDelete|Function, 4, 28 },
+ { 430, SVGPathElementImpl::CreateSVGPathSegArcRel, DontDelete|Function, 7, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 109, SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalRel, DontDelete|Function, 1, 25 },
+ { 0, 0, 0, 0, -1 },
+ { 303, SVGPathElementImpl::CreateSVGPathSegLinetoAbs, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 277, SVGPathElementImpl::CreateSVGPathSegClosePath, DontDelete|Function, 0, -1 },
+ { 245, SVGPathElementImpl::CreateSVGPathSegCurvetoCubicRel, DontDelete|Function, 6, 27 },
+ { 407, SVGPathElementImpl::CreateSVGPathSegArcAbs, DontDelete|Function, 7, -1 },
+ { 381, SVGPathElementImpl::CreateSVGPathSegMovetoRel, DontDelete|Function, 2, -1 },
+ { 37, SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticRel, DontDelete|Function, 4, 29 },
+ { 0, 0, 0, 0, -1 },
+ { 73, SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalAbs, DontDelete|Function, 1, -1 },
+ { 489, SVGPathElementImpl::GetTotalLength, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 179, SVGPathElementImpl::CreateSVGPathSegLinetoVerticalRel, DontDelete|Function, 1, -1 },
+ { 329, SVGPathElementImpl::CreateSVGPathSegLinetoRel, DontDelete|Function, 2, 24 },
+ { 213, SVGPathElementImpl::CreateSVGPathSegCurvetoCubicAbs, DontDelete|Function, 6, 26 },
+ { 145, SVGPathElementImpl::CreateSVGPathSegLinetoVerticalAbs, DontDelete|Function, 1, -1 },
+ { 213, SVGPathElementImpl::CreateSVGPathSegCurvetoCubicAbs, DontDelete|Function, 4, -1 },
+ { 245, SVGPathElementImpl::CreateSVGPathSegCurvetoCubicRel, DontDelete|Function, 4, -1 },
+ { 1, SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticAbs, DontDelete|Function, 2, -1 },
+ { 37, SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticRel, DontDelete|Function, 2, -1 }
+};
+
+const struct HashTable SVGPathElementImplProto::s_hashTable = { 2, 30, SVGPathElementImplProto__s_hashTableEntries, 23, SVGPathElementImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegArcImpl.lut.h b/ksvg/data/SVGPathSegArcImpl.lut.h
new file mode 100644
index 00000000..cfd8ffc8
--- /dev/null
+++ b/ksvg/data/SVGPathSegArcImpl.lut.h
@@ -0,0 +1,75 @@
+/* Automatically generated from impl/SVGPathSegArcImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegArcAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "largeArcFlag\0"
+ "sweepFlag\0"
+ "angle\0"
+ "r1\0"
+ "r2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegArcAbsImpl__s_hashTableEntries[] = {
+ { 38, SVGPathSegArcAbsImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 24, SVGPathSegArcAbsImpl::Angle, DontDelete, 0, 12 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGPathSegArcAbsImpl::R1, DontDelete, 0, -1 },
+ { 36, SVGPathSegArcAbsImpl::X, DontDelete, 0, 11 },
+ { 33, SVGPathSegArcAbsImpl::R2, DontDelete, 0, -1 },
+ { 1, SVGPathSegArcAbsImpl::LargeArcFlag, DontDelete, 0, 13 },
+ { 14, SVGPathSegArcAbsImpl::SweepFlag, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegArcAbsImpl::s_hashTable = { 2, 14, SVGPathSegArcAbsImpl__s_hashTableEntries, 11, SVGPathSegArcAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegArcRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "largeArcFlag\0"
+ "sweepFlag\0"
+ "angle\0"
+ "r1\0"
+ "r2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegArcRelImpl__s_hashTableEntries[] = {
+ { 38, SVGPathSegArcRelImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 24, SVGPathSegArcRelImpl::Angle, DontDelete, 0, 12 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGPathSegArcRelImpl::R1, DontDelete, 0, -1 },
+ { 36, SVGPathSegArcRelImpl::X, DontDelete, 0, 11 },
+ { 33, SVGPathSegArcRelImpl::R2, DontDelete, 0, -1 },
+ { 1, SVGPathSegArcRelImpl::LargeArcFlag, DontDelete, 0, 13 },
+ { 14, SVGPathSegArcRelImpl::SweepFlag, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegArcRelImpl::s_hashTable = { 2, 14, SVGPathSegArcRelImpl__s_hashTableEntries, 11, SVGPathSegArcRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegCurvetoCubicImpl.lut.h b/ksvg/data/SVGPathSegCurvetoCubicImpl.lut.h
new file mode 100644
index 00000000..dff7104b
--- /dev/null
+++ b/ksvg/data/SVGPathSegCurvetoCubicImpl.lut.h
@@ -0,0 +1,65 @@
+/* Automatically generated from impl/SVGPathSegCurvetoCubicImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoCubicAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "x2\0"
+ "y1\0"
+ "y2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoCubicAbsImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 13, SVGPathSegCurvetoCubicAbsImpl::X, DontDelete, 0, 7 },
+ { 15, SVGPathSegCurvetoCubicAbsImpl::Y, DontDelete, 0, 8 },
+ { 10, SVGPathSegCurvetoCubicAbsImpl::Y2, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoCubicAbsImpl::X1, DontDelete, 0, -1 },
+ { 7, SVGPathSegCurvetoCubicAbsImpl::Y1, DontDelete, 0, 9 },
+ { 4, SVGPathSegCurvetoCubicAbsImpl::X2, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoCubicAbsImpl::s_hashTable = { 2, 10, SVGPathSegCurvetoCubicAbsImpl__s_hashTableEntries, 7, SVGPathSegCurvetoCubicAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoCubicRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "x2\0"
+ "y1\0"
+ "y2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoCubicRelImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 13, SVGPathSegCurvetoCubicRelImpl::X, DontDelete, 0, 7 },
+ { 15, SVGPathSegCurvetoCubicRelImpl::Y, DontDelete, 0, 8 },
+ { 10, SVGPathSegCurvetoCubicRelImpl::Y2, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoCubicRelImpl::X1, DontDelete, 0, -1 },
+ { 7, SVGPathSegCurvetoCubicRelImpl::Y1, DontDelete, 0, 9 },
+ { 4, SVGPathSegCurvetoCubicRelImpl::X2, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoCubicRelImpl::s_hashTable = { 2, 10, SVGPathSegCurvetoCubicRelImpl__s_hashTableEntries, 7, SVGPathSegCurvetoCubicRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegCurvetoCubicSmoothImpl.lut.h b/ksvg/data/SVGPathSegCurvetoCubicSmoothImpl.lut.h
new file mode 100644
index 00000000..e84cd124
--- /dev/null
+++ b/ksvg/data/SVGPathSegCurvetoCubicSmoothImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGPathSegCurvetoCubicSmoothImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoCubicSmoothAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x2\0"
+ "y2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoCubicSmoothAbsImpl__s_hashTableEntries[] = {
+ { 7, SVGPathSegCurvetoCubicSmoothAbsImpl::X, DontDelete, 0, 5 },
+ { 9, SVGPathSegCurvetoCubicSmoothAbsImpl::Y, DontDelete, 0, 6 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoCubicSmoothAbsImpl::X2, DontDelete, 0, -1 },
+ { 4, SVGPathSegCurvetoCubicSmoothAbsImpl::Y2, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoCubicSmoothAbsImpl::s_hashTable = { 2, 7, SVGPathSegCurvetoCubicSmoothAbsImpl__s_hashTableEntries, 5, SVGPathSegCurvetoCubicSmoothAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoCubicSmoothRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x2\0"
+ "y2\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoCubicSmoothRelImpl__s_hashTableEntries[] = {
+ { 7, SVGPathSegCurvetoCubicSmoothRelImpl::X, DontDelete, 0, 5 },
+ { 9, SVGPathSegCurvetoCubicSmoothRelImpl::Y, DontDelete, 0, 6 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoCubicSmoothRelImpl::X2, DontDelete, 0, -1 },
+ { 4, SVGPathSegCurvetoCubicSmoothRelImpl::Y2, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoCubicSmoothRelImpl::s_hashTable = { 2, 7, SVGPathSegCurvetoCubicSmoothRelImpl__s_hashTableEntries, 5, SVGPathSegCurvetoCubicSmoothRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegCurvetoQuadraticImpl.lut.h b/ksvg/data/SVGPathSegCurvetoQuadraticImpl.lut.h
new file mode 100644
index 00000000..8513fdd5
--- /dev/null
+++ b/ksvg/data/SVGPathSegCurvetoQuadraticImpl.lut.h
@@ -0,0 +1,53 @@
+/* Automatically generated from impl/SVGPathSegCurvetoQuadraticImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoQuadraticAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "y1\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoQuadraticAbsImpl__s_hashTableEntries[] = {
+ { 7, SVGPathSegCurvetoQuadraticAbsImpl::X, DontDelete, 0, 5 },
+ { 9, SVGPathSegCurvetoQuadraticAbsImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoQuadraticAbsImpl::X1, DontDelete, 0, -1 },
+ { 4, SVGPathSegCurvetoQuadraticAbsImpl::Y1, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoQuadraticAbsImpl::s_hashTable = { 2, 6, SVGPathSegCurvetoQuadraticAbsImpl__s_hashTableEntries, 5, SVGPathSegCurvetoQuadraticAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoQuadraticRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x1\0"
+ "y1\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoQuadraticRelImpl__s_hashTableEntries[] = {
+ { 7, SVGPathSegCurvetoQuadraticRelImpl::X, DontDelete, 0, 5 },
+ { 9, SVGPathSegCurvetoQuadraticRelImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegCurvetoQuadraticRelImpl::X1, DontDelete, 0, -1 },
+ { 4, SVGPathSegCurvetoQuadraticRelImpl::Y1, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoQuadraticRelImpl::s_hashTable = { 2, 6, SVGPathSegCurvetoQuadraticRelImpl__s_hashTableEntries, 5, SVGPathSegCurvetoQuadraticRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegCurvetoQuadraticSmoothImpl.lut.h b/ksvg/data/SVGPathSegCurvetoQuadraticSmoothImpl.lut.h
new file mode 100644
index 00000000..6622c341
--- /dev/null
+++ b/ksvg/data/SVGPathSegCurvetoQuadraticSmoothImpl.lut.h
@@ -0,0 +1,43 @@
+/* Automatically generated from impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoQuadraticSmoothAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoQuadraticSmoothAbsImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegCurvetoQuadraticSmoothAbsImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegCurvetoQuadraticSmoothAbsImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoQuadraticSmoothAbsImpl::s_hashTable = { 2, 3, SVGPathSegCurvetoQuadraticSmoothAbsImpl__s_hashTableEntries, 3, SVGPathSegCurvetoQuadraticSmoothAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegCurvetoQuadraticSmoothRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegCurvetoQuadraticSmoothRelImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegCurvetoQuadraticSmoothRelImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegCurvetoQuadraticSmoothRelImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegCurvetoQuadraticSmoothRelImpl::s_hashTable = { 2, 3, SVGPathSegCurvetoQuadraticSmoothRelImpl__s_hashTableEntries, 3, SVGPathSegCurvetoQuadraticSmoothRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegImpl.lut.h b/ksvg/data/SVGPathSegImpl.lut.h
new file mode 100644
index 00000000..94436a77
--- /dev/null
+++ b/ksvg/data/SVGPathSegImpl.lut.h
@@ -0,0 +1,88 @@
+/* Automatically generated from impl/SVGPathSegImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegImpl__s_hashTableStrings[] = {
+ "\0"
+ "pathSegTypeAsLetter\0"
+ "pathSegType\0"
+};
+
+
+static const struct HashEntry SVGPathSegImpl__s_hashTableEntries[] = {
+ { 21, SVGPathSegImpl::PathSegType, DontDelete|ReadOnly, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegImpl::PathSegTypeAsLetter, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPathSegImpl::s_hashTable = { 2, 4, SVGPathSegImpl__s_hashTableEntries, 3, SVGPathSegImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS\0"
+ "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL\0"
+ "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS\0"
+ "PATHSEG_CURVETO_CUBIC_SMOOTH_REL\0"
+ "PATHSEG_CURVETO_QUADRATIC_ABS\0"
+ "PATHSEG_CURVETO_QUADRATIC_REL\0"
+ "PATHSEG_LINETO_HORIZONTAL_ABS\0"
+ "PATHSEG_LINETO_HORIZONTAL_REL\0"
+ "PATHSEG_LINETO_VERTICAL_ABS\0"
+ "PATHSEG_LINETO_VERTICAL_REL\0"
+ "PATHSEG_CURVETO_CUBIC_ABS\0"
+ "PATHSEG_CURVETO_CUBIC_REL\0"
+ "PATHSEG_LINETO_ABS\0"
+ "PATHSEG_LINETO_REL\0"
+ "PATHSEG_MOVETO_ABS\0"
+ "PATHSEG_MOVETO_REL\0"
+ "PATHSEG_CLOSEPATH\0"
+ "PATHSEG_ARC_ABS\0"
+ "PATHSEG_ARC_REL\0"
+ "PATHSEG_UNKNOWN\0"
+};
+
+
+static const struct HashEntry SVGPathSegImplConstructor__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 317, KSVG::PATHSEG_CURVETO_CUBIC_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 171, KSVG::PATHSEG_CURVETO_QUADRATIC_REL, DontDelete|ReadOnly, 0, 27 },
+ { 479, KSVG::PATHSEG_ARC_REL, DontDelete|ReadOnly, 0, -1 },
+ { 495, KSVG::PATHSEG_UNKNOWN, DontDelete|ReadOnly, 0, 23 },
+ { 369, KSVG::PATHSEG_LINETO_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 108, KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_REL, DontDelete|ReadOnly, 0, 28 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 426, KSVG::PATHSEG_MOVETO_REL, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 343, KSVG::PATHSEG_CURVETO_CUBIC_REL, DontDelete|ReadOnly, 0, 24 },
+ { 463, KSVG::PATHSEG_ARC_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 75, KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 231, KSVG::PATHSEG_LINETO_HORIZONTAL_REL, DontDelete|ReadOnly, 0, -1 },
+ { 388, KSVG::PATHSEG_LINETO_REL, DontDelete|ReadOnly, 0, -1 },
+ { 38, KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, DontDelete|ReadOnly, 0, -1 },
+ { 407, KSVG::PATHSEG_MOVETO_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 445, KSVG::PATHSEG_CLOSEPATH, DontDelete|ReadOnly, 0, 25 },
+ { 141, KSVG::PATHSEG_CURVETO_QUADRATIC_ABS, DontDelete|ReadOnly, 0, 26 },
+ { 201, KSVG::PATHSEG_LINETO_HORIZONTAL_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 261, KSVG::PATHSEG_LINETO_VERTICAL_ABS, DontDelete|ReadOnly, 0, -1 },
+ { 289, KSVG::PATHSEG_LINETO_VERTICAL_REL, DontDelete|ReadOnly, 0, -1 },
+ { 1, KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPathSegImplConstructor::s_hashTable = { 2, 29, SVGPathSegImplConstructor__s_hashTableEntries, 23, SVGPathSegImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegLinetoHorizontalImpl.lut.h b/ksvg/data/SVGPathSegLinetoHorizontalImpl.lut.h
new file mode 100644
index 00000000..768ac3a3
--- /dev/null
+++ b/ksvg/data/SVGPathSegLinetoHorizontalImpl.lut.h
@@ -0,0 +1,39 @@
+/* Automatically generated from impl/SVGPathSegLinetoHorizontalImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoHorizontalAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoHorizontalAbsImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegLinetoHorizontalAbsImpl::X, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoHorizontalAbsImpl::s_hashTable = { 2, 2, SVGPathSegLinetoHorizontalAbsImpl__s_hashTableEntries, 2, SVGPathSegLinetoHorizontalAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoHorizontalRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoHorizontalRelImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegLinetoHorizontalRelImpl::X, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoHorizontalRelImpl::s_hashTable = { 2, 2, SVGPathSegLinetoHorizontalRelImpl__s_hashTableEntries, 2, SVGPathSegLinetoHorizontalRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegLinetoImpl.lut.h b/ksvg/data/SVGPathSegLinetoImpl.lut.h
new file mode 100644
index 00000000..5d754cdf
--- /dev/null
+++ b/ksvg/data/SVGPathSegLinetoImpl.lut.h
@@ -0,0 +1,43 @@
+/* Automatically generated from impl/SVGPathSegLinetoImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoAbsImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegLinetoAbsImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegLinetoAbsImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoAbsImpl::s_hashTable = { 2, 3, SVGPathSegLinetoAbsImpl__s_hashTableEntries, 3, SVGPathSegLinetoAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoRelImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegLinetoRelImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegLinetoRelImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoRelImpl::s_hashTable = { 2, 3, SVGPathSegLinetoRelImpl__s_hashTableEntries, 3, SVGPathSegLinetoRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegLinetoVerticalImpl.lut.h b/ksvg/data/SVGPathSegLinetoVerticalImpl.lut.h
new file mode 100644
index 00000000..1a48baaa
--- /dev/null
+++ b/ksvg/data/SVGPathSegLinetoVerticalImpl.lut.h
@@ -0,0 +1,39 @@
+/* Automatically generated from impl/SVGPathSegLinetoVerticalImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoVerticalAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoVerticalAbsImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegLinetoVerticalAbsImpl::Y, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoVerticalAbsImpl::s_hashTable = { 2, 2, SVGPathSegLinetoVerticalAbsImpl__s_hashTableEntries, 2, SVGPathSegLinetoVerticalAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegLinetoVerticalRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegLinetoVerticalRelImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPathSegLinetoVerticalRelImpl::Y, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGPathSegLinetoVerticalRelImpl::s_hashTable = { 2, 2, SVGPathSegLinetoVerticalRelImpl__s_hashTableEntries, 2, SVGPathSegLinetoVerticalRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegListImpl.lut.h b/ksvg/data/SVGPathSegListImpl.lut.h
new file mode 100644
index 00000000..8c4df29a
--- /dev/null
+++ b/ksvg/data/SVGPathSegListImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGPathSegListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGPathSegListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegListImpl::s_hashTable = { 2, 2, SVGPathSegListImpl__s_hashTableEntries, 2, SVGPathSegListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGPathSegListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGPathSegListImplProto::s_hashTable = { 2, 12, SVGPathSegListImplProto__s_hashTableEntries, 11, SVGPathSegListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPathSegMovetoImpl.lut.h b/ksvg/data/SVGPathSegMovetoImpl.lut.h
new file mode 100644
index 00000000..60f1c70f
--- /dev/null
+++ b/ksvg/data/SVGPathSegMovetoImpl.lut.h
@@ -0,0 +1,43 @@
+/* Automatically generated from impl/SVGPathSegMovetoImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegMovetoAbsImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegMovetoAbsImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegMovetoAbsImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegMovetoAbsImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegMovetoAbsImpl::s_hashTable = { 2, 3, SVGPathSegMovetoAbsImpl__s_hashTableEntries, 3, SVGPathSegMovetoAbsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPathSegMovetoRelImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPathSegMovetoRelImpl__s_hashTableEntries[] = {
+ { 1, SVGPathSegMovetoRelImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPathSegMovetoRelImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPathSegMovetoRelImpl::s_hashTable = { 2, 3, SVGPathSegMovetoRelImpl__s_hashTableEntries, 3, SVGPathSegMovetoRelImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPatternElementImpl.lut.h b/ksvg/data/SVGPatternElementImpl.lut.h
new file mode 100644
index 00000000..dc5b4527
--- /dev/null
+++ b/ksvg/data/SVGPatternElementImpl.lut.h
@@ -0,0 +1,37 @@
+/* Automatically generated from impl/SVGPatternElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPatternElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "patternContentUnits\0"
+ "patternTransform\0"
+ "patternUnits\0"
+ "height\0"
+ "width\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPatternElementImpl__s_hashTableEntries[] = {
+ { 66, SVGPatternElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGPatternElementImpl::PatternContentUnits, DontDelete|ReadOnly, 0, -1 },
+ { 58, SVGPatternElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 51, SVGPatternElementImpl::Height, DontDelete|ReadOnly, 0, 12 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 64, SVGPatternElementImpl::X, DontDelete|ReadOnly, 0, 11 },
+ { 38, SVGPatternElementImpl::PatternUnits, DontDelete|ReadOnly, 0, -1 },
+ { 21, SVGPatternElementImpl::PatternTransform, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPatternElementImpl::s_hashTable = { 2, 13, SVGPatternElementImpl__s_hashTableEntries, 11, SVGPatternElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPointImpl.lut.h b/ksvg/data/SVGPointImpl.lut.h
new file mode 100644
index 00000000..d024c947
--- /dev/null
+++ b/ksvg/data/SVGPointImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGPointImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPointImpl__s_hashTableStrings[] = {
+ "\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGPointImpl__s_hashTableEntries[] = {
+ { 1, SVGPointImpl::X, DontDelete, 0, -1 },
+ { 3, SVGPointImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPointImpl::s_hashTable = { 2, 3, SVGPointImpl__s_hashTableEntries, 3, SVGPointImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPointListImpl.lut.h b/ksvg/data/SVGPointListImpl.lut.h
new file mode 100644
index 00000000..f483be1e
--- /dev/null
+++ b/ksvg/data/SVGPointListImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGPointListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPointListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGPointListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPointListImpl::s_hashTable = { 2, 2, SVGPointListImpl__s_hashTableEntries, 2, SVGPointListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPointListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGPointListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGPointListImplProto::s_hashTable = { 2, 12, SVGPointListImplProto__s_hashTableEntries, 11, SVGPointListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGPreserveAspectRatioImpl.lut.h b/ksvg/data/SVGPreserveAspectRatioImpl.lut.h
new file mode 100644
index 00000000..3b73e594
--- /dev/null
+++ b/ksvg/data/SVGPreserveAspectRatioImpl.lut.h
@@ -0,0 +1,73 @@
+/* Automatically generated from impl/SVGPreserveAspectRatioImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPreserveAspectRatioImpl__s_hashTableStrings[] = {
+ "\0"
+ "meetOrSlice\0"
+ "align\0"
+};
+
+
+static const struct HashEntry SVGPreserveAspectRatioImpl__s_hashTableEntries[] = {
+ { 1, SVGPreserveAspectRatioImpl::MeetOrSlice, DontDelete, 0, -1 },
+ { 13, SVGPreserveAspectRatioImpl::Align, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGPreserveAspectRatioImpl::s_hashTable = { 2, 3, SVGPreserveAspectRatioImpl__s_hashTableEntries, 3, SVGPreserveAspectRatioImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGPreserveAspectRatioImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_PRESERVEASPECTRATIO_XMAXYMAX\0"
+ "SVG_PRESERVEASPECTRATIO_XMAXYMID\0"
+ "SVG_PRESERVEASPECTRATIO_XMAXYMIN\0"
+ "SVG_PRESERVEASPECTRATIO_XMIDYMAX\0"
+ "SVG_PRESERVEASPECTRATIO_XMIDYMID\0"
+ "SVG_PRESERVEASPECTRATIO_XMIDYMIN\0"
+ "SVG_PRESERVEASPECTRATIO_XMINYMAX\0"
+ "SVG_PRESERVEASPECTRATIO_XMINYMID\0"
+ "SVG_PRESERVEASPECTRATIO_XMINYMIN\0"
+ "SVG_PRESERVEASPECTRATIO_UNKNOWN\0"
+ "SVG_PRESERVEASPECTRATIO_NONE\0"
+ "SVG_MEETORSLICE_UNKNOWN\0"
+ "SVG_MEETORSLICE_SLICE\0"
+ "SVG_MEETORSLICE_MEET\0"
+};
+
+
+static const struct HashEntry SVGPreserveAspectRatioImplConstructor__s_hashTableEntries[] = {
+ { 67, KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMIN, DontDelete|ReadOnly, 0, 18 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMAX, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 166, KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMIN, DontDelete|ReadOnly, 0, 17 },
+ { 0, 0, 0, 0, -1 },
+ { 34, KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMID, DontDelete|ReadOnly, 0, 19 },
+ { 0, 0, 0, 0, -1 },
+ { 330, KSVG::SVG_PRESERVEASPECTRATIO_NONE, DontDelete|ReadOnly, 0, -1 },
+ { 298, KSVG::SVG_PRESERVEASPECTRATIO_UNKNOWN, DontDelete|ReadOnly, 0, 20 },
+ { 383, KSVG::SVG_MEETORSLICE_SLICE, DontDelete|ReadOnly, 0, -1 },
+ { 133, KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMID, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 265, KSVG::SVG_PRESERVEASPECTRATIO_XMINYMIN, DontDelete|ReadOnly, 0, -1 },
+ { 359, KSVG::SVG_MEETORSLICE_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 232, KSVG::SVG_PRESERVEASPECTRATIO_XMINYMID, DontDelete|ReadOnly, 0, -1 },
+ { 199, KSVG::SVG_PRESERVEASPECTRATIO_XMINYMAX, DontDelete|ReadOnly, 0, -1 },
+ { 100, KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMAX, DontDelete|ReadOnly, 0, -1 },
+ { 405, KSVG::SVG_MEETORSLICE_MEET, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGPreserveAspectRatioImplConstructor::s_hashTable = { 2, 21, SVGPreserveAspectRatioImplConstructor__s_hashTableEntries, 17, SVGPreserveAspectRatioImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGRadialGradientElementImpl.lut.h b/ksvg/data/SVGRadialGradientElementImpl.lut.h
new file mode 100644
index 00000000..ab0f702e
--- /dev/null
+++ b/ksvg/data/SVGRadialGradientElementImpl.lut.h
@@ -0,0 +1,30 @@
+/* Automatically generated from impl/SVGRadialGradientElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGRadialGradientElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "cx\0"
+ "cy\0"
+ "fx\0"
+ "fy\0"
+ "r\0"
+};
+
+
+static const struct HashEntry SVGRadialGradientElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGRadialGradientElementImpl::Cx, DontDelete|ReadOnly, 0, 7 },
+ { 4, SVGRadialGradientElementImpl::Cy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 7, SVGRadialGradientElementImpl::Fx, DontDelete|ReadOnly, 0, -1 },
+ { 10, SVGRadialGradientElementImpl::Fy, DontDelete|ReadOnly, 0, -1 },
+ { 13, SVGRadialGradientElementImpl::R, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGRadialGradientElementImpl::s_hashTable = { 2, 8, SVGRadialGradientElementImpl__s_hashTableEntries, 7, SVGRadialGradientElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGRectElementImpl.lut.h b/ksvg/data/SVGRectElementImpl.lut.h
new file mode 100644
index 00000000..d51c06c9
--- /dev/null
+++ b/ksvg/data/SVGRectElementImpl.lut.h
@@ -0,0 +1,29 @@
+/* Automatically generated from impl/SVGRectElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGRectElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "height\0"
+ "width\0"
+ "rx\0"
+ "ry\0"
+};
+
+
+static const struct HashEntry SVGRectElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 15, SVGRectElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 18, SVGRectElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGRectElementImpl::Height, DontDelete|ReadOnly, 0, 7 },
+ { 17, SVGRectElementImpl::Ry, DontDelete|ReadOnly, 0, -1 },
+ { 8, SVGRectElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 14, SVGRectElementImpl::Rx, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGRectElementImpl::s_hashTable = { 2, 8, SVGRectElementImpl__s_hashTableEntries, 7, SVGRectElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGRectImpl.lut.h b/ksvg/data/SVGRectImpl.lut.h
new file mode 100644
index 00000000..439835bc
--- /dev/null
+++ b/ksvg/data/SVGRectImpl.lut.h
@@ -0,0 +1,26 @@
+/* Automatically generated from impl/SVGRectImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGRectImpl__s_hashTableStrings[] = {
+ "\0"
+ "height\0"
+ "width\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGRectImpl__s_hashTableEntries[] = {
+ { 14, SVGRectImpl::X, DontDelete, 0, -1 },
+ { 16, SVGRectImpl::Y, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGRectImpl::Height, DontDelete, 0, -1 },
+ { 8, SVGRectImpl::Width, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGRectImpl::s_hashTable = { 2, 5, SVGRectImpl__s_hashTableEntries, 5, SVGRectImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGSVGElementImpl.lut.h b/ksvg/data/SVGSVGElementImpl.lut.h
new file mode 100644
index 00000000..530095f6
--- /dev/null
+++ b/ksvg/data/SVGSVGElementImpl.lut.h
@@ -0,0 +1,136 @@
+/* Automatically generated from impl/SVGSVGElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGSVGElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "screenPixelToMillimeterX\0"
+ "screenPixelToMillimeterY\0"
+ "pixelUnitToMillimeterX\0"
+ "pixelUnitToMillimeterY\0"
+ "contentScriptType\0"
+ "contentStyleType\0"
+ "currentTranslate\0"
+ "useCurrentView\0"
+ "currentScale\0"
+ "onresize\0"
+ "onscroll\0"
+ "onunload\0"
+ "viewport\0"
+ "onerror\0"
+ "height\0"
+ "onzoom\0"
+ "width\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGSVGElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 186, SVGSVGElementImpl::OnScroll, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 241, SVGSVGElementImpl::X, DontDelete|ReadOnly, 0, 27 },
+ { 243, SVGSVGElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 228, SVGSVGElementImpl::OnZoom, DontDelete, 0, -1 },
+ { 115, SVGSVGElementImpl::ContentStyleType, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 149, SVGSVGElementImpl::UseCurrentView, DontDelete, 0, 24 },
+ { 221, SVGSVGElementImpl::Height, DontDelete|ReadOnly, 0, 23 },
+ { 74, SVGSVGElementImpl::PixelUnitToMillimeterY, DontDelete|ReadOnly, 0, 25 },
+ { 0, 0, 0, 0, -1 },
+ { 235, SVGSVGElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 97, SVGSVGElementImpl::ContentScriptType, DontDelete, 0, 26 },
+ { 164, SVGSVGElementImpl::CurrentScale, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGSVGElementImpl::ScreenPixelToMillimeterX, DontDelete|ReadOnly, 0, -1 },
+ { 26, SVGSVGElementImpl::ScreenPixelToMillimeterY, DontDelete|ReadOnly, 0, -1 },
+ { 204, SVGSVGElementImpl::Viewport, DontDelete|ReadOnly, 0, -1 },
+ { 51, SVGSVGElementImpl::PixelUnitToMillimeterX, DontDelete|ReadOnly, 0, -1 },
+ { 132, SVGSVGElementImpl::CurrentTranslate, DontDelete|ReadOnly, 0, -1 },
+ { 195, SVGSVGElementImpl::OnUnload, DontDelete, 0, -1 },
+ { 213, SVGSVGElementImpl::OnError, DontDelete, 0, -1 },
+ { 177, SVGSVGElementImpl::OnResize, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGSVGElementImpl::s_hashTable = { 2, 28, SVGSVGElementImpl__s_hashTableEntries, 23, SVGSVGElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGSVGElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "createSVGTransformFromMatrix\0"
+ "getIntersectionList\0"
+ "createSVGTransform\0"
+ "unsuspendRedrawAll\0"
+ "checkIntersection\0"
+ "unpauseAnimations\0"
+ "animationsPaused\0"
+ "getEnclosureList\0"
+ "createSVGLength\0"
+ "createSVGMatrix\0"
+ "createSVGNumber\0"
+ "unsuspendRedraw\0"
+ "checkEnclosure\0"
+ "createSVGAngle\0"
+ "createSVGPoint\0"
+ "getCurrentTime\0"
+ "getElementById\0"
+ "setCurrentTime\0"
+ "createSVGRect\0"
+ "deselectAll\0"
+ "forceRedraw\0"
+};
+
+
+static const struct HashEntry SVGSVGElementImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGSVGElementImpl::GetIntersectionList, DontDelete|Function, 2, 34 },
+ { 124, SVGSVGElementImpl::AnimationsPaused, DontDelete|Function, 0, -1 },
+ { 222, SVGSVGElementImpl::CheckEnclosure, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 190, SVGSVGElementImpl::CreateSVGNumber, DontDelete|Function, 0, 30 },
+ { 0, 0, 0, 0, -1 },
+ { 267, SVGSVGElementImpl::GetCurrentTime, DontDelete|Function, 0, -1 },
+ { 338, SVGSVGElementImpl::ForceRedraw, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 88, SVGSVGElementImpl::CheckIntersection, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 106, SVGSVGElementImpl::UnpauseAnimations, DontDelete|Function, 0, -1 },
+ { 1, SVGSVGElementImpl::CreateSVGTransformFromMatrix, DontDelete|Function, 1, 29 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 174, SVGSVGElementImpl::CreateSVGMatrix, DontDelete|Function, 0, -1 },
+ { 312, SVGSVGElementImpl::CreateSVGRect, DontDelete|Function, 0, 31 },
+ { 208, SVGSVGElementImpl::SuspendRedraw, DontDelete|Function, 1, 32 },
+ { 237, SVGSVGElementImpl::CreateSVGAngle, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 141, SVGSVGElementImpl::GetEnclosureList, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 50, SVGSVGElementImpl::CreateSVGTransform, DontDelete|Function, 0, -1 },
+ { 252, SVGSVGElementImpl::CreateSVGPoint, DontDelete|Function, 0, -1 },
+ { 158, SVGSVGElementImpl::CreateSVGLength, DontDelete|Function, 0, -1 },
+ { 206, SVGSVGElementImpl::UnsuspendRedraw, DontDelete|Function, 1, -1 },
+ { 69, SVGSVGElementImpl::UnsuspendRedrawAll, DontDelete|Function, 0, -1 },
+ { 108, SVGSVGElementImpl::PauseAnimations, DontDelete|Function, 0, -1 },
+ { 297, SVGSVGElementImpl::SetCurrentTime, DontDelete|Function, 1, 33 },
+ { 326, SVGSVGElementImpl::DeselectAll, DontDelete|Function, 0, -1 },
+ { 282, SVGSVGElementImpl::GetElementById, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGSVGElementImplProto::s_hashTable = { 2, 35, SVGSVGElementImplProto__s_hashTableEntries, 29, SVGSVGElementImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGScriptElementImpl.lut.h b/ksvg/data/SVGScriptElementImpl.lut.h
new file mode 100644
index 00000000..661e35a2
--- /dev/null
+++ b/ksvg/data/SVGScriptElementImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGScriptElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGScriptElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "type\0"
+};
+
+
+static const struct HashEntry SVGScriptElementImpl__s_hashTableEntries[] = {
+ { 1, SVGScriptElementImpl::Type, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGScriptElementImpl::s_hashTable = { 2, 2, SVGScriptElementImpl__s_hashTableEntries, 2, SVGScriptElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGStopElementImpl.lut.h b/ksvg/data/SVGStopElementImpl.lut.h
new file mode 100644
index 00000000..5bdc3a98
--- /dev/null
+++ b/ksvg/data/SVGStopElementImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGStopElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStopElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "stop-opacity\0"
+ "offset\0"
+};
+
+
+static const struct HashEntry SVGStopElementImpl__s_hashTableEntries[] = {
+ { 1, SVGStopElementImpl::StopOpacity, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 14, SVGStopElementImpl::Offset, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGStopElementImpl::s_hashTable = { 2, 3, SVGStopElementImpl__s_hashTableEntries, 3, SVGStopElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGStringListImpl.lut.h b/ksvg/data/SVGStringListImpl.lut.h
new file mode 100644
index 00000000..db89d010
--- /dev/null
+++ b/ksvg/data/SVGStringListImpl.lut.h
@@ -0,0 +1,74 @@
+/* Automatically generated from impl/SVGStringListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SharedString__s_hashTableStrings[] = {
+ "\0"
+ "dummy\0"
+};
+
+
+static const struct HashEntry SharedString__s_hashTableEntries[] = {
+ { 1, SharedString::Dummy, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SharedString::s_hashTable = { 2, 2, SharedString__s_hashTableEntries, 2, SharedString__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStringListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGStringListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGStringListImpl::s_hashTable = { 2, 2, SVGStringListImpl__s_hashTableEntries, 2, SVGStringListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStringListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGStringListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGStringListImplProto::s_hashTable = { 2, 12, SVGStringListImplProto__s_hashTableEntries, 11, SVGStringListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGStylableImpl.lut.h b/ksvg/data/SVGStylableImpl.lut.h
new file mode 100644
index 00000000..f6e0570f
--- /dev/null
+++ b/ksvg/data/SVGStylableImpl.lut.h
@@ -0,0 +1,143 @@
+/* Automatically generated from impl/SVGStylableImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStylableImpl__s_hashTableStrings[] = {
+ "\0"
+ "glyph-orientation-horizontal\0"
+ "glyph-orientation-vertical\0"
+ "color-interpolation\0"
+ "stroke-dashoffset\0"
+ "stroke-miterlimit\0"
+ "stroke-dasharray\0"
+ "stroke-linejoin\0"
+ "text-decoration\0"
+ "baseline-shift\0"
+ "letter-spacing\0"
+ "pointer-events\0"
+ "stroke-linecap\0"
+ "stroke-opacity\0"
+ "color-profile\0"
+ "fill-opacity\0"
+ "marker-start\0"
+ "stroke-width\0"
+ "unicode-bidi\0"
+ "word-spacing\0"
+ "writing-mode\0"
+ "font-family\0"
+ "font-weight\0"
+ "text-anchor\0"
+ "font-style\0"
+ "marker-end\0"
+ "marker-mid\0"
+ "stop-color\0"
+ "visibility\0"
+ "className\0"
+ "clip-path\0"
+ "clip-rule\0"
+ "direction\0"
+ "fill-rule\0"
+ "font-size\0"
+ "overflow\0"
+ "display\0"
+ "cursor\0"
+ "marker\0"
+ "stroke\0"
+ "clip\0"
+ "fill\0"
+ "mask\0"
+};
+
+
+static const struct HashEntry SVGStylableImpl__s_hashTableEntries[] = {
+ { 523, SVGStylableImpl::Fill, DontDelete|ReadOnly, 0, -1 },
+ { 518, SVGStylableImpl::Clip, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 341, SVGStylableImpl::FontWeight, DontDelete|ReadOnly, 0, -1 },
+ { 353, SVGStylableImpl::TextAnchor, DontDelete|ReadOnly, 0, 52 },
+ { 511, SVGStylableImpl::Stroke, DontDelete|ReadOnly, 0, 56 },
+ { 251, SVGStylableImpl::FillOpacity, DontDelete|ReadOnly, 0, -1 },
+ { 398, SVGStylableImpl::StopColor, DontDelete|ReadOnly, 0, 61 },
+ { 256, SVGStylableImpl::Opacity, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 95, SVGStylableImpl::StrokeMiterlimit, DontDelete|ReadOnly, 0, 49 },
+ { 497, SVGStylableImpl::Cursor, DontDelete|ReadOnly, 0, 60 },
+ { 222, SVGStylableImpl::StrokeOpacity, DontDelete|ReadOnly, 0, 62 },
+ { 130, SVGStylableImpl::StrokeLineJoin, DontDelete|ReadOnly, 0, 53 },
+ { 409, SVGStylableImpl::Visibility, DontDelete|ReadOnly, 0, 57 },
+ { 316, SVGStylableImpl::WritingMode, DontDelete|ReadOnly, 0, 58 },
+ { 0, 0, 0, 0, -1 },
+ { 192, SVGStylableImpl::PointerEvents, DontDelete|ReadOnly, 0, 63 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 450, SVGStylableImpl::Direction, DontDelete|ReadOnly, 0, 51 },
+ { 0, 0, 0, 0, -1 },
+ { 264, SVGStylableImpl::MarkerStart, DontDelete|ReadOnly, 0, 59 },
+ { 0, 0, 0, 0, -1 },
+ { 237, SVGStylableImpl::ColorProfile, DontDelete|ReadOnly, 0, -1 },
+ { 420, SVGStylableImpl::ClassName, DontDelete|ReadOnly, 0, 48 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 57, SVGStylableImpl::ColorInterpolation, DontDelete|ReadOnly, 0, -1 },
+ { 277, SVGStylableImpl::StrokeWidth, DontDelete|ReadOnly, 0, 47 },
+ { 177, SVGStylableImpl::LetterSpacing, DontDelete|ReadOnly, 0, -1 },
+ { 77, SVGStylableImpl::StrokeDashOffset, DontDelete|ReadOnly, 0, -1 },
+ { 470, SVGStylableImpl::FontSize, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 480, SVGStylableImpl::Overflow, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 370, SVGStylableImpl::Style, DontDelete|ReadOnly, 0, -1 },
+ { 329, SVGStylableImpl::FontFamily, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 207, SVGStylableImpl::StrokeLineCap, DontDelete|ReadOnly, 0, 55 },
+ { 403, SVGStylableImpl::Color, DontDelete|ReadOnly, 0, -1 },
+ { 365, SVGStylableImpl::FontStyle, DontDelete|ReadOnly, 0, 50 },
+ { 146, SVGStylableImpl::TextDecoration, DontDelete|ReadOnly, 0, 54 },
+ { 290, SVGStylableImpl::UnicodeBidi, DontDelete|ReadOnly, 0, -1 },
+ { 430, SVGStylableImpl::ClipPath, DontDelete|ReadOnly, 0, 64 },
+ { 387, SVGStylableImpl::MarkerMid, DontDelete|ReadOnly, 0, -1 },
+ { 376, SVGStylableImpl::MarkerEnd, DontDelete|ReadOnly, 0, -1 },
+ { 504, SVGStylableImpl::Marker, DontDelete|ReadOnly, 0, -1 },
+ { 489, SVGStylableImpl::Display, DontDelete|ReadOnly, 0, -1 },
+ { 460, SVGStylableImpl::FillRule, DontDelete|ReadOnly, 0, -1 },
+ { 440, SVGStylableImpl::ClipRule, DontDelete|ReadOnly, 0, -1 },
+ { 113, SVGStylableImpl::StrokeDashArray, DontDelete|ReadOnly, 0, -1 },
+ { 162, SVGStylableImpl::BaselineShift, DontDelete|ReadOnly, 0, -1 },
+ { 303, SVGStylableImpl::WordSpacing, DontDelete|ReadOnly, 0, -1 },
+ { 30, SVGStylableImpl::GlyphOrientationVertical, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGStylableImpl::GlyphOrientationHorizontal, DontDelete|ReadOnly, 0, -1 },
+ { 528, SVGStylableImpl::Mask, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGStylableImpl::s_hashTable = { 2, 65, SVGStylableImpl__s_hashTableEntries, 47, SVGStylableImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStylableImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getStyle\0"
+};
+
+
+static const struct HashEntry SVGStylableImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGStylableImpl::GetStyle, DontDelete|Function, 0, -1 }
+};
+
+const struct HashTable SVGStylableImplProto::s_hashTable = { 2, 2, SVGStylableImplProto__s_hashTableEntries, 2, SVGStylableImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGStyleElementImpl.lut.h b/ksvg/data/SVGStyleElementImpl.lut.h
new file mode 100644
index 00000000..9eb6c903
--- /dev/null
+++ b/ksvg/data/SVGStyleElementImpl.lut.h
@@ -0,0 +1,27 @@
+/* Automatically generated from impl/SVGStyleElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGStyleElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "xmlspace\0"
+ "media\0"
+ "title\0"
+ "type\0"
+};
+
+
+static const struct HashEntry SVGStyleElementImpl__s_hashTableEntries[] = {
+ { 22, SVGStyleElementImpl::Type, DontDelete, 0, -1 },
+ { 1, SVGStyleElementImpl::Xmlspace, DontDelete, 0, 5 },
+ { 10, SVGStyleElementImpl::Media, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 16, SVGStyleElementImpl::Title, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGStyleElementImpl::s_hashTable = { 2, 6, SVGStyleElementImpl__s_hashTableEntries, 5, SVGStyleElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGSymbolElementImpl.lut.h b/ksvg/data/SVGSymbolElementImpl.lut.h
new file mode 100644
index 00000000..5dba1cce
--- /dev/null
+++ b/ksvg/data/SVGSymbolElementImpl.lut.h
@@ -0,0 +1,22 @@
+/* Automatically generated from impl/SVGSymbolElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGSymbolElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "height\0"
+ "width\0"
+};
+
+
+static const struct HashEntry SVGSymbolElementImpl__s_hashTableEntries[] = {
+ { 1, SVGSymbolElementImpl::Height, DontDelete|ReadOnly, 0, -1 },
+ { 8, SVGSymbolElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGSymbolElementImpl::s_hashTable = { 2, 3, SVGSymbolElementImpl__s_hashTableEntries, 3, SVGSymbolElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTestsImpl.lut.h b/ksvg/data/SVGTestsImpl.lut.h
new file mode 100644
index 00000000..07bf4f48
--- /dev/null
+++ b/ksvg/data/SVGTestsImpl.lut.h
@@ -0,0 +1,45 @@
+/* Automatically generated from impl/SVGTestsImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTestsImpl__s_hashTableStrings[] = {
+ "\0"
+ "requiredExtensions\0"
+ "requiredFeatures\0"
+ "systemLanguage\0"
+};
+
+
+static const struct HashEntry SVGTestsImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 20, SVGTestsImpl::RequiredFeatures, DontDelete|ReadOnly, 0, 5 },
+ { 1, SVGTestsImpl::RequiredExtensions, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 37, SVGTestsImpl::SystemLanguage, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTestsImpl::s_hashTable = { 2, 6, SVGTestsImpl__s_hashTableEntries, 5, SVGTestsImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTestsImplProto__s_hashTableStrings[] = {
+ "\0"
+ "hasExtension\0"
+};
+
+
+static const struct HashEntry SVGTestsImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGTestsImpl::HasExtension, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGTestsImplProto::s_hashTable = { 2, 2, SVGTestsImplProto__s_hashTableEntries, 2, SVGTestsImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTextContentElementImpl.lut.h b/ksvg/data/SVGTextContentElementImpl.lut.h
new file mode 100644
index 00000000..8e0bf2db
--- /dev/null
+++ b/ksvg/data/SVGTextContentElementImpl.lut.h
@@ -0,0 +1,84 @@
+/* Automatically generated from impl/SVGTextContentElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextContentElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "lengthAdjust\0"
+ "textLength\0"
+};
+
+
+static const struct HashEntry SVGTextContentElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 14, SVGTextContentElementImpl::TextLength, DontDelete|ReadOnly, 0, 3 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGTextContentElementImpl::LengthAdjust, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTextContentElementImpl::s_hashTable = { 2, 4, SVGTextContentElementImpl__s_hashTableEntries, 3, SVGTextContentElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextContentElementImplProto__s_hashTableStrings[] = {
+ "\0"
+ "getStartPositionOfChar\0"
+ "getComputedTextLength\0"
+ "getCharNumAtPosition\0"
+ "getEndPositionOfChar\0"
+ "getSubStringLength\0"
+ "getRotationOfChar\0"
+ "getNumberOfChars\0"
+ "getExtentOfChar\0"
+ "selectSubString\0"
+};
+
+
+static const struct HashEntry SVGTextContentElementImplProto__s_hashTableEntries[] = {
+ { 88, SVGTextContentElementImpl::GetSubStringLength, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 67, SVGTextContentElementImpl::GetEndPositionOfChar, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 107, SVGTextContentElementImpl::GetRotationOfChar, DontDelete|Function, 1, -1 },
+ { 46, SVGTextContentElementImpl::GetCharNumAtPosition, DontDelete|Function, 1, -1 },
+ { 24, SVGTextContentElementImpl::GetComputedTextLength, DontDelete|Function, 0, -1 },
+ { 1, SVGTextContentElementImpl::GetStartPositionOfChar, DontDelete|Function, 1, 11 },
+ { 142, SVGTextContentElementImpl::GetExtentOfChar, DontDelete|Function, 1, -1 },
+ { 125, SVGTextContentElementImpl::GetNumberOfChars, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 158, SVGTextContentElementImpl::SelectSubString, DontDelete|Function, 2, -1 }
+};
+
+const struct HashTable SVGTextContentElementImplProto::s_hashTable = { 2, 12, SVGTextContentElementImplProto__s_hashTableEntries, 11, SVGTextContentElementImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextContentElementImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "LENGTHADJUST_SPACINGANDGLYPHS\0"
+ "LENGTHADJUST_SPACING\0"
+ "LENGTHADJUST_UNKNOWN\0"
+};
+
+
+static const struct HashEntry SVGTextContentElementImplConstructor__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 31, KSVG::LENGTHADJUST_SPACING, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::LENGTHADJUST_SPACINGANDGLYPHS, DontDelete|ReadOnly, 0, -1 },
+ { 52, KSVG::LENGTHADJUST_UNKNOWN, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTextContentElementImplConstructor::s_hashTable = { 2, 5, SVGTextContentElementImplConstructor__s_hashTableEntries, 5, SVGTextContentElementImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTextPathElementImpl.lut.h b/ksvg/data/SVGTextPathElementImpl.lut.h
new file mode 100644
index 00000000..b13c0b70
--- /dev/null
+++ b/ksvg/data/SVGTextPathElementImpl.lut.h
@@ -0,0 +1,56 @@
+/* Automatically generated from impl/SVGTextPathElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextPathElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "startOffset\0"
+ "spacing\0"
+ "method\0"
+};
+
+
+static const struct HashEntry SVGTextPathElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 21, SVGTextPathElementImpl::Method, DontDelete|ReadOnly, 0, 5 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGTextPathElementImpl::StartOffset, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 13, SVGTextPathElementImpl::Spacing, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTextPathElementImpl::s_hashTable = { 2, 6, SVGTextPathElementImpl__s_hashTableEntries, 5, SVGTextPathElementImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextPathElementImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "TEXTPATH_SPACINGTYPE_UNKNOWN\0"
+ "TEXTPATH_METHODTYPE_STRETCH\0"
+ "TEXTPATH_METHODTYPE_UNKNOWN\0"
+ "TEXTPATH_SPACINGTYPE_EXACT\0"
+ "TEXTPATH_METHODTYPE_ALIGN\0"
+ "TEXTPATH_SPACINGTYPE_AUTO\0"
+};
+
+
+static const struct HashEntry SVGTextPathElementImplConstructor__s_hashTableEntries[] = {
+ { 30, KSVG::TEXTPATH_METHODTYPE_STRETCH, DontDelete|ReadOnly, 0, -1 },
+ { 139, KSVG::TEXTPATH_SPACINGTYPE_AUTO, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::TEXTPATH_SPACINGTYPE_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 113, KSVG::TEXTPATH_METHODTYPE_ALIGN, DontDelete|ReadOnly, 0, -1 },
+ { 58, KSVG::TEXTPATH_METHODTYPE_UNKNOWN, DontDelete|ReadOnly, 0, 7 },
+ { 0, 0, 0, 0, -1 },
+ { 86, KSVG::TEXTPATH_SPACINGTYPE_EXACT, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTextPathElementImplConstructor::s_hashTable = { 2, 8, SVGTextPathElementImplConstructor__s_hashTableEntries, 7, SVGTextPathElementImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTextPositioningElementImpl.lut.h b/ksvg/data/SVGTextPositioningElementImpl.lut.h
new file mode 100644
index 00000000..de029165
--- /dev/null
+++ b/ksvg/data/SVGTextPositioningElementImpl.lut.h
@@ -0,0 +1,28 @@
+/* Automatically generated from impl/SVGTextPositioningElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTextPositioningElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "rotate\0"
+ "dx\0"
+ "dy\0"
+};
+
+
+static const struct HashEntry SVGTextPositioningElementImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 9, SVGTextPositioningElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 12, SVGTextPositioningElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 8, SVGTextPositioningElementImpl::Dx, DontDelete|ReadOnly, 0, -1 },
+ { 11, SVGTextPositioningElementImpl::Dy, DontDelete|ReadOnly, 0, 7 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGTextPositioningElementImpl::Rotate, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTextPositioningElementImpl::s_hashTable = { 2, 8, SVGTextPositioningElementImpl__s_hashTableEntries, 7, SVGTextPositioningElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTransformImpl.lut.h b/ksvg/data/SVGTransformImpl.lut.h
new file mode 100644
index 00000000..aff39a3b
--- /dev/null
+++ b/ksvg/data/SVGTransformImpl.lut.h
@@ -0,0 +1,89 @@
+/* Automatically generated from impl/SVGTransformImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformImpl__s_hashTableStrings[] = {
+ "\0"
+ "matrix\0"
+ "angle\0"
+ "type\0"
+};
+
+
+static const struct HashEntry SVGTransformImpl__s_hashTableEntries[] = {
+ { 14, SVGTransformImpl::Type, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGTransformImpl::Matrix, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 8, SVGTransformImpl::Angle, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTransformImpl::s_hashTable = { 2, 5, SVGTransformImpl__s_hashTableEntries, 5, SVGTransformImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformImplProto__s_hashTableStrings[] = {
+ "\0"
+ "setTranslate\0"
+ "setMatrix\0"
+ "setRotate\0"
+ "setScale\0"
+ "setSkewX\0"
+ "setSkewY\0"
+};
+
+
+static const struct HashEntry SVGTransformImplProto__s_hashTableEntries[] = {
+ { 1, SVGTransformImpl::SetTranslate, DontDelete|Function, 2, -1 },
+ { 34, SVGTransformImpl::SetScale, DontDelete|Function, 2, -1 },
+ { 14, SVGTransformImpl::SetMatrix, DontDelete|Function, 1, -1 },
+ { 24, SVGTransformImpl::SetRotate, DontDelete|Function, 3, -1 },
+ { 43, SVGTransformImpl::SetSkewX, DontDelete|Function, 1, -1 },
+ { 52, SVGTransformImpl::SetSkewY, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGTransformImplProto::s_hashTable = { 2, 7, SVGTransformImplProto__s_hashTableEntries, 7, SVGTransformImplProto__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_TRANSFORM_TRANSLATE\0"
+ "SVG_TRANSFORM_UNKNOWN\0"
+ "SVG_TRANSFORM_MATRIX\0"
+ "SVG_TRANSFORM_ROTATE\0"
+ "SVG_TRANSFORM_SCALE\0"
+ "SVG_TRANSFORM_SKEWX\0"
+ "SVG_TRANSFORM_SKEWY\0"
+};
+
+
+static const struct HashEntry SVGTransformImplConstructor__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, KSVG::SVG_TRANSFORM_TRANSLATE, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 109, KSVG::SVG_TRANSFORM_SKEWX, DontDelete|ReadOnly, 0, -1 },
+ { 47, KSVG::SVG_TRANSFORM_MATRIX, DontDelete|ReadOnly, 0, 11 },
+ { 89, KSVG::SVG_TRANSFORM_SCALE, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 25, KSVG::SVG_TRANSFORM_UNKNOWN, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 68, KSVG::SVG_TRANSFORM_ROTATE, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 129, KSVG::SVG_TRANSFORM_SKEWY, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGTransformImplConstructor::s_hashTable = { 2, 12, SVGTransformImplConstructor__s_hashTableEntries, 11, SVGTransformImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTransformListImpl.lut.h b/ksvg/data/SVGTransformListImpl.lut.h
new file mode 100644
index 00000000..8b186a8e
--- /dev/null
+++ b/ksvg/data/SVGTransformListImpl.lut.h
@@ -0,0 +1,55 @@
+/* Automatically generated from impl/SVGTransformListImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformListImpl__s_hashTableStrings[] = {
+ "\0"
+ "numberOfItems\0"
+};
+
+
+static const struct HashEntry SVGTransformListImpl__s_hashTableEntries[] = {
+ { 1, SVGListDefs::NumberOfItems, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGTransformListImpl::s_hashTable = { 2, 2, SVGTransformListImpl__s_hashTableEntries, 2, SVGTransformListImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformListImplProto__s_hashTableStrings[] = {
+ "\0"
+ "insertItemBefore\0"
+ "replaceItem\0"
+ "appendItem\0"
+ "initialize\0"
+ "removeItem\0"
+ "getItem\0"
+ "clear\0"
+};
+
+
+static const struct HashEntry SVGTransformListImplProto__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 71, SVGListDefs::Clear, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 63, SVGListDefs::GetItem, DontDelete|Function, 1, -1 },
+ { 1, SVGListDefs::InsertItemBefore, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 41, SVGListDefs::Initialize, DontDelete|Function, 1, -1 },
+ { 52, SVGListDefs::RemoveItem, DontDelete|Function, 1, 11 },
+ { 18, SVGListDefs::ReplaceItem, DontDelete|Function, 2, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 30, SVGListDefs::AppendItem, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable SVGTransformListImplProto::s_hashTable = { 2, 12, SVGTransformListImplProto__s_hashTableEntries, 11, SVGTransformListImplProto__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGTransformableImpl.lut.h b/ksvg/data/SVGTransformableImpl.lut.h
new file mode 100644
index 00000000..7ca5e81f
--- /dev/null
+++ b/ksvg/data/SVGTransformableImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGTransformableImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGTransformableImpl__s_hashTableStrings[] = {
+ "\0"
+ "transform\0"
+};
+
+
+static const struct HashEntry SVGTransformableImpl__s_hashTableEntries[] = {
+ { 1, SVGTransformableImpl::Transform, DontDelete, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGTransformableImpl::s_hashTable = { 2, 2, SVGTransformableImpl__s_hashTableEntries, 2, SVGTransformableImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGURIReferenceImpl.lut.h b/ksvg/data/SVGURIReferenceImpl.lut.h
new file mode 100644
index 00000000..08eafcb6
--- /dev/null
+++ b/ksvg/data/SVGURIReferenceImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGURIReferenceImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGURIReferenceImpl__s_hashTableStrings[] = {
+ "\0"
+ "href\0"
+};
+
+
+static const struct HashEntry SVGURIReferenceImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGURIReferenceImpl::Href, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGURIReferenceImpl::s_hashTable = { 2, 2, SVGURIReferenceImpl__s_hashTableEntries, 2, SVGURIReferenceImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGUseElementImpl.lut.h b/ksvg/data/SVGUseElementImpl.lut.h
new file mode 100644
index 00000000..8f249826
--- /dev/null
+++ b/ksvg/data/SVGUseElementImpl.lut.h
@@ -0,0 +1,36 @@
+/* Automatically generated from impl/SVGUseElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGUseElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "animatedInstanceRoot\0"
+ "instanceRoot\0"
+ "height\0"
+ "width\0"
+ "href\0"
+ "x\0"
+ "y\0"
+};
+
+
+static const struct HashEntry SVGUseElementImpl__s_hashTableEntries[] = {
+ { 55, SVGUseElementImpl::Y, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 48, SVGUseElementImpl::Href, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 42, SVGUseElementImpl::Width, DontDelete|ReadOnly, 0, -1 },
+ { 35, SVGUseElementImpl::Height, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 22, SVGUseElementImpl::InstanceRoot, DontDelete|ReadOnly, 0, 11 },
+ { 0, 0, 0, 0, -1 },
+ { 53, SVGUseElementImpl::X, DontDelete|ReadOnly, 0, -1 },
+ { 1, SVGUseElementImpl::AnimatedInstanceRoot, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGUseElementImpl::s_hashTable = { 2, 12, SVGUseElementImpl__s_hashTableEntries, 11, SVGUseElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGViewElementImpl.lut.h b/ksvg/data/SVGViewElementImpl.lut.h
new file mode 100644
index 00000000..cbc29ca3
--- /dev/null
+++ b/ksvg/data/SVGViewElementImpl.lut.h
@@ -0,0 +1,20 @@
+/* Automatically generated from impl/SVGViewElementImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGViewElementImpl__s_hashTableStrings[] = {
+ "\0"
+ "viewTarget\0"
+};
+
+
+static const struct HashEntry SVGViewElementImpl__s_hashTableEntries[] = {
+ { 1, SVGViewElementImpl::ViewTarget, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 }
+};
+
+const struct HashTable SVGViewElementImpl::s_hashTable = { 2, 2, SVGViewElementImpl__s_hashTableEntries, 2, SVGViewElementImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGZoomAndPanImpl.lut.h b/ksvg/data/SVGZoomAndPanImpl.lut.h
new file mode 100644
index 00000000..7886c67f
--- /dev/null
+++ b/ksvg/data/SVGZoomAndPanImpl.lut.h
@@ -0,0 +1,45 @@
+/* Automatically generated from impl/SVGZoomAndPanImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGZoomAndPanImpl__s_hashTableStrings[] = {
+ "\0"
+ "zoomAndPan\0"
+};
+
+
+static const struct HashEntry SVGZoomAndPanImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGZoomAndPanImpl::ZoomAndPan, DontDelete, 0, -1 }
+};
+
+const struct HashTable SVGZoomAndPanImpl::s_hashTable = { 2, 2, SVGZoomAndPanImpl__s_hashTableEntries, 2, SVGZoomAndPanImpl__s_hashTableStrings};
+
+} // namespace
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGZoomAndPanImplConstructor__s_hashTableStrings[] = {
+ "\0"
+ "SVG_ZOOMANDPAN_DISABLE\0"
+ "SVG_ZOOMANDPAN_MAGNIFY\0"
+ "SVG_ZOOMANDPAN_UNKNOWN\0"
+};
+
+
+static const struct HashEntry SVGZoomAndPanImplConstructor__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 24, KSVG::SVG_ZOOMANDPAN_MAGNIFY, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 47, KSVG::SVG_ZOOMANDPAN_UNKNOWN, DontDelete|ReadOnly, 0, 5 },
+ { 1, KSVG::SVG_ZOOMANDPAN_DISABLE, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGZoomAndPanImplConstructor::s_hashTable = { 2, 6, SVGZoomAndPanImplConstructor__s_hashTableEntries, 5, SVGZoomAndPanImplConstructor__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/SVGZoomEventImpl.lut.h b/ksvg/data/SVGZoomEventImpl.lut.h
new file mode 100644
index 00000000..5f5a277b
--- /dev/null
+++ b/ksvg/data/SVGZoomEventImpl.lut.h
@@ -0,0 +1,29 @@
+/* Automatically generated from impl/SVGZoomEventImpl.cc using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char SVGZoomEventImpl__s_hashTableStrings[] = {
+ "\0"
+ "previousTranslate\0"
+ "zoomRectScreen\0"
+ "previousScale\0"
+ "newTranslate\0"
+ "newScale\0"
+};
+
+
+static const struct HashEntry SVGZoomEventImpl__s_hashTableEntries[] = {
+ { 0, 0, 0, 0, -1 },
+ { 1, SVGZoomEventImpl::PreviousTranslate, DontDelete|ReadOnly, 0, -1 },
+ { 34, SVGZoomEventImpl::PreviousScale, DontDelete|ReadOnly, 0, -1 },
+ { 19, SVGZoomEventImpl::ZoomRectScreen, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 48, SVGZoomEventImpl::NewTranslate, DontDelete|ReadOnly, 0, -1 },
+ { 61, SVGZoomEventImpl::NewScale, DontDelete|ReadOnly, 0, -1 }
+};
+
+const struct HashTable SVGZoomEventImpl::s_hashTable = { 2, 7, SVGZoomEventImpl__s_hashTableEntries, 7, SVGZoomEventImpl__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/data/ksvg_window.lut.h b/ksvg/data/ksvg_window.lut.h
new file mode 100644
index 00000000..4b6d270b
--- /dev/null
+++ b/ksvg/data/ksvg_window.lut.h
@@ -0,0 +1,98 @@
+/* Automatically generated from ecma/ksvg_window.cpp using ../../kdelibs/kjs/create_hash_table. DO NOT EDIT ! */
+
+using namespace KJS;
+
+namespace KSVG {
+
+static const char KSVG__Window__s_hashTableStrings[] = {
+ "\0"
+ "SVGPreserveAspectRatio\0"
+ "SVGTextContentElement\0"
+ "getSVGViewerVersion\0"
+ "SVGGradientElement\0"
+ "SVGTextPathElement\0"
+ "SVGMarkerElement\0"
+ "SVGZoomAndPan\0"
+ "clearInterval\0"
+ "SVGTransform\0"
+ "clearTimeout\0"
+ "innerHeight\0"
+ "setInterval\0"
+ "svgDocument\0"
+ "SVGPathSeg\0"
+ "innerWidth\0"
+ "setTimeout\0"
+ "SVGLength\0"
+ "navigator\0"
+ "printNode\0"
+ "SVGAngle\0"
+ "SVGColor\0"
+ "SVGPaint\0"
+ "document\0"
+ "parseXML\0"
+ "confirm\0"
+ "postURL\0"
+ "success\0"
+ "closed\0"
+ "getURL\0"
+ "prompt\0"
+ "window\0"
+ "alert\0"
+ "debug\0"
+ "evt\0"
+};
+
+
+static const struct HashEntry KSVG__Window__s_hashTableEntries[] = {
+ { 244, KSVG::Window::_SVGLength, DontDelete|ReadOnly, 0, 39 },
+ { 0, 0, 0, 0, -1 },
+ { 319, KSVG::Window::_Confirm, DontDelete|Function, 1, -1 },
+ { 283, KSVG::Window::_SVGColor, DontDelete|ReadOnly, 0, -1 },
+ { 162, KSVG::Window::_ClearTimeout, DontDelete|Function, 1, 41 },
+ { 0, 0, 0, 0, -1 },
+ { 149, KSVG::Window::_SVGTransform, DontDelete|ReadOnly, 0, 38 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 377, KSVG::Window::_Debug, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 199, KSVG::Window::_Document, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 301, KSVG::Window::_Document, DontDelete|ReadOnly, 0, 34 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 327, KSVG::Window::_PostURL, DontDelete|Function, 5, -1 },
+ { 364, KSVG::Window::_Window, DontDelete|ReadOnly, 0, -1 },
+ { 175, KSVG::Window::_InnerHeight, DontDelete|ReadOnly, 0, 35 },
+ { 0, 0, 0, 0, -1 },
+ { 233, KSVG::Window::_SetTimeout, DontDelete|Function, 2, -1 },
+ { 343, KSVG::Window::_Closed, DontDelete|ReadOnly, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 46, KSVG::Window::_GetSVGViewerVersion, DontDelete|Function, 0, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 371, KSVG::Window::_Alert, DontDelete|Function, 1, -1 },
+ { 1, KSVG::Window::_SVGPreserveAspectRatio, DontDelete|ReadOnly, 0, -1 },
+ { 357, KSVG::Window::_Prompt, DontDelete|Function, 2, -1 },
+ { 383, KSVG::Window::_Evt, DontDelete|ReadOnly, 0, 36 },
+ { 135, KSVG::Window::_ClearInterval, DontDelete|Function, 1, -1 },
+ { 0, 0, 0, 0, -1 },
+ { 222, KSVG::Window::_InnerWidth, DontDelete|ReadOnly, 0, 43 },
+ { 121, KSVG::Window::_SVGZoomAndPan, DontDelete|ReadOnly, 0, -1 },
+ { 187, KSVG::Window::_SetInterval, DontDelete|Function, 2, 37 },
+ { 254, KSVG::Window::_Navigator, DontDelete|ReadOnly, 0, 45 },
+ { 264, KSVG::Window::_PrintNode, DontDelete|Function, 1, -1 },
+ { 274, KSVG::Window::_SVGAngle, DontDelete|ReadOnly, 0, 44 },
+ { 211, KSVG::Window::_SVGPathSeg, DontDelete|ReadOnly, 0, -1 },
+ { 66, KSVG::Window::_SVGGradientElement, DontDelete|ReadOnly, 0, 40 },
+ { 104, KSVG::Window::_SVGMarkerElement, DontDelete|ReadOnly, 0, 42 },
+ { 85, KSVG::Window::_SVGTextPathElement, DontDelete|ReadOnly, 0, -1 },
+ { 292, KSVG::Window::_SVGPaint, DontDelete|ReadOnly, 0, -1 },
+ { 24, KSVG::Window::_SVGTextContentElement, DontDelete|ReadOnly, 0, 46 },
+ { 335, KSVG::Window::_Success, DontDelete|Function, 1, -1 },
+ { 350, KSVG::Window::_GetURL, DontDelete|Function, 2, -1 },
+ { 310, KSVG::Window::_ParseXML, DontDelete|Function, 1, -1 }
+};
+
+const struct HashTable KSVG::Window::s_hashTable = { 2, 47, KSVG__Window__s_hashTableEntries, 34, KSVG__Window__s_hashTableStrings};
+
+} // namespace
diff --git a/ksvg/dom/Makefile.am b/ksvg/dom/Makefile.am
new file mode 100644
index 00000000..9b6b1cf7
--- /dev/null
+++ b/ksvg/dom/Makefile.am
@@ -0,0 +1,58 @@
+noinst_LTLIBRARIES = libksvgdom.la
+
+myincludedir = $(includedir)/dom
+myinclude_HEADERS = SVGAElement.h SVGAltGlyphElement.h SVGAltGlyphDefElement.h SVGGlyphRefElement.h SVGAngle.h SVGAnimateColorElement.h SVGAnimateElement.h \
+ SVGAnimateMotionElement.h SVGAnimateTransformElement.h SVGAnimatedAngle.h SVGAnimatedBoolean.h \
+ SVGAnimatedEnumeration.h SVGAnimatedInteger.h SVGAnimatedLength.h SVGAnimatedLengthList.h \
+ SVGAnimatedNumber.h SVGAnimatedNumberList.h SVGAnimatedPathData.h SVGAnimatedPoints.h \
+ SVGAnimatedPreserveAspectRatio.h SVGAnimatedRect.h SVGAnimatedString.h SVGAnimatedTransformList.h \
+ SVGAnimationElement.h SVGCSSRule.h SVGCircleElement.h SVGClipPathElement.h SVGColor.h \
+ SVGColorProfileElement.h SVGColorProfileRule.h SVGComponentTransferFunctionElement.h SVGCursorElement.h \
+ SVGDefinitionSrcElement.h SVGDefsElement.h SVGDescElement.h SVGDocument.h SVGElement.h SVGElementInstance.h \
+ SVGElementInstanceList.h SVGEllipseElement.h SVGEvent.h SVGException.h SVGExternalResourcesRequired.h \
+ SVGFEBlendElement.h SVGFEColorMatrixElement.h SVGFEComponentTransferElement.h SVGFECompositeElement.h \
+ SVGFEConvolveMatrixElement.h SVGFEDiffuseLightingElement.h SVGFEDisplacementMapElement.h SVGFEDistantLightElement.h \
+ SVGFEFloodElement.h SVGFEFuncAElement.h SVGFEFuncBElement.h SVGFEFuncGElement.h SVGFEFuncRElement.h \
+ SVGFEGaussianBlurElement.h SVGFEImageElement.h SVGFEMergeElement.h SVGFEMergeNodeElement.h SVGFEMorphologyElement.h \
+ SVGFEOffsetElement.h SVGFEPointLightElement.h SVGFESpecularLightingElement.h SVGFESpotLightElement.h \
+ SVGFETileElement.h SVGFETurbulenceElement.h SVGFilterElement.h SVGFilterPrimitiveStandardAttributes.h \
+ SVGFitToViewBox.h SVGFontElement.h SVGFontFaceElement.h SVGFontFaceFormatElement.h SVGFontFaceNameElement.h \
+ SVGFontFaceSrcElement.h SVGFontFaceUriElement.h SVGForeignObjectElement.h SVGGElement.h SVGGlyphElement.h \
+ SVGGradientElement.h SVGHKernElement.h SVGICCColor.h SVGImageElement.h SVGLangSpace.h SVGLength.h SVGLengthList.h \
+ SVGLineElement.h SVGLinearGradientElement.h SVGLocatable.h SVGMPathElement.h SVGMarkerElement.h SVGMaskElement.h \
+ SVGMatrix.h SVGMetadataElement.h SVGMissingGlyphElement.h SVGNumber.h SVGNumberList.h SVGPaint.h SVGPathElement.h \
+ SVGPathSeg.h SVGPathSegArc.h SVGPathSegClosePath.h SVGPathSegCurvetoCubic.h SVGPathSegCurvetoCubicSmooth.h \
+ SVGPathSegCurvetoQuadratic.h SVGPathSegCurvetoQuadraticSmooth.h SVGPathSegLineto.h SVGPathSegLinetoHorizontal.h \
+ SVGPathSegLinetoVertical.h SVGPathSegList.h SVGPathSegMoveto.h SVGPatternElement.h SVGPoint.h SVGPointList.h \
+ SVGPolygonElement.h SVGPolylineElement.h SVGPreserveAspectRatio.h SVGRadialGradientElement.h SVGRect.h \
+ SVGRectElement.h SVGRenderingIntent.h SVGSVGElement.h SVGScriptElement.h SVGSetElement.h SVGStopElement.h \
+ SVGStringList.h SVGStylable.h SVGStyleElement.h SVGSwitchElement.h SVGSymbolElement.h SVGTRefElement.h \
+ SVGTSpanElement.h SVGTests.h SVGTextContentElement.h SVGTextElement.h SVGTextPathElement.h SVGTextPositioningElement.h \
+ SVGTitleElement.h SVGTransform.h SVGTransformList.h SVGTransformable.h SVGURIReference.h SVGUnitTypes.h \
+ SVGUseElement.h SVGVKernElement.h SVGViewElement.h SVGViewSpec.h SVGWindow.h SVGZoomAndPan.h SVGZoomEvent.h
+
+libksvgdom_la_SOURCES = SVGLength.cc SVGAnimatedLength.cc SVGNumber.cc SVGAnimatedNumber.cc SVGPoint.cc SVGTSpanElement.cc SVGTRefElement.cc \
+ SVGAnimatedLengthList.cc SVGAnimatedNumberList.cc SVGTransformList.cc SVGAElement.cc SVGAnimatedTransformList.cc \
+ SVGRectElement.cc SVGCircleElement.cc SVGEllipseElement.cc SVGLineElement.cc SVGPolylineElement.cc SVGPolygonElement.cc \
+ SVGTextPositioningElement.cc SVGTextContentElement.cc SVGTextElement.cc SVGImageElement.cc SVGUseElement.cc \
+ SVGMatrix.cc SVGTransform.cc SVGPointList.cc SVGDocument.cc SVGAnimatedEnumeration.cc SVGDefsElement.cc \
+ SVGLocatable.cc SVGTransformable.cc SVGStylable.cc SVGGElement.cc SVGAngle.cc SVGAnimatedAngle.cc \
+ SVGColor.cc SVGPathElement.cc SVGPathSegList.cc SVGTests.cc SVGLangSpace.cc SVGStringList.cc \
+ SVGPathSeg.cc SVGPathSegClosePath.cc SVGPathSegMoveto.cc SVGPathSegLinetoHorizontal.cc SVGPathSegLinetoVertical.cc SVGPathSegLineto.cc \
+ SVGPathSegCurvetoCubic.cc SVGDescElement.cc SVGTitleElement.cc SVGExternalResourcesRequired.cc SVGAnimatedBoolean.cc SVGNumberList.cc \
+ SVGPathSegCurvetoCubicSmooth.cc SVGPathSegCurvetoQuadratic.cc SVGAnimatedRect.cc SVGAnimatedString.cc \
+ SVGPathSegCurvetoQuadraticSmooth.cc SVGPathSegArc.cc SVGURIReference.cc SVGAnimatedInteger.cc SVGLengthList.cc \
+ SVGSVGElement.cc SVGRect.cc SVGFitToViewBox.cc SVGAnimatedPreserveAspectRatio.cc SVGPreserveAspectRatio.cc SVGElement.cc \
+ SVGStyleElement.cc SVGClipPathElement.cc SVGMaskElement.cc SVGColorProfileElement.cc SVGColorProfileRule.cc SVGZoomAndPan.cc SVGScriptElement.cc \
+ SVGSwitchElement.cc SVGSymbolElement.cc \
+ SVGDefinitionSrcElement.cc SVGFontFaceElement.cc SVGFontFaceFormatElement.cc SVGFontFaceNameElement.cc SVGFontFaceSrcElement.cc SVGHKernElement.cc SVGMetadataElement.cc SVGVKernElement.cc SVGCursorElement.cc SVGForeignObjectElement.cc SVGFontFaceUriElement.cc \
+ SVGElementInstance.cc SVGElementInstanceList.cc SVGAnimatedPoints.cc SVGAnimatedPathData.cc SVGMarkerElement.cc SVGViewSpec.cc SVGViewElement.cc \
+ SVGFilterElement.cc SVGFilterPrimitiveStandardAttributes.cc SVGFEBlendElement.cc SVGFEColorMatrixElement.cc SVGFEComponentTransferElement.cc SVGComponentTransferFunctionElement.cc SVGFEFuncAElement.cc SVGFEFuncBElement.cc SVGFEFuncGElement.cc SVGFEFuncRElement.cc SVGFECompositeElement.cc SVGFEConvolveMatrixElement.cc SVGFEFloodElement.cc SVGFEGaussianBlurElement.cc SVGFEDiffuseLightingElement.cc SVGFEDistantLightElement.cc SVGFEPointLightElement.cc SVGFESpotLightElement.cc SVGFEDisplacementMapElement.cc SVGFEMergeElement.cc SVGFEMergeNodeElement.cc SVGFEImageElement.cc SVGFEMorphologyElement.cc SVGFEOffsetElement.cc SVGFESpecularLightingElement.cc SVGFETileElement.cc SVGFETurbulenceElement.cc \
+ SVGAnimationElement.cc SVGAnimateElement.cc SVGSetElement.cc SVGAnimateMotionElement.cc SVGAnimateColorElement.cc SVGAnimateTransformElement.cc \
+ SVGEvent.cc SVGZoomEvent.cc SVGICCColor.cc SVGCSSRule.cc \
+ SVGGradientElement.cc SVGRadialGradientElement.cc SVGLinearGradientElement.cc SVGStopElement.cc SVGPatternElement.cc SVGMPathElement.cc \
+ SVGFontElement.cc SVGAltGlyphElement.cc SVGGlyphRefElement.cc SVGAltGlyphDefElement.cc SVGGlyphElement.cc SVGMissingGlyphElement.cc SVGPaint.cc SVGTextPathElement.cc SVGWindow.cc
+
+libksvgdom_la_METASOURCES = AUTO
+
+INCLUDES = -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src -I$(top_srcdir)/impl/ $(all_includes)
diff --git a/ksvg/dom/SVGAElement.cc b/ksvg/dom/SVGAElement.cc
new file mode 100644
index 00000000..a4d7d5b1
--- /dev/null
+++ b/ksvg/dom/SVGAElement.cc
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAElement.h"
+#include "SVGAElementImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGAElement::SVGAElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGAElement::SVGAElement(const SVGAElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAElement &SVGAElement::operator=(const SVGAElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAElement::SVGAElement(SVGAElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAElement::~SVGAElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGAElement::target() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->target());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAElement.h b/ksvg/dom/SVGAElement.h
new file mode 100644
index 00000000..98b0f54e
--- /dev/null
+++ b/ksvg/dom/SVGAElement.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAElement_H
+#define SVGAElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGAElementImpl;
+class SVGAElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGURIReference
+{
+public:
+ SVGAElement();
+ SVGAElement(const SVGAElement &other);
+ SVGAElement &operator=(const SVGAElement &other);
+ SVGAElement(SVGAElementImpl *other);
+ virtual ~SVGAElement();
+
+ SVGAnimatedString target() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAElementImpl *handle() const { return impl; }
+
+private:
+ SVGAElementImpl *impl;
+};
+
+}
+
+#endif
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAltGlyphDefElement.cc b/ksvg/dom/SVGAltGlyphDefElement.cc
new file mode 100644
index 00000000..f150b982
--- /dev/null
+++ b/ksvg/dom/SVGAltGlyphDefElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAltGlyphDefElement.h"
+#include "SVGAltGlyphDefElementImpl.h"
+
+using namespace KSVG;
+
+SVGAltGlyphDefElement::SVGAltGlyphDefElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGAltGlyphDefElement::SVGAltGlyphDefElement(const SVGAltGlyphDefElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAltGlyphDefElement &SVGAltGlyphDefElement::operator=(const SVGAltGlyphDefElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAltGlyphDefElement::SVGAltGlyphDefElement(SVGAltGlyphDefElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAltGlyphDefElement::~SVGAltGlyphDefElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAltGlyphDefElement.h b/ksvg/dom/SVGAltGlyphDefElement.h
new file mode 100644
index 00000000..c0672cf6
--- /dev/null
+++ b/ksvg/dom/SVGAltGlyphDefElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAltGlyphDefElement_H
+#define SVGAltGlyphDefElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGAltGlyphDefElementImpl;
+class SVGAltGlyphDefElement : public SVGElement
+{
+public:
+ SVGAltGlyphDefElement();
+ SVGAltGlyphDefElement(const SVGAltGlyphDefElement &other);
+ SVGAltGlyphDefElement &operator=(const SVGAltGlyphDefElement &other);
+ SVGAltGlyphDefElement(SVGAltGlyphDefElementImpl *other);
+ virtual ~SVGAltGlyphDefElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAltGlyphDefElementImpl *handle() const { return impl; }
+
+private:
+ SVGAltGlyphDefElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAltGlyphElement.cc b/ksvg/dom/SVGAltGlyphElement.cc
new file mode 100644
index 00000000..33877a74
--- /dev/null
+++ b/ksvg/dom/SVGAltGlyphElement.cc
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAltGlyphElement.h"
+#include "SVGAltGlyphElementImpl.h"
+
+using namespace KSVG;
+
+SVGAltGlyphElement::SVGAltGlyphElement() : SVGTextPositioningElement(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGAltGlyphElement::SVGAltGlyphElement(const SVGAltGlyphElement &other) : SVGTextPositioningElement(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAltGlyphElement &SVGAltGlyphElement::operator=(const SVGAltGlyphElement &other)
+{
+ SVGTextPositioningElement::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAltGlyphElement::SVGAltGlyphElement(SVGAltGlyphElementImpl *other) : SVGTextPositioningElement(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAltGlyphElement::~SVGAltGlyphElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+DOM::DOMString SVGAltGlyphElement::format()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->format();
+}
+
+DOM::DOMString SVGAltGlyphElement::glyphRef()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->glyphRef();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAltGlyphElement.h b/ksvg/dom/SVGAltGlyphElement.h
new file mode 100644
index 00000000..191c67fe
--- /dev/null
+++ b/ksvg/dom/SVGAltGlyphElement.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAltGlyphElement_H
+#define SVGAltGlyphElement_H
+
+#include "SVGTextPositioningElement.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+class SVGAltGlyphElementImpl;
+class SVGAltGlyphElement : public SVGTextPositioningElement,
+ public SVGURIReference
+{
+public:
+ SVGAltGlyphElement();
+ SVGAltGlyphElement(const SVGAltGlyphElement &other);
+ SVGAltGlyphElement &operator=(const SVGAltGlyphElement &other);
+ SVGAltGlyphElement(SVGAltGlyphElementImpl *other);
+ virtual ~SVGAltGlyphElement();
+
+ DOM::DOMString glyphRef();
+ DOM::DOMString format();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAltGlyphElementImpl *handle() const { return impl; }
+
+private:
+ SVGAltGlyphElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAngle.cc b/ksvg/dom/SVGAngle.cc
new file mode 100644
index 00000000..c3cb1fae
--- /dev/null
+++ b/ksvg/dom/SVGAngle.cc
@@ -0,0 +1,120 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAngle.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+SVGAngle::SVGAngle()
+{
+ impl = new SVGAngleImpl();
+ impl->ref();
+}
+
+SVGAngle::SVGAngle(const SVGAngle &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAngle &SVGAngle::operator =(const SVGAngle &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAngle::SVGAngle(SVGAngleImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAngle::~SVGAngle()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned short SVGAngle::unitType() const
+{
+ if(!impl) return SVG_ANGLETYPE_UNKNOWN;
+ return impl->unitType();
+}
+
+void SVGAngle::setValue(float value)
+{
+ if(impl)
+ impl->setValue(value);
+}
+
+float SVGAngle::value() const
+{
+ if(!impl) return -1;
+ return impl->value();
+}
+
+void SVGAngle::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
+{
+ if(impl)
+ impl->setValueInSpecifiedUnits(valueInSpecifiedUnits);
+}
+
+float SVGAngle::valueInSpecifiedUnits() const
+{
+ if(!impl) return -1;
+ return impl->valueInSpecifiedUnits();
+}
+
+void SVGAngle::setValueAsString(const DOM::DOMString &valueAsString)
+{
+ if(impl)
+ impl->setValueAsString(valueAsString);
+}
+
+DOM::DOMString SVGAngle::valueAsString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->valueAsString();
+}
+
+void SVGAngle::newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits)
+{
+ if(impl)
+ impl->newValueSpecifiedUnits(unitType, valueInSpecifiedUnits);
+}
+
+void SVGAngle::convertToSpecifiedUnits(unsigned short unitType)
+{
+ if(impl)
+ impl->convertToSpecifiedUnits(unitType);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAngle.h b/ksvg/dom/SVGAngle.h
new file mode 100644
index 00000000..9e301660
--- /dev/null
+++ b/ksvg/dom/SVGAngle.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAngle_H
+#define SVGAngle_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_ANGLETYPE_UNKNOWN = 0,
+ SVG_ANGLETYPE_UNSPECIFIED = 1,
+ SVG_ANGLETYPE_DEG = 2,
+ SVG_ANGLETYPE_RAD = 3,
+ SVG_ANGLETYPE_GRAD = 4
+};
+
+class SVGAngleImpl;
+class SVGAngle
+{
+public:
+
+ SVGAngle();
+ SVGAngle(const SVGAngle &other);
+ SVGAngle &operator=(const SVGAngle &other);
+ SVGAngle(SVGAngleImpl *other);
+ ~SVGAngle();
+
+ unsigned short unitType() const;
+
+ void setValue(float value);
+ float value() const;
+
+ void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
+ float valueInSpecifiedUnits() const;
+
+ void setValueAsString(const DOM::DOMString &valueAsString);
+ DOM::DOMString valueAsString() const;
+
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ void convertToSpecifiedUnits(unsigned short unitType);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAngleImpl *handle() const { return impl; }
+
+private:
+ SVGAngleImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateColorElement.cc b/ksvg/dom/SVGAnimateColorElement.cc
new file mode 100644
index 00000000..0090513f
--- /dev/null
+++ b/ksvg/dom/SVGAnimateColorElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimateColorElement.h"
+#include "SVGAnimateColorElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateColorElement::SVGAnimateColorElement() : SVGAnimationElement()
+{
+ impl = 0;
+}
+
+SVGAnimateColorElement::SVGAnimateColorElement(const SVGAnimateColorElement &other) : SVGAnimationElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimateColorElement &SVGAnimateColorElement::operator=(const SVGAnimateColorElement &other)
+{
+ SVGAnimationElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimateColorElement::SVGAnimateColorElement(SVGAnimateColorElementImpl *other) : SVGAnimationElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimateColorElement::~SVGAnimateColorElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateColorElement.h b/ksvg/dom/SVGAnimateColorElement.h
new file mode 100644
index 00000000..3e5d1616
--- /dev/null
+++ b/ksvg/dom/SVGAnimateColorElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateColorElement_H
+#define SVGAnimateColorElement_H
+
+#include "SVGAnimationElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimateColorElementImpl;
+class SVGAnimateColorElement : public SVGAnimationElement
+{
+public:
+ SVGAnimateColorElement();
+ SVGAnimateColorElement(const SVGAnimateColorElement &other);
+ SVGAnimateColorElement &operator=(const SVGAnimateColorElement &other);
+ SVGAnimateColorElement(SVGAnimateColorElementImpl *other);
+ virtual ~SVGAnimateColorElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimateColorElementImpl *handle() const { return impl; }
+
+private:
+ SVGAnimateColorElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateElement.cc b/ksvg/dom/SVGAnimateElement.cc
new file mode 100644
index 00000000..b0b4503e
--- /dev/null
+++ b/ksvg/dom/SVGAnimateElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimateElement.h"
+#include "SVGAnimateElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateElement::SVGAnimateElement() : SVGAnimationElement()
+{
+ impl = 0;
+}
+
+SVGAnimateElement::SVGAnimateElement(const SVGAnimateElement &other) : SVGAnimationElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimateElement &SVGAnimateElement::operator=(const SVGAnimateElement &other)
+{
+ SVGAnimationElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimateElement::SVGAnimateElement(SVGAnimateElementImpl *other) : SVGAnimationElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimateElement::~SVGAnimateElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateElement.h b/ksvg/dom/SVGAnimateElement.h
new file mode 100644
index 00000000..5856f9b2
--- /dev/null
+++ b/ksvg/dom/SVGAnimateElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateElement_H
+#define SVGAnimateElement_H
+
+#include "SVGAnimationElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimateElementImpl;
+class SVGAnimateElement : public SVGAnimationElement
+{
+public:
+ SVGAnimateElement();
+ SVGAnimateElement(const SVGAnimateElement &other);
+ SVGAnimateElement &operator=(const SVGAnimateElement &other);
+ SVGAnimateElement(SVGAnimateElementImpl *other);
+ virtual ~SVGAnimateElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimateElementImpl *handle() const { return impl; }
+
+private:
+ SVGAnimateElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateMotionElement.cc b/ksvg/dom/SVGAnimateMotionElement.cc
new file mode 100644
index 00000000..f2758fe3
--- /dev/null
+++ b/ksvg/dom/SVGAnimateMotionElement.cc
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimateMotionElement.h"
+#include "SVGAnimateMotionElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateMotionElement::SVGAnimateMotionElement() : SVGAnimationElement()
+{
+ impl = 0;
+}
+
+SVGAnimateMotionElement::SVGAnimateMotionElement(const SVGAnimateMotionElement &other) : SVGAnimationElement(), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimateMotionElement &SVGAnimateMotionElement::operator =(const SVGAnimateMotionElement &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimateMotionElement::SVGAnimateMotionElement(SVGAnimateMotionElementImpl *other) : SVGAnimationElement()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimateMotionElement::~SVGAnimateMotionElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateMotionElement.h b/ksvg/dom/SVGAnimateMotionElement.h
new file mode 100644
index 00000000..62b477b0
--- /dev/null
+++ b/ksvg/dom/SVGAnimateMotionElement.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateMotionElement_H
+#define SVGAnimateMotionElement_H
+
+#include "SVGAnimationElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimateMotionElementImpl;
+class SVGAnimateMotionElement : public SVGAnimationElement
+{
+public:
+ SVGAnimateMotionElement();
+ SVGAnimateMotionElement(const SVGAnimateMotionElement &other);
+ SVGAnimateMotionElement &operator=(const SVGAnimateMotionElement &other);
+ SVGAnimateMotionElement(SVGAnimateMotionElementImpl *other);
+ virtual ~SVGAnimateMotionElement();
+
+private:
+ SVGAnimateMotionElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateTransformElement.cc b/ksvg/dom/SVGAnimateTransformElement.cc
new file mode 100644
index 00000000..91bbb9a3
--- /dev/null
+++ b/ksvg/dom/SVGAnimateTransformElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimateTransformElement.h"
+#include "SVGAnimateTransformElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateTransformElement::SVGAnimateTransformElement() : SVGAnimationElement()
+{
+ impl = 0;
+}
+
+SVGAnimateTransformElement::SVGAnimateTransformElement(const SVGAnimateTransformElement &other) : SVGAnimationElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimateTransformElement &SVGAnimateTransformElement::operator=(const SVGAnimateTransformElement &other)
+{
+ SVGAnimationElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimateTransformElement::SVGAnimateTransformElement(SVGAnimateTransformElementImpl *other) : SVGAnimationElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimateTransformElement::~SVGAnimateTransformElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimateTransformElement.h b/ksvg/dom/SVGAnimateTransformElement.h
new file mode 100644
index 00000000..b6c1a5ad
--- /dev/null
+++ b/ksvg/dom/SVGAnimateTransformElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateTransformElement_H
+#define SVGAnimateTransformElement_H
+
+#include "SVGAnimationElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimateTransformElementImpl;
+class SVGAnimateTransformElement : public SVGAnimationElement
+{
+public:
+ SVGAnimateTransformElement();
+ SVGAnimateTransformElement(const SVGAnimateTransformElement &other);
+ SVGAnimateTransformElement &operator=(const SVGAnimateTransformElement &other);
+ SVGAnimateTransformElement(SVGAnimateTransformElementImpl *other);
+ virtual ~SVGAnimateTransformElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimateTransformElementImpl *handle() const { return impl; }
+
+private:
+ SVGAnimateTransformElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedAngle.cc b/ksvg/dom/SVGAnimatedAngle.cc
new file mode 100644
index 00000000..b8c4ff4d
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedAngle.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedAngle.h"
+#include "SVGAnimatedAngleImpl.h"
+#include "SVGAngle.h"
+
+using namespace KSVG;
+
+SVGAnimatedAngle::SVGAnimatedAngle()
+{
+ impl = new SVGAnimatedAngleImpl();
+ impl->ref();
+}
+
+SVGAnimatedAngle::SVGAnimatedAngle(const SVGAnimatedAngle &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedAngle &SVGAnimatedAngle::operator=(const SVGAnimatedAngle &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedAngle::SVGAnimatedAngle(SVGAnimatedAngleImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedAngle::~SVGAnimatedAngle()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAngle SVGAnimatedAngle::baseVal() const
+{
+ if(!impl) return SVGAngle(0);
+ return SVGAngle(impl->baseVal());
+}
+
+SVGAngle SVGAnimatedAngle::animVal() const
+{
+ if(!impl) return SVGAngle(0);
+ return SVGAngle(impl->animVal());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedAngle.h b/ksvg/dom/SVGAnimatedAngle.h
new file mode 100644
index 00000000..156b9c39
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedAngle.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedAngle_H
+#define SVGAnimatedAngle_H
+
+namespace KSVG
+{
+
+class SVGAngle;
+class SVGAnimatedAngleImpl;
+class SVGAnimatedAngle
+{
+public:
+ SVGAnimatedAngle();
+ SVGAnimatedAngle(const SVGAnimatedAngle &other);
+ SVGAnimatedAngle &operator=(const SVGAnimatedAngle &other);
+ SVGAnimatedAngle(SVGAnimatedAngleImpl *other);
+ ~SVGAnimatedAngle();
+
+ SVGAngle baseVal() const;
+ SVGAngle animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedAngleImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedAngleImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedBoolean.cc b/ksvg/dom/SVGAnimatedBoolean.cc
new file mode 100644
index 00000000..40bb765b
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedBoolean.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedBoolean.h"
+#include "SVGAnimatedBooleanImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedBoolean::SVGAnimatedBoolean()
+{
+ impl = new SVGAnimatedBooleanImpl();
+ impl->ref();
+}
+
+SVGAnimatedBoolean::SVGAnimatedBoolean(const SVGAnimatedBoolean &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedBoolean &SVGAnimatedBoolean::operator=(const SVGAnimatedBoolean &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedBoolean::SVGAnimatedBoolean(SVGAnimatedBooleanImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedBoolean::~SVGAnimatedBoolean()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGAnimatedBoolean::setBaseVal(bool baseVal)
+{
+ if(impl)
+ impl->setBaseVal(baseVal);
+}
+
+bool SVGAnimatedBoolean::baseVal() const
+{
+ if(!impl) return false;
+ return impl->baseVal();
+}
+
+bool SVGAnimatedBoolean::animVal() const
+{
+ if(!impl) return false;
+ return impl->animVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedBoolean.h b/ksvg/dom/SVGAnimatedBoolean.h
new file mode 100644
index 00000000..c223fa9a
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedBoolean.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedBoolean_H
+#define SVGAnimatedBoolean_H
+
+namespace KSVG
+{
+
+class SVGAnimatedBooleanImpl;
+class SVGAnimatedBoolean
+{
+public:
+ SVGAnimatedBoolean();
+ SVGAnimatedBoolean(const SVGAnimatedBoolean &other);
+ SVGAnimatedBoolean &operator=(const SVGAnimatedBoolean &other);
+ SVGAnimatedBoolean(SVGAnimatedBooleanImpl *other);
+ ~SVGAnimatedBoolean();
+
+ void setBaseVal(bool baseVal);
+ bool baseVal() const;
+
+ bool animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedBooleanImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedBooleanImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedEnumeration.cc b/ksvg/dom/SVGAnimatedEnumeration.cc
new file mode 100644
index 00000000..2e9610d4
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedEnumeration.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedEnumeration::SVGAnimatedEnumeration()
+{
+ impl = new SVGAnimatedEnumerationImpl();
+ impl->ref();
+}
+
+SVGAnimatedEnumeration::SVGAnimatedEnumeration(const SVGAnimatedEnumeration &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedEnumeration &SVGAnimatedEnumeration::operator=(const SVGAnimatedEnumeration &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedEnumeration::SVGAnimatedEnumeration(SVGAnimatedEnumerationImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedEnumeration::~SVGAnimatedEnumeration()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGAnimatedEnumeration::setBaseVal(unsigned short baseVal)
+{
+ if(impl)
+ impl->setBaseVal(baseVal);
+}
+
+unsigned short SVGAnimatedEnumeration::baseVal() const
+{
+ if(!impl) return 0;
+ return impl->baseVal();
+}
+
+unsigned short SVGAnimatedEnumeration::animVal() const
+{
+ if(!impl) return 0;
+ return impl->animVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedEnumeration.h b/ksvg/dom/SVGAnimatedEnumeration.h
new file mode 100644
index 00000000..79f75a67
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedEnumeration.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedEnumeration_H
+#define SVGAnimatedEnumeration_H
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumerationImpl;
+class SVGAnimatedEnumeration
+{
+public:
+ SVGAnimatedEnumeration();
+ SVGAnimatedEnumeration(const SVGAnimatedEnumeration &other);
+ SVGAnimatedEnumeration &operator=(const SVGAnimatedEnumeration &other);
+ SVGAnimatedEnumeration(SVGAnimatedEnumerationImpl *other);
+ ~SVGAnimatedEnumeration();
+
+ void setBaseVal(unsigned short baseVal);
+ unsigned short baseVal() const;
+
+ unsigned short animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedEnumerationImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedEnumerationImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedInteger.cc b/ksvg/dom/SVGAnimatedInteger.cc
new file mode 100644
index 00000000..df5f9011
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedInteger.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedInteger.h"
+#include "SVGAnimatedIntegerImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedInteger::SVGAnimatedInteger()
+{
+ impl = new SVGAnimatedIntegerImpl();
+ impl->ref();
+}
+
+SVGAnimatedInteger::SVGAnimatedInteger(const SVGAnimatedInteger &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedInteger &SVGAnimatedInteger::operator=(const SVGAnimatedInteger &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedInteger::SVGAnimatedInteger(SVGAnimatedIntegerImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedInteger::~SVGAnimatedInteger()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGAnimatedInteger::setBaseVal(long baseVal)
+{
+ if(impl)
+ impl->setBaseVal(baseVal);
+}
+
+long SVGAnimatedInteger::baseVal() const
+{
+ if(!impl) return -1;
+ return impl->baseVal();
+}
+
+long SVGAnimatedInteger::animVal() const
+{
+ if(!impl) return -1;
+ return impl->animVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedInteger.h b/ksvg/dom/SVGAnimatedInteger.h
new file mode 100644
index 00000000..495cda75
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedInteger.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedInteger_H
+#define SVGAnimatedInteger_H
+
+namespace KSVG
+{
+
+class SVGAnimatedIntegerImpl;
+class SVGAnimatedInteger
+{
+public:
+ SVGAnimatedInteger();
+ SVGAnimatedInteger(const SVGAnimatedInteger &other);
+ SVGAnimatedInteger &operator=(const SVGAnimatedInteger &other);
+ SVGAnimatedInteger(SVGAnimatedIntegerImpl *other);
+ ~SVGAnimatedInteger();
+
+ void setBaseVal(long baseVal);
+ long baseVal() const;
+
+ long animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedIntegerImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedIntegerImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedLength.cc b/ksvg/dom/SVGAnimatedLength.cc
new file mode 100644
index 00000000..50172f13
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedLength.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGLength.h"
+
+using namespace KSVG;
+
+SVGAnimatedLength::SVGAnimatedLength()
+{
+ impl = new SVGAnimatedLengthImpl();
+ impl->ref();
+}
+
+SVGAnimatedLength::SVGAnimatedLength(const SVGAnimatedLength &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedLength &SVGAnimatedLength::operator=(const SVGAnimatedLength &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedLength::SVGAnimatedLength(SVGAnimatedLengthImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedLength::~SVGAnimatedLength()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGLength SVGAnimatedLength::baseVal() const
+{
+ if(!impl) return SVGLength(0);
+ return SVGLength(impl->baseVal());
+}
+
+SVGLength SVGAnimatedLength::animVal() const
+{
+ if(!impl) return SVGLength(0);
+ return SVGLength(impl->animVal());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedLength.h b/ksvg/dom/SVGAnimatedLength.h
new file mode 100644
index 00000000..a59792e3
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedLength.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedLength_H
+#define SVGAnimatedLength_H
+
+namespace KSVG
+{
+
+class SVGLength;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedLength
+{
+public:
+ SVGAnimatedLength();
+ SVGAnimatedLength(const SVGAnimatedLength &other);
+ SVGAnimatedLength &operator=(const SVGAnimatedLength &other);
+ SVGAnimatedLength(SVGAnimatedLengthImpl *other);
+ ~SVGAnimatedLength();
+
+ SVGLength baseVal() const;
+ SVGLength animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedLengthImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedLengthImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedLengthList.cc b/ksvg/dom/SVGAnimatedLengthList.cc
new file mode 100644
index 00000000..f1e9c001
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedLengthList.cc
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedLengthList.h"
+#include "SVGAnimatedLengthListImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedLengthList::SVGAnimatedLengthList()
+{
+ impl = new SVGAnimatedLengthListImpl();
+ impl->ref();
+}
+
+SVGAnimatedLengthList::SVGAnimatedLengthList(const SVGAnimatedLengthList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedLengthList &SVGAnimatedLengthList::operator=(const SVGAnimatedLengthList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedLengthList::SVGAnimatedLengthList(SVGAnimatedLengthListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedLengthList::~SVGAnimatedLengthList()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGLengthList SVGAnimatedLengthList::baseVal() const
+{
+ if(!impl) return 0;
+ return impl->animVal();
+}
+
+SVGLengthList SVGAnimatedLengthList::animVal() const
+{
+ if(!impl) return 0;
+ return impl->baseVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedLengthList.h b/ksvg/dom/SVGAnimatedLengthList.h
new file mode 100644
index 00000000..80eafb03
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedLengthList.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedLengthList_H
+#define SVGAnimatedLengthList_H
+
+#include "SVGLengthList.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthListImpl;
+class SVGAnimatedLengthList
+{
+public:
+ SVGAnimatedLengthList();
+ SVGAnimatedLengthList(const SVGAnimatedLengthList &);
+ SVGAnimatedLengthList &operator=(const SVGAnimatedLengthList &);
+ SVGAnimatedLengthList(SVGAnimatedLengthListImpl *);
+ ~SVGAnimatedLengthList();
+
+ SVGLengthList baseVal() const;
+ SVGLengthList animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedLengthListImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedLengthListImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGAnimatedNumber.cc b/ksvg/dom/SVGAnimatedNumber.cc
new file mode 100644
index 00000000..9e801842
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedNumber.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedNumberImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedNumber::SVGAnimatedNumber()
+{
+ impl = new SVGAnimatedNumberImpl();
+ impl->ref();
+}
+
+SVGAnimatedNumber::SVGAnimatedNumber(const SVGAnimatedNumber &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedNumber &SVGAnimatedNumber::operator=(const SVGAnimatedNumber &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedNumber::SVGAnimatedNumber(SVGAnimatedNumberImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedNumber::~SVGAnimatedNumber()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGAnimatedNumber::setBaseVal(float baseVal)
+{
+ if(impl)
+ impl->setBaseVal(baseVal);
+}
+
+float SVGAnimatedNumber::baseVal() const
+{
+ if(!impl) return -1;
+ return impl->baseVal();
+}
+
+float SVGAnimatedNumber::animVal() const
+{
+ if(!impl) return -1;
+ return impl->animVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedNumber.h b/ksvg/dom/SVGAnimatedNumber.h
new file mode 100644
index 00000000..8c3f1670
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedNumber.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedNumber_H
+#define SVGAnimatedNumber_H
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGAnimatedNumber
+{
+public:
+ SVGAnimatedNumber();
+ SVGAnimatedNumber(const SVGAnimatedNumber &other);
+ SVGAnimatedNumber &operator=(const SVGAnimatedNumber &other);
+ SVGAnimatedNumber(SVGAnimatedNumberImpl *other);
+ ~SVGAnimatedNumber();
+
+ void setBaseVal(float baseVal);
+ float baseVal() const;
+
+ float animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedNumberImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedNumberImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedNumberList.cc b/ksvg/dom/SVGAnimatedNumberList.cc
new file mode 100644
index 00000000..66881cac
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedNumberList.cc
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberList.h"
+#include "SVGAnimatedNumberListImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedNumberList::SVGAnimatedNumberList()
+{
+ impl = new SVGAnimatedNumberListImpl();
+ impl->ref();
+}
+
+SVGAnimatedNumberList::SVGAnimatedNumberList(const SVGAnimatedNumberList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedNumberList &SVGAnimatedNumberList::operator=(const SVGAnimatedNumberList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedNumberList::SVGAnimatedNumberList(SVGAnimatedNumberListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedNumberList::~SVGAnimatedNumberList()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGNumberList SVGAnimatedNumberList::baseVal() const
+{
+ if(!impl) return 0;
+ return impl->animVal();
+}
+
+SVGNumberList SVGAnimatedNumberList::animVal() const
+{
+ if(!impl) return 0;
+ return impl->baseVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedNumberList.h b/ksvg/dom/SVGAnimatedNumberList.h
new file mode 100644
index 00000000..525ce0fd
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedNumberList.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedNumberList_H
+#define SVGAnimatedNumberList_H
+
+#include "SVGNumberList.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberListImpl;
+class SVGAnimatedNumberList
+{
+public:
+ SVGAnimatedNumberList();
+ SVGAnimatedNumberList(const SVGAnimatedNumberList &);
+ SVGAnimatedNumberList &operator=(const SVGAnimatedNumberList &);
+ SVGAnimatedNumberList(SVGAnimatedNumberListImpl *);
+ ~SVGAnimatedNumberList();
+
+ SVGNumberList baseVal() const;
+ SVGNumberList animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedNumberListImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedNumberListImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGAnimatedPathData.cc b/ksvg/dom/SVGAnimatedPathData.cc
new file mode 100644
index 00000000..d332f567
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPathData.cc
@@ -0,0 +1,91 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedPathData.h"
+#include "SVGAnimatedPathDataImpl.h"
+#include "SVGPathSegList.h"
+
+using namespace KSVG;
+
+SVGAnimatedPathData::SVGAnimatedPathData()
+{
+ impl = new SVGAnimatedPathDataImpl();
+ impl->ref();
+}
+
+SVGAnimatedPathData::SVGAnimatedPathData(const SVGAnimatedPathData &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedPathData &SVGAnimatedPathData::operator=(const SVGAnimatedPathData &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedPathData::SVGAnimatedPathData(SVGAnimatedPathDataImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedPathData::~SVGAnimatedPathData()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGPathSegList SVGAnimatedPathData::pathSegList() const
+{
+ if(!impl) return SVGPathSegList(0);
+ return SVGPathSegList(impl->pathSegList());
+}
+
+SVGPathSegList SVGAnimatedPathData::normalizedPathSegList() const
+{
+ if(!impl) return SVGPathSegList(0);
+ return SVGPathSegList(impl->normalizedPathSegList());
+}
+
+SVGPathSegList SVGAnimatedPathData::animatedPathSegList() const
+{
+ if(!impl) return SVGPathSegList(0);
+ return SVGPathSegList(impl->animatedPathSegList());
+}
+
+SVGPathSegList SVGAnimatedPathData::animatedNormalizedPathSegList() const
+{
+ if(!impl) return SVGPathSegList(0);
+ return SVGPathSegList(impl->animatedNormalizedPathSegList());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedPathData.h b/ksvg/dom/SVGAnimatedPathData.h
new file mode 100644
index 00000000..06ae2905
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPathData.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPathData_H
+#define SVGAnimatedPathData_H
+
+namespace KSVG
+{
+
+class SVGPathSegList;
+class SVGAnimatedPathDataImpl;
+class SVGAnimatedPathData
+{
+public:
+ SVGAnimatedPathData();
+ SVGAnimatedPathData(const SVGAnimatedPathData &other);
+ SVGAnimatedPathData &operator=(const SVGAnimatedPathData &other);
+ SVGAnimatedPathData(SVGAnimatedPathDataImpl *other);
+ virtual ~SVGAnimatedPathData();
+
+ SVGPathSegList pathSegList() const;
+ SVGPathSegList normalizedPathSegList() const;
+ SVGPathSegList animatedPathSegList() const;
+ SVGPathSegList animatedNormalizedPathSegList() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedPathDataImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedPathDataImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedPoints.cc b/ksvg/dom/SVGAnimatedPoints.cc
new file mode 100644
index 00000000..cc4e999d
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPoints.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedPoints.h"
+#include "SVGAnimatedPointsImpl.h"
+#include "SVGPointList.h"
+
+using namespace KSVG;
+
+SVGAnimatedPoints::SVGAnimatedPoints()
+{
+ impl = new SVGAnimatedPointsImpl();
+ impl->ref();
+}
+
+SVGAnimatedPoints::SVGAnimatedPoints(const SVGAnimatedPoints &other) : impl(0)
+{
+ (*this) = other;;
+}
+
+SVGAnimatedPoints &SVGAnimatedPoints::operator=(const SVGAnimatedPoints &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedPoints::SVGAnimatedPoints(SVGAnimatedPointsImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedPoints::~SVGAnimatedPoints()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGPointList SVGAnimatedPoints::points() const
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->points());
+}
+
+SVGPointList SVGAnimatedPoints::animatedPoints() const
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->animatedPoints());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedPoints.h b/ksvg/dom/SVGAnimatedPoints.h
new file mode 100644
index 00000000..3f035722
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPoints.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPoints_H
+#define SVGAnimatedPoints_H
+
+namespace KSVG
+{
+
+class SVGPointList;
+class SVGAnimatedPointsImpl;
+class SVGAnimatedPoints
+{
+public:
+ SVGAnimatedPoints();
+ SVGAnimatedPoints(const SVGAnimatedPoints &other);
+ SVGAnimatedPoints &operator=(const SVGAnimatedPoints &other);
+ SVGAnimatedPoints(SVGAnimatedPointsImpl *other);
+ virtual ~SVGAnimatedPoints();
+
+ SVGPointList points() const;
+ SVGPointList animatedPoints() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedPointsImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedPointsImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedPreserveAspectRatio.cc b/ksvg/dom/SVGAnimatedPreserveAspectRatio.cc
new file mode 100644
index 00000000..ed157028
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPreserveAspectRatio.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedPreserveAspectRatio.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "SVGPreserveAspectRatio.h"
+
+using namespace KSVG;
+
+SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio()
+{
+ impl = new SVGAnimatedPreserveAspectRatioImpl();
+ impl->ref();
+}
+
+SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio(const SVGAnimatedPreserveAspectRatio &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedPreserveAspectRatio &SVGAnimatedPreserveAspectRatio::operator=(const SVGAnimatedPreserveAspectRatio &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio(SVGAnimatedPreserveAspectRatioImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedPreserveAspectRatio::~SVGAnimatedPreserveAspectRatio()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGPreserveAspectRatio SVGAnimatedPreserveAspectRatio::baseVal() const
+{
+ if(!impl) return SVGPreserveAspectRatio(0);
+ return SVGPreserveAspectRatio(impl->baseVal());
+}
+
+SVGPreserveAspectRatio SVGAnimatedPreserveAspectRatio::animVal() const
+{
+ if(!impl) return SVGPreserveAspectRatio(0);
+ return SVGPreserveAspectRatio(impl->animVal());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedPreserveAspectRatio.h b/ksvg/dom/SVGAnimatedPreserveAspectRatio.h
new file mode 100644
index 00000000..4eea042f
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedPreserveAspectRatio.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPreserveAspectRatio_H
+#define SVGAnimatedPreserveAspectRatio_H
+
+
+namespace KSVG
+{
+
+class SVGPreserveAspectRatio;
+class SVGAnimatedPreserveAspectRatioImpl;
+class SVGAnimatedPreserveAspectRatio
+{
+public:
+ SVGAnimatedPreserveAspectRatio();
+ SVGAnimatedPreserveAspectRatio(const SVGAnimatedPreserveAspectRatio &other);
+ SVGAnimatedPreserveAspectRatio &operator=(const SVGAnimatedPreserveAspectRatio &other);
+ SVGAnimatedPreserveAspectRatio(SVGAnimatedPreserveAspectRatioImpl *other);
+ ~SVGAnimatedPreserveAspectRatio();
+
+ SVGPreserveAspectRatio baseVal() const;
+ SVGPreserveAspectRatio animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedPreserveAspectRatioImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedPreserveAspectRatioImpl *impl;
+};
+
+}
+
+#endif
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedRect.cc b/ksvg/dom/SVGAnimatedRect.cc
new file mode 100644
index 00000000..2c315003
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedRect.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedRect.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGRect.h"
+
+using namespace KSVG;
+
+SVGAnimatedRect::SVGAnimatedRect()
+{
+ impl = new SVGAnimatedRectImpl();
+ impl->ref();
+}
+
+SVGAnimatedRect::SVGAnimatedRect(const SVGAnimatedRect &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedRect &SVGAnimatedRect::operator=(const SVGAnimatedRect &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedRect::SVGAnimatedRect(SVGAnimatedRectImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedRect::~SVGAnimatedRect()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGRect SVGAnimatedRect::baseVal() const
+{
+ if(!impl) return SVGRect(0);
+ return SVGRect(impl->baseVal());
+}
+
+SVGRect SVGAnimatedRect::animVal() const
+{
+ if(!impl) return SVGRect(0);
+ return SVGRect(impl->animVal());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedRect.h b/ksvg/dom/SVGAnimatedRect.h
new file mode 100644
index 00000000..c45a8f2d
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedRect.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedRect_H
+#define SVGAnimatedRect_H
+
+namespace KSVG
+{
+
+class SVGRect;
+class SVGAnimatedRectImpl;
+class SVGAnimatedRect
+{
+public:
+ SVGAnimatedRect();
+ SVGAnimatedRect(const SVGAnimatedRect &other);
+ SVGAnimatedRect &operator=(const SVGAnimatedRect &other);
+ SVGAnimatedRect(SVGAnimatedRectImpl *other);
+ ~SVGAnimatedRect();
+
+ SVGRect baseVal() const;
+ SVGRect animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedRectImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedRectImpl *impl;
+};
+
+}
+
+#endif
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedString.cc b/ksvg/dom/SVGAnimatedString.cc
new file mode 100644
index 00000000..5d22f4ae
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedString.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+SVGAnimatedString::SVGAnimatedString()
+{
+ impl = new SVGAnimatedStringImpl();
+ impl->ref();
+}
+
+SVGAnimatedString::SVGAnimatedString(const SVGAnimatedString &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedString &SVGAnimatedString::operator=(const SVGAnimatedString &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedString::SVGAnimatedString(SVGAnimatedStringImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedString::~SVGAnimatedString()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGAnimatedString::setBaseVal(const DOM::DOMString &baseVal)
+{
+ if(impl)
+ impl->setBaseVal(baseVal);
+}
+
+DOM::DOMString SVGAnimatedString::baseVal() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->baseVal();
+}
+
+DOM::DOMString SVGAnimatedString::animVal() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->animVal();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedString.h b/ksvg/dom/SVGAnimatedString.h
new file mode 100644
index 00000000..f97bb5c8
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedString.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedString_H
+#define SVGAnimatedString_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedString
+{
+public:
+ SVGAnimatedString();
+ SVGAnimatedString(const SVGAnimatedString &other);
+ SVGAnimatedString &operator=(const SVGAnimatedString &other);
+ SVGAnimatedString(SVGAnimatedStringImpl *other);
+ ~SVGAnimatedString();
+
+ void setBaseVal(const DOM::DOMString &baseVal);
+ DOM::DOMString baseVal() const;
+
+ DOM::DOMString animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedStringImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedStringImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedTransformList.cc b/ksvg/dom/SVGAnimatedTransformList.cc
new file mode 100644
index 00000000..a1eb43ca
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedTransformList.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedTransformList.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGTransformList.h"
+
+using namespace KSVG;
+
+SVGAnimatedTransformList::SVGAnimatedTransformList()
+{
+ impl = new SVGAnimatedTransformListImpl();
+ impl->ref();
+}
+
+SVGAnimatedTransformList::SVGAnimatedTransformList(const SVGAnimatedTransformList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimatedTransformList &SVGAnimatedTransformList::operator=(const SVGAnimatedTransformList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimatedTransformList::SVGAnimatedTransformList(SVGAnimatedTransformListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimatedTransformList::~SVGAnimatedTransformList()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGTransformList SVGAnimatedTransformList::baseVal() const
+{
+ if(!impl) return SVGTransformList(0);
+ return SVGTransformList(impl->baseVal());
+}
+
+SVGTransformList SVGAnimatedTransformList::animVal() const
+{
+ if(!impl) return SVGTransformList(0);
+ return SVGTransformList(impl->animVal());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimatedTransformList.h b/ksvg/dom/SVGAnimatedTransformList.h
new file mode 100644
index 00000000..87a12d3b
--- /dev/null
+++ b/ksvg/dom/SVGAnimatedTransformList.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedTransformList_H
+#define SVGAnimatedTransformList_H
+
+namespace KSVG
+{
+
+class SVGTransformList;
+class SVGAnimatedTransformListImpl;
+class SVGAnimatedTransformList
+{
+public:
+ SVGAnimatedTransformList();
+ SVGAnimatedTransformList(const SVGAnimatedTransformList &other);
+ SVGAnimatedTransformList &operator=(const SVGAnimatedTransformList &other);
+ SVGAnimatedTransformList(SVGAnimatedTransformListImpl *other);
+ ~SVGAnimatedTransformList();
+
+ SVGTransformList baseVal() const;
+ SVGTransformList animVal() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimatedTransformListImpl *handle() const { return impl; }
+
+private:
+ SVGAnimatedTransformListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimationElement.cc b/ksvg/dom/SVGAnimationElement.cc
new file mode 100644
index 00000000..0d4014a7
--- /dev/null
+++ b/ksvg/dom/SVGAnimationElement.cc
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimationElement.h"
+#include "SVGAnimationElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimationElement::SVGAnimationElement() : SVGElement(), SVGTests(), SVGExternalResourcesRequired()
+{
+ impl = 0;
+}
+
+SVGAnimationElement::SVGAnimationElement(const SVGAnimationElement &other) : SVGElement(other), SVGTests(other), SVGExternalResourcesRequired(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGAnimationElement &SVGAnimationElement::operator=(const SVGAnimationElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGAnimationElement::SVGAnimationElement(SVGAnimationElementImpl *other) : SVGElement(other), SVGTests(other), SVGExternalResourcesRequired(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGAnimationElement::~SVGAnimationElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGElement SVGAnimationElement::targetElement() const
+{
+ if(!impl) return SVGElement(0);
+ return SVGElement(impl->targetElement());
+}
+
+float SVGAnimationElement::getStartTime()
+{
+ if(!impl) return -1;
+ return impl->getStartTime();
+}
+
+float SVGAnimationElement::getCurrentTime()
+{
+ if(!impl) return -1;
+ return impl->getCurrentTime();
+}
+
+float SVGAnimationElement::getSimpleDuration()
+{
+ if(!impl) return -1;
+ return impl->getSimpleDuration();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGAnimationElement.h b/ksvg/dom/SVGAnimationElement.h
new file mode 100644
index 00000000..2e4df665
--- /dev/null
+++ b/ksvg/dom/SVGAnimationElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimationElement_H
+#define SVGAnimationElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGExternalResourcesRequired.h"
+
+namespace KSVG
+{
+
+class SVGAnimationElementImpl;
+class SVGAnimationElement : public SVGElement,
+ public SVGTests,
+ public SVGExternalResourcesRequired
+{
+public:
+ SVGAnimationElement();
+ SVGAnimationElement(const SVGAnimationElement &other);
+ SVGAnimationElement &operator=(const SVGAnimationElement &other);
+ SVGAnimationElement(SVGAnimationElementImpl *other);
+ virtual ~SVGAnimationElement();
+
+ SVGElement targetElement() const;
+
+ float getStartTime();
+ float getCurrentTime();
+ float getSimpleDuration();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGAnimationElementImpl *handle() const { return impl; }
+
+private:
+ SVGAnimationElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCSSRule.cc b/ksvg/dom/SVGCSSRule.cc
new file mode 100644
index 00000000..cad5657e
--- /dev/null
+++ b/ksvg/dom/SVGCSSRule.cc
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGCSSRule.h"
+#include "SVGCSSRuleImpl.h"
+
+using namespace KSVG;
+
+SVGCSSRule::SVGCSSRule() //: css::CSSRule()
+{
+ impl = new SVGCSSRuleImpl();
+ impl->ref();
+}
+
+SVGCSSRule::SVGCSSRule(const SVGCSSRule &other) : /*css::CSSRule(),*/ impl(0)
+{
+ (*this) = other;
+}
+
+SVGCSSRule &SVGCSSRule::operator=(const SVGCSSRule &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGCSSRule::SVGCSSRule(SVGCSSRuleImpl *other) //: css::CSSRule()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGCSSRule::~SVGCSSRule()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCSSRule.h b/ksvg/dom/SVGCSSRule.h
new file mode 100644
index 00000000..dc9e9360
--- /dev/null
+++ b/ksvg/dom/SVGCSSRule.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGCSSRule_H
+#define SVGCSSRule_H
+
+namespace KSVG
+{
+
+class SVGCSSRuleImpl;
+class SVGCSSRule //: public css::CSSRule
+{
+public:
+ SVGCSSRule();
+ SVGCSSRule(const SVGCSSRule &other);
+ SVGCSSRule &operator=(const SVGCSSRule &other);
+ SVGCSSRule(SVGCSSRuleImpl *other);
+ virtual ~SVGCSSRule();
+
+ // add to enum
+ // const unsigned short COLOR_PROFILE_RULE = 7;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGCSSRuleImpl *handle() const { return impl; }
+
+private:
+ SVGCSSRuleImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCircleElement.cc b/ksvg/dom/SVGCircleElement.cc
new file mode 100644
index 00000000..13875211
--- /dev/null
+++ b/ksvg/dom/SVGCircleElement.cc
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGCircleElement.h"
+#include "SVGCircleElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGCircleElement::SVGCircleElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGCircleElement::SVGCircleElement(const SVGCircleElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGCircleElement &SVGCircleElement::operator=(const SVGCircleElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGCircleElement::SVGCircleElement(SVGCircleElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGCircleElement::~SVGCircleElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGCircleElement::cx()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cx());
+}
+
+SVGAnimatedLength SVGCircleElement::cy()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cy());
+}
+
+SVGAnimatedLength SVGCircleElement::r()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->r());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCircleElement.h b/ksvg/dom/SVGCircleElement.h
new file mode 100644
index 00000000..65406a1c
--- /dev/null
+++ b/ksvg/dom/SVGCircleElement.h
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGCircleElement_H
+#define SVGCircleElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGCircleElementImpl;
+
+class SVGAnimatedLength;
+/**
+ * The <code>circle</code> element defines a circle based on a center
+ * point and radius.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.3 The
+ * 'circle' element</a>.
+ */
+class SVGCircleElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGCircleElement();
+ SVGCircleElement(const SVGCircleElement &);
+ SVGCircleElement &operator=(const SVGCircleElement &other);
+ SVGCircleElement(SVGCircleElementImpl *);
+ ~SVGCircleElement();
+
+ /**
+ * The x-axis coordinate of the center of the circle.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the center of the circle.
+ */
+ SVGAnimatedLength cx();
+
+ /**
+ * The y-axis coordinate of the center of the circle.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the center of the circle.
+ */
+ SVGAnimatedLength cy();
+
+ /**
+ * The radius of the circle.
+ * A negative value is an error (see <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">
+ * Error processing</a>). A value of zero disables rendering of
+ * the element.
+ *
+ * This attribute is animatable.
+ *
+ * @return The radius of the circle.
+ */
+ SVGAnimatedLength r();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGCircleElementImpl *handle() const { return impl; }
+
+private:
+ SVGCircleElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGClipPathElement.cc b/ksvg/dom/SVGClipPathElement.cc
new file mode 100644
index 00000000..f0785efc
--- /dev/null
+++ b/ksvg/dom/SVGClipPathElement.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGClipPathElement.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGClipPathElement::SVGClipPathElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGClipPathElement::SVGClipPathElement(const SVGClipPathElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ (*this) = other;
+}
+
+SVGClipPathElement &SVGClipPathElement::operator=(const SVGClipPathElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGClipPathElement::SVGClipPathElement(SVGClipPathElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGClipPathElement::~SVGClipPathElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedEnumeration SVGClipPathElement::clipPathUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->clipPathUnits());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGClipPathElement.h b/ksvg/dom/SVGClipPathElement.h
new file mode 100644
index 00000000..70cfe6bb
--- /dev/null
+++ b/ksvg/dom/SVGClipPathElement.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGClipPathElement_H
+#define SVGClipPathElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGUnitTypes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumeration;
+class SVGClipPathElementImpl;
+class SVGClipPathElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGUnitTypes
+{
+public:
+ SVGClipPathElement();
+ SVGClipPathElement(const SVGClipPathElement &other);
+ SVGClipPathElement &operator=(const SVGClipPathElement &other);
+ SVGClipPathElement(SVGClipPathElementImpl *other);
+ virtual ~SVGClipPathElement();
+
+ SVGAnimatedEnumeration clipPathUnits() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGClipPathElementImpl *handle() const { return impl; }
+
+private:
+ SVGClipPathElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColor.cc b/ksvg/dom/SVGColor.cc
new file mode 100644
index 00000000..e9294c5d
--- /dev/null
+++ b/ksvg/dom/SVGColor.cc
@@ -0,0 +1,105 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option); any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGColor.h"
+#include "SVGICCColor.h"
+#include "SVGColorImpl.h"
+
+using namespace KSVG;
+
+SVGColor::SVGColor()
+{
+ // FIXME: no icc color support...
+ impl = new SVGColorImpl(0);
+ impl->ref();
+}
+
+SVGColor::SVGColor(const SVGColor &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGColor &SVGColor::operator=(const SVGColor &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+
+}
+
+SVGColor::SVGColor(SVGColorImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGColor::~SVGColor()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned short SVGColor::colorType() const
+{
+ if(!impl) return SVG_COLORTYPE_UNKNOWN;
+ return impl->colorType();
+}
+
+DOM::RGBColor SVGColor::rgbColor() const
+{
+ if(!impl) return DOM::RGBColor();
+ return impl->rgbColor();
+}
+
+SVGICCColor SVGColor::iccColor() const
+{
+ if(!impl) return SVGICCColor();
+ return impl->iccColor();
+}
+
+void SVGColor::setRGBColor(const DOM::DOMString &rgbColor)
+{
+ if(impl)
+ impl->setRGBColor(rgbColor);
+}
+
+void SVGColor::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ if(impl)
+ impl->setRGBColorICCColor(rgbColor, iccColor);
+}
+
+void SVGColor::setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ if(impl)
+ impl->setColor(colorType, rgbColor, iccColor);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColor.h b/ksvg/dom/SVGColor.h
new file mode 100644
index 00000000..62147ed0
--- /dev/null
+++ b/ksvg/dom/SVGColor.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColor_H
+#define SVGColor_H
+
+#include <dom/css_value.h>
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_COLORTYPE_UNKNOWN = 0,
+ SVG_COLORTYPE_RGBCOLOR = 1,
+ SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
+ SVG_COLORTYPE_CURRENTCOLOR = 3
+};
+
+class SVGColorImpl;
+class SVGICCColor;
+class SVGColor // : public css::CSSValue
+{
+public:
+ SVGColor();
+ SVGColor(const SVGColor &);
+ SVGColor &operator=(const SVGColor &other);
+ SVGColor(SVGColorImpl *);
+ ~SVGColor();
+
+ unsigned short colorType() const;
+
+ DOM::RGBColor rgbColor() const;
+ SVGICCColor iccColor() const;
+
+ void setRGBColor(const DOM::DOMString &rgbColor);
+ void setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+ void setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGColorImpl *handle() const { return impl; }
+
+private:
+ SVGColorImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColorProfileElement.cc b/ksvg/dom/SVGColorProfileElement.cc
new file mode 100644
index 00000000..5acdb1a1
--- /dev/null
+++ b/ksvg/dom/SVGColorProfileElement.cc
@@ -0,0 +1,105 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGColorProfileElement.h"
+#include "SVGColorProfileElementImpl.h"
+#include "SVGRenderingIntent.h"
+
+using namespace KSVG;
+
+SVGColorProfileElement::SVGColorProfileElement() : SVGElement(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGColorProfileElement::SVGColorProfileElement(const SVGColorProfileElement &other) : SVGElement(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGColorProfileElement &SVGColorProfileElement::operator=(const SVGColorProfileElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGColorProfileElement::SVGColorProfileElement(SVGColorProfileElementImpl *other) : SVGElement(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGColorProfileElement::~SVGColorProfileElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGColorProfileElement::setLocal(const DOM::DOMString &local)
+{
+ if(impl)
+ impl->setLocal(local);
+}
+
+DOM::DOMString SVGColorProfileElement::local() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->local();
+}
+
+void SVGColorProfileElement::setName(const DOM::DOMString &name)
+{
+ if(impl)
+ impl->setName(name);
+}
+
+DOM::DOMString SVGColorProfileElement::name() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->name();
+}
+
+void SVGColorProfileElement::setRenderingIntent(unsigned short renderingIntent)
+{
+ if(impl)
+ impl->setRenderingIntent(renderingIntent);
+}
+
+unsigned short SVGColorProfileElement::renderingIntent() const
+{
+ if(!impl) return RENDERING_INTENT_UNKNOWN;
+ return impl->renderingIntent();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColorProfileElement.h b/ksvg/dom/SVGColorProfileElement.h
new file mode 100644
index 00000000..f7f3bd41
--- /dev/null
+++ b/ksvg/dom/SVGColorProfileElement.h
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColorProfileElement_H
+#define SVGColorProfileElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGColorProfileElementImpl;
+class SVGColorProfileElement : public SVGElement,
+ public SVGURIReference
+{
+public:
+ SVGColorProfileElement();
+ SVGColorProfileElement(const SVGColorProfileElement &other);
+ SVGColorProfileElement &operator=(const SVGColorProfileElement &other);
+ SVGColorProfileElement(SVGColorProfileElementImpl *other);
+ virtual ~SVGColorProfileElement();
+
+ void setLocal(const DOM::DOMString &local);
+ DOM::DOMString local() const;
+
+ void setName(const DOM::DOMString &name);
+ DOM::DOMString name() const;
+
+ void setRenderingIntent(unsigned short renderingIntent);
+ unsigned short renderingIntent() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGColorProfileElementImpl *handle() const { return impl; }
+
+private:
+ SVGColorProfileElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColorProfileRule.cc b/ksvg/dom/SVGColorProfileRule.cc
new file mode 100644
index 00000000..8c4ecea7
--- /dev/null
+++ b/ksvg/dom/SVGColorProfileRule.cc
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGColorProfileRule.h"
+#include "SVGColorProfileRuleImpl.h"
+#include "SVGRenderingIntent.h"
+
+using namespace KSVG;
+
+SVGColorProfileRule::SVGColorProfileRule() : SVGCSSRule()
+{
+ impl = new SVGColorProfileRuleImpl();
+ impl->ref();
+}
+
+SVGColorProfileRule::SVGColorProfileRule(const SVGColorProfileRule &other) : SVGCSSRule(), impl(0)
+{
+ (*this) = other;
+}
+
+SVGColorProfileRule &SVGColorProfileRule::operator=(const SVGColorProfileRule &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGColorProfileRule::SVGColorProfileRule(SVGColorProfileRuleImpl *other) : SVGCSSRule(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGColorProfileRule::~SVGColorProfileRule()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGColorProfileRule::setSrc(const DOM::DOMString &src)
+{
+ if(impl)
+ impl->setSrc(src);
+}
+
+DOM::DOMString SVGColorProfileRule::src() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->src();
+}
+
+void SVGColorProfileRule::setName(const DOM::DOMString &name)
+{
+ if(impl)
+ impl->setName(name);
+}
+
+DOM::DOMString SVGColorProfileRule::name() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->name();
+}
+
+void SVGColorProfileRule::setRenderingIntent(unsigned short renderingIntent)
+{
+ if(impl)
+ impl->setRenderingIntent(renderingIntent);
+}
+
+unsigned short SVGColorProfileRule::renderingIntent() const
+{
+ if(!impl) return RENDERING_INTENT_UNKNOWN;
+ return impl->renderingIntent();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGColorProfileRule.h b/ksvg/dom/SVGColorProfileRule.h
new file mode 100644
index 00000000..b99321ad
--- /dev/null
+++ b/ksvg/dom/SVGColorProfileRule.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColorProfileRule_H
+#define SVGColorProfileRule_H
+
+#include <dom/dom_string.h>
+#include "SVGCSSRule.h"
+
+namespace KSVG
+{
+
+class SVGColorProfileRuleImpl;
+class SVGColorProfileRule : public SVGCSSRule
+{
+public:
+ SVGColorProfileRule();
+ SVGColorProfileRule(const SVGColorProfileRule &other);
+ SVGColorProfileRule &operator=(const SVGColorProfileRule &other);
+ SVGColorProfileRule(SVGColorProfileRuleImpl *other);
+ virtual ~SVGColorProfileRule();
+
+ void setSrc(const DOM::DOMString &src);
+ DOM::DOMString src() const;
+
+ void setName(const DOM::DOMString &name);
+ DOM::DOMString name() const;
+
+ void setRenderingIntent(unsigned short renderingIntent);
+ unsigned short renderingIntent() const;
+
+private:
+ SVGColorProfileRuleImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGComponentTransferFunctionElement.cc b/ksvg/dom/SVGComponentTransferFunctionElement.cc
new file mode 100644
index 00000000..970da9ea
--- /dev/null
+++ b/ksvg/dom/SVGComponentTransferFunctionElement.cc
@@ -0,0 +1,112 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGComponentTransferFunctionElement.h"
+#include "SVGComponentTransferFunctionElementImpl.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedNumberList.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const SVGComponentTransferFunctionElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGComponentTransferFunctionElement &SVGComponentTransferFunctionElement::operator =(const SVGComponentTransferFunctionElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(SVGComponentTransferFunctionElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGComponentTransferFunctionElement::~SVGComponentTransferFunctionElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedEnumeration SVGComponentTransferFunctionElement::type() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->type());
+}
+
+SVGAnimatedNumberList SVGComponentTransferFunctionElement::tableValues() const
+{
+ if(!impl) return SVGAnimatedNumberList(0);
+ return SVGAnimatedNumberList(impl->tableValues());
+}
+
+SVGAnimatedNumber SVGComponentTransferFunctionElement::slope() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->slope());
+}
+
+SVGAnimatedNumber SVGComponentTransferFunctionElement::intercept() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->intercept());
+}
+
+SVGAnimatedNumber SVGComponentTransferFunctionElement::amplitude() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->amplitude());
+}
+
+SVGAnimatedNumber SVGComponentTransferFunctionElement::exponent() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->exponent());
+}
+
+SVGAnimatedNumber SVGComponentTransferFunctionElement::offset() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->offset());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGComponentTransferFunctionElement.h b/ksvg/dom/SVGComponentTransferFunctionElement.h
new file mode 100644
index 00000000..d9dd0080
--- /dev/null
+++ b/ksvg/dom/SVGComponentTransferFunctionElement.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGComponentTransferFunctionElement_H
+#define SVGComponentTransferFunctionElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0,
+ SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
+ SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2,
+ SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
+ SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4,
+ SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5
+};
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedNumberList;
+class SVGAnimatedNumber;
+class SVGComponentTransferFunctionElementImpl;
+class SVGComponentTransferFunctionElement : public SVGElement
+{
+public:
+ SVGComponentTransferFunctionElement();
+ SVGComponentTransferFunctionElement(const SVGComponentTransferFunctionElement &other);
+ SVGComponentTransferFunctionElement &operator=(const SVGComponentTransferFunctionElement &other);
+ SVGComponentTransferFunctionElement(SVGComponentTransferFunctionElementImpl *other);
+ virtual ~SVGComponentTransferFunctionElement();
+
+ SVGAnimatedEnumeration type() const;
+ SVGAnimatedNumberList tableValues() const;
+ SVGAnimatedNumber slope() const;
+ SVGAnimatedNumber intercept() const;
+ SVGAnimatedNumber amplitude() const;
+ SVGAnimatedNumber exponent() const;
+ SVGAnimatedNumber offset() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGComponentTransferFunctionElementImpl *handle() const { return impl; }
+
+private:
+ SVGComponentTransferFunctionElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCursorElement.cc b/ksvg/dom/SVGCursorElement.cc
new file mode 100644
index 00000000..2eb3c0dc
--- /dev/null
+++ b/ksvg/dom/SVGCursorElement.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGCursorElement.h"
+#include "SVGCursorElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGCursorElement::SVGCursorElement() : SVGElement(), SVGURIReference(), SVGTests(), SVGExternalResourcesRequired()
+{
+ impl = 0;
+}
+
+SVGCursorElement::SVGCursorElement(const SVGCursorElement &other) : SVGElement(other), SVGURIReference(other), SVGTests(other), SVGExternalResourcesRequired(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGCursorElement &SVGCursorElement::operator =(const SVGCursorElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGTests::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGCursorElement::SVGCursorElement(SVGCursorElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGTests(other), SVGExternalResourcesRequired(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGCursorElement::~SVGCursorElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGCursorElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGCursorElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGCursorElement.h b/ksvg/dom/SVGCursorElement.h
new file mode 100644
index 00000000..feb9b2b7
--- /dev/null
+++ b/ksvg/dom/SVGCursorElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGCursorElement_H
+#define SVGCursorElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGTests.h"
+#include "SVGExternalResourcesRequired.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGCursorElementImpl;
+class SVGCursorElement : public SVGElement,
+ public SVGURIReference,
+ public SVGTests,
+ public SVGExternalResourcesRequired
+{
+public:
+ SVGCursorElement();
+ SVGCursorElement(const SVGCursorElement &other);
+ SVGCursorElement &operator=(const SVGCursorElement &other);
+ SVGCursorElement(SVGCursorElementImpl *other);
+ virtual ~SVGCursorElement();
+
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGCursorElementImpl *handle() const { return impl; }
+
+private:
+ SVGCursorElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDefinitionSrcElement.cc b/ksvg/dom/SVGDefinitionSrcElement.cc
new file mode 100644
index 00000000..755b6b4f
--- /dev/null
+++ b/ksvg/dom/SVGDefinitionSrcElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDefinitionSrcElement.h"
+#include "SVGDefinitionSrcElementImpl.h"
+
+using namespace KSVG;
+
+SVGDefinitionSrcElement::SVGDefinitionSrcElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGDefinitionSrcElement::SVGDefinitionSrcElement(const SVGDefinitionSrcElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGDefinitionSrcElement &SVGDefinitionSrcElement::operator =(const SVGDefinitionSrcElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGDefinitionSrcElement::SVGDefinitionSrcElement(SVGDefinitionSrcElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGDefinitionSrcElement::~SVGDefinitionSrcElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDefinitionSrcElement.h b/ksvg/dom/SVGDefinitionSrcElement.h
new file mode 100644
index 00000000..fc1b7f52
--- /dev/null
+++ b/ksvg/dom/SVGDefinitionSrcElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDefinitionSrcElement_H
+#define SVGDefinitionSrcElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGDefinitionSrcElementImpl;
+class SVGDefinitionSrcElement : public SVGElement
+{
+public:
+ SVGDefinitionSrcElement();
+ SVGDefinitionSrcElement(const SVGDefinitionSrcElement &other);
+ SVGDefinitionSrcElement &operator=(const SVGDefinitionSrcElement &other);
+ SVGDefinitionSrcElement(SVGDefinitionSrcElementImpl *other);
+ virtual ~SVGDefinitionSrcElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGDefinitionSrcElementImpl *handle() const { return impl; }
+
+private:
+ SVGDefinitionSrcElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDefsElement.cc b/ksvg/dom/SVGDefsElement.cc
new file mode 100644
index 00000000..67bb2baf
--- /dev/null
+++ b/ksvg/dom/SVGDefsElement.cc
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDefsElement.h"
+#include "SVGDefsElementImpl.h"
+
+using namespace KSVG;
+
+SVGDefsElement::SVGDefsElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGDefsElement::SVGDefsElement(const SVGDefsElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGDefsElement &SVGDefsElement::operator =(const SVGDefsElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGDefsElement::SVGDefsElement(SVGDefsElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGDefsElement::~SVGDefsElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDefsElement.h b/ksvg/dom/SVGDefsElement.h
new file mode 100644
index 00000000..e1e7e0a5
--- /dev/null
+++ b/ksvg/dom/SVGDefsElement.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGDefsElement_H
+#define SVGDefsElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGDefsElementImpl;
+
+/**
+ * The 'defs' element is a container element for referenced elements. For understandability and accessibility
+ * reasons, it is recommended that, whenever possible, referenced elements be defined inside of a 'defs'.
+ *
+ * The content model for 'defs' is the same as for the <code> g </code> element; thus, any element that can be a child of
+ * a <code> g </code> can also be a child of a 'defs', and vice versa.
+ */
+class SVGDefsElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGDefsElement();
+ SVGDefsElement(const SVGDefsElement &other);
+ SVGDefsElement &operator=(const SVGDefsElement &other);
+ SVGDefsElement(SVGDefsElementImpl *other);
+ virtual ~SVGDefsElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGDefsElementImpl *handle() const { return impl; }
+
+private:
+ SVGDefsElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDescElement.cc b/ksvg/dom/SVGDescElement.cc
new file mode 100644
index 00000000..6eed0ed9
--- /dev/null
+++ b/ksvg/dom/SVGDescElement.cc
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDescElement.h"
+#include "SVGDescElementImpl.h"
+
+using namespace KSVG;
+
+SVGDescElement::SVGDescElement() : SVGElement(), SVGLangSpace(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGDescElement::SVGDescElement(const SVGDescElement &other) : SVGElement(other), SVGLangSpace(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGDescElement &SVGDescElement::operator =(const SVGDescElement &other)
+{
+ SVGElement::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGDescElement::SVGDescElement(SVGDescElementImpl *other) : SVGElement(other), SVGLangSpace(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGDescElement::~SVGDescElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDescElement.h b/ksvg/dom/SVGDescElement.h
new file mode 100644
index 00000000..9a5b270f
--- /dev/null
+++ b/ksvg/dom/SVGDescElement.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDescElement_H
+#define SVGDescElement_H
+
+#include "SVGElement.h"
+#include "SVGLangSpace.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGDescElementImpl;
+class SVGDescElement : public SVGElement,
+ public SVGLangSpace,
+ public SVGStylable
+{
+public:
+ SVGDescElement();
+ SVGDescElement(const SVGDescElement &other);
+ SVGDescElement &operator=(const SVGDescElement &other);
+ SVGDescElement(SVGDescElementImpl *other);
+ virtual ~SVGDescElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGDescElementImpl *handle() const { return impl; }
+
+private:
+ SVGDescElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDocument.cc b/ksvg/dom/SVGDocument.cc
new file mode 100644
index 00000000..8734b8da
--- /dev/null
+++ b/ksvg/dom/SVGDocument.cc
@@ -0,0 +1,138 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "ksvg_ecma.h"
+
+#include "SVGDocument.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElement.h"
+#include "SVGWindow.h"
+
+using namespace KSVG;
+
+SVGDocument::SVGDocument() : DOM::Document(*(new SVGDocumentImpl()))
+{
+ impl = reinterpret_cast<SVGDocumentImpl *>(handle());
+ impl->ref();
+}
+
+SVGDocument::SVGDocument(const SVGDocument &other) : DOM::Document(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGDocument &SVGDocument::operator=(const SVGDocument &other)
+{
+ DOM::Document::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGDocument::SVGDocument(SVGDocumentImpl *other) : DOM::Document(other->handle())
+{
+ impl = other;
+
+ if(impl)
+ impl->ref();
+}
+
+SVGDocument::~SVGDocument()
+{
+ if(impl)
+ impl->deref();
+}
+
+DOM::DOMString SVGDocument::title() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->title();
+}
+
+DOM::DOMString SVGDocument::referrer() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->referrer();
+}
+
+DOM::DOMString SVGDocument::domain() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->domain();
+}
+
+DOM::DOMString SVGDocument::URL() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->URL();
+}
+
+SVGWindow SVGDocument::window() const
+{
+ if(!impl) return SVGWindow();
+ return impl->window();
+}
+
+SVGSVGElement SVGDocument::rootElement() const
+{
+ if(!impl) return SVGSVGElement(0);
+ return SVGSVGElement(impl->rootElement());
+}
+
+SVGElement SVGDocument::createElement(const DOM::DOMString &tagName)
+{
+ if(!impl) return SVGElement(0);
+
+ DOM::Element impl = DOM::Document::createElement(tagName);
+ return SVGElement(SVGDocumentImpl::createElement(tagName, impl));
+}
+
+SVGElement SVGDocument::createElementNS(const DOM::DOMString &namespaceURI, const DOM::DOMString &qualifiedName)
+{
+ if(!impl) return SVGElement(0);
+
+ DOM::Element impl = DOM::Document::createElementNS(namespaceURI, qualifiedName);
+ return SVGElement(SVGDocumentImpl::createElement(qualifiedName, impl));
+}
+
+// Internal
+KJS::Object SVGDocument::globalJSObject()
+{
+ if(!impl) return KJS::Object();
+ return impl->ecmaEngine()->globalObject();
+}
+
+KJS::ExecState *SVGDocument::globalJSExec()
+{
+ if(!impl) return 0;
+ return impl->ecmaEngine()->globalExec();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGDocument.h b/ksvg/dom/SVGDocument.h
new file mode 100644
index 00000000..c3f5c7bd
--- /dev/null
+++ b/ksvg/dom/SVGDocument.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDocument_H
+#define SVGDocument_H
+
+#include <kjs/object.h>
+
+#include <dom/dom_doc.h>
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGWindow;
+class SVGElement;
+class SVGSVGElement;
+class SVGDocumentImpl;
+class SVGDocument : public DOM::Document
+{
+public:
+ SVGDocument();
+ SVGDocument(const SVGDocument &other);
+ SVGDocument &operator=(const SVGDocument &other);
+ SVGDocument(SVGDocumentImpl *other);
+ ~SVGDocument();
+
+ DOM::DOMString title() const;
+ DOM::DOMString referrer() const;
+ DOM::DOMString domain() const;
+ DOM::DOMString URL() const;
+ SVGWindow window() const;
+
+ SVGSVGElement rootElement() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGDocumentImpl *handle() const { return impl; }
+
+ SVGElement createElement(const DOM::DOMString &tagName);
+ SVGElement createElementNS(const DOM::DOMString &namespaceURI, const DOM::DOMString &qualifiedName);
+
+ KJS::Object globalJSObject();
+ KJS::ExecState *globalJSExec();
+
+private:
+ SVGDocumentImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElement.cc b/ksvg/dom/SVGElement.cc
new file mode 100644
index 00000000..0edef368
--- /dev/null
+++ b/ksvg/dom/SVGElement.cc
@@ -0,0 +1,124 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSVGElement.h"
+#include "SVGElement.h"
+#include "SVGElementImpl.h"
+
+using namespace KSVG;
+
+// There is no way to create a SVGElement this way! Use SVGDocument.
+SVGElement::SVGElement() : DOM::Element()
+{
+ impl = 0; // new SVGElementImpl(ownerDocument().createElement().handle());
+}
+
+SVGElement::SVGElement(const SVGElement &other) : DOM::Element(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGElement &SVGElement::operator=(const SVGElement &other)
+{
+ // Baseclass assignement operators always first (Niko)
+ DOM::Element::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGElement::SVGElement(SVGElementImpl *other) : DOM::Element(other->handle())
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGElement::~SVGElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGElement::setId(DOM::DOMString value)
+{
+ if(impl)
+ impl->setId(value);
+}
+
+DOM::DOMString SVGElement::id()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->id();
+}
+
+void SVGElement::setXmlbase(DOM::DOMString value)
+{
+ if(impl)
+ impl->setXmlbase(value);
+}
+
+DOM::DOMString SVGElement::xmlbase()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->xmlbase();
+}
+
+SVGSVGElement SVGElement::ownerSVGElement()
+{
+ if(!impl) return SVGSVGElement(0);
+ return impl->ownerSVGElement();
+}
+
+SVGElement SVGElement::viewportElement()
+{
+ if(!impl) return SVGElement(0);
+ return impl->viewportElement();
+}
+
+void SVGElement::setAttribute(const DOM::DOMString &name, const DOM::DOMString &value)
+{
+ if(impl)
+ impl->setAttributeInternal(name, value);
+}
+
+DOM::DOMString SVGElement::getAttribute(const DOM::DOMString &name)
+{
+ if(!impl) return DOM::DOMString();
+ return impl->getAttributeInternal(name);
+}
+
+bool SVGElement::hasAttribute(const DOM::DOMString &name)
+{
+ if(!impl) return false;
+ return impl->hasAttribute(name);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElement.h b/ksvg/dom/SVGElement.h
new file mode 100644
index 00000000..12191b05
--- /dev/null
+++ b/ksvg/dom/SVGElement.h
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElement_H
+#define SVGElement_H
+
+#include <dom/dom_string.h>
+#include <dom/dom_element.h>
+
+namespace KSVG
+{
+
+// Not part of the DOM specification. Internal use only!
+#define dom_cast(Class, Obj) reinterpret_cast<Class##Impl *>(Obj.handle())
+
+template<class A, class B>
+class SVGSafeCreator
+{
+public:
+ SVGSafeCreator() { }
+ ~SVGSafeCreator() { }
+
+ static A create(B *impl)
+ {
+ if(!impl) return A(); // Don't use A(0) it'll crash!
+ return A(impl);
+ }
+};
+
+class SVGSVGElement;
+class SVGElementImpl;
+class SVGElement : public DOM::Element
+{
+public:
+ SVGElement();
+ SVGElement(const SVGElement &other);
+ SVGElement &operator=(const SVGElement &other);
+ SVGElement(SVGElementImpl *other);
+ ~SVGElement();
+
+ void setId(DOM::DOMString);
+ DOM::DOMString id();
+
+ void setXmlbase(DOM::DOMString);
+ DOM::DOMString xmlbase();
+
+ SVGSVGElement ownerSVGElement();
+ SVGElement viewportElement();
+
+ // We need to overwrite set/get/hasAttribute(s)
+ void setAttribute(const DOM::DOMString &name, const DOM::DOMString &value);
+ DOM::DOMString getAttribute(const DOM::DOMString &name);
+ bool hasAttribute(const DOM::DOMString &name);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGElementImpl *handle() const { return impl; }
+
+private:
+ SVGElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElementInstance.cc b/ksvg/dom/SVGElementInstance.cc
new file mode 100644
index 00000000..9bc027c0
--- /dev/null
+++ b/ksvg/dom/SVGElementInstance.cc
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGElementInstance.h"
+#include "SVGElementInstanceImpl.h"
+#include "SVGElementInstanceList.h"
+#include "SVGElement.h"
+#include "SVGUseElement.h"
+
+using namespace KSVG;
+
+SVGElementInstance::SVGElementInstance()
+{
+ impl = new SVGElementInstanceImpl();
+ impl->ref();
+}
+
+SVGElementInstance::SVGElementInstance(const SVGElementInstance &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGElementInstance &SVGElementInstance::operator =(const SVGElementInstance &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGElementInstance::SVGElementInstance(SVGElementInstanceImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGElementInstance::~SVGElementInstance()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGElement SVGElementInstance::correspondingElement() const
+{
+ if(!impl) return SVGElement(0);
+ return SVGElement(impl->correspondingElement());
+}
+
+SVGUseElement SVGElementInstance::correspondingUseElement() const
+{
+ if(!impl) return SVGUseElement(0);
+ return SVGUseElement(impl->correspondingUseElement());
+}
+
+SVGElementInstance SVGElementInstance::parentNode() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->parentNode());
+}
+
+SVGElementInstanceList SVGElementInstance::childNodes() const
+{
+ if(!impl) return SVGElementInstanceList(0);
+ return SVGElementInstanceList(impl->childNodes());
+}
+
+SVGElementInstance SVGElementInstance::firstChild() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->firstChild());
+}
+
+SVGElementInstance SVGElementInstance::lastChild() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->lastChild());
+}
+
+SVGElementInstance SVGElementInstance::previousSibling() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->previousSibling());
+}
+
+SVGElementInstance SVGElementInstance::nextSibling() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->nextSibling());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElementInstance.h b/ksvg/dom/SVGElementInstance.h
new file mode 100644
index 00000000..51d81831
--- /dev/null
+++ b/ksvg/dom/SVGElementInstance.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElementInstance_H
+#define SVGElementInstance_H
+
+namespace KSVG
+{
+
+class SVGElement;
+class SVGUseElement;
+class SVGElementInstanceList;
+class SVGElementInstanceImpl;
+class SVGElementInstance
+{
+public:
+ SVGElementInstance();
+ SVGElementInstance(const SVGElementInstance &other);
+ SVGElementInstance &operator=(const SVGElementInstance &other);
+ SVGElementInstance(SVGElementInstanceImpl *other);
+ ~SVGElementInstance();
+
+ SVGElement correspondingElement() const;
+ SVGUseElement correspondingUseElement() const;
+ SVGElementInstance parentNode() const;
+ SVGElementInstanceList childNodes() const;
+ SVGElementInstance firstChild() const;
+ SVGElementInstance lastChild() const;
+ SVGElementInstance previousSibling() const;
+ SVGElementInstance nextSibling() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGElementInstanceImpl *handle() const { return impl; }
+
+private:
+ SVGElementInstanceImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElementInstanceList.cc b/ksvg/dom/SVGElementInstanceList.cc
new file mode 100644
index 00000000..ccc99f37
--- /dev/null
+++ b/ksvg/dom/SVGElementInstanceList.cc
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGElementInstanceList.h"
+#include "SVGElementInstanceListImpl.h"
+#include "SVGElementInstance.h"
+
+using namespace KSVG;
+
+SVGElementInstanceList::SVGElementInstanceList()
+{
+ impl = new SVGElementInstanceListImpl();
+ impl->ref();
+}
+
+SVGElementInstanceList::SVGElementInstanceList(const SVGElementInstanceList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGElementInstanceList &SVGElementInstanceList::operator=(const SVGElementInstanceList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGElementInstanceList::SVGElementInstanceList(SVGElementInstanceListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGElementInstanceList::~SVGElementInstanceList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGElementInstanceList::length() const
+{
+ if(!impl) return 0;
+ return impl->length();
+}
+
+SVGElementInstance SVGElementInstanceList::item(unsigned long index)
+{
+ if(!impl) return SVGElementInstance(0);
+ return SVGElementInstance(impl->item(index));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGElementInstanceList.h b/ksvg/dom/SVGElementInstanceList.h
new file mode 100644
index 00000000..9beb40ed
--- /dev/null
+++ b/ksvg/dom/SVGElementInstanceList.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElementInstanceList_H
+#define SVGElementInstanceList_H
+
+namespace KSVG
+{
+
+class SVGElementInstance;
+class SVGElementInstanceListImpl;
+class SVGElementInstanceList
+{
+public:
+ SVGElementInstanceList();
+ SVGElementInstanceList(const SVGElementInstanceList &other);
+ SVGElementInstanceList &operator=(const SVGElementInstanceList &other);
+ SVGElementInstanceList(SVGElementInstanceListImpl *other);
+ ~SVGElementInstanceList();
+
+ unsigned long length() const;
+ SVGElementInstance item(unsigned long index);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGElementInstanceListImpl *handle() const { return impl; }
+
+private:
+ SVGElementInstanceListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGEllipseElement.cc b/ksvg/dom/SVGEllipseElement.cc
new file mode 100644
index 00000000..2b744ccb
--- /dev/null
+++ b/ksvg/dom/SVGEllipseElement.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGEllipseElement.h"
+#include "SVGEllipseElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGEllipseElement::SVGEllipseElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGEllipseElement::SVGEllipseElement(const SVGEllipseElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGEllipseElement &SVGEllipseElement::operator=(const SVGEllipseElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGEllipseElement::SVGEllipseElement(SVGEllipseElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGEllipseElement::~SVGEllipseElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGEllipseElement::cx()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cx());
+}
+
+SVGAnimatedLength SVGEllipseElement::cy()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cy());
+}
+
+SVGAnimatedLength SVGEllipseElement::rx()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->rx());
+}
+
+SVGAnimatedLength SVGEllipseElement::ry()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->ry());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGEllipseElement.h b/ksvg/dom/SVGEllipseElement.h
new file mode 100644
index 00000000..78399779
--- /dev/null
+++ b/ksvg/dom/SVGEllipseElement.h
@@ -0,0 +1,131 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGEllipseElement_H
+#define SVGEllipseElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGEllipseElementImpl;
+
+/**
+ * The <code>ellipse</code> element defines an ellipse which is
+ * axis-aligned with the current user coordinate system based on a
+ * center point and two radii.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#EllipseElement">9.4 The
+ * 'ellipse' element</a>.
+ */
+class SVGEllipseElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGEllipseElement();
+ SVGEllipseElement(const SVGEllipseElement &);
+ SVGEllipseElement &operator=(const SVGEllipseElement &other);
+ SVGEllipseElement(SVGEllipseElementImpl *);
+ ~SVGEllipseElement();
+
+ /**
+ * The x-axis coordinate of the center of the ellipse.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the center of the ellipse.
+ */
+ SVGAnimatedLength cx();
+
+ /**
+ * The y-axis coordinate of the center of the ellipse.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the center of the ellipse.
+ */
+ SVGAnimatedLength cy();
+
+ /**
+ * The x-axis radius of the ellipse.
+ * A negative value is an error (see <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">
+ * Error processing</a>). A value of zero disables rendering of
+ * the element.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-radius of the ellipse.
+ */
+ SVGAnimatedLength rx();
+
+ /**
+ * The y-axis radius of the ellipse.
+ * A negative value is an error (see <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">
+ * Error processing</a>). A value of zero disables rendering of
+ * the element.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-radius of the ellipse.
+ */
+ SVGAnimatedLength ry();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGEllipseElementImpl *handle() const { return impl; }
+
+private:
+ SVGEllipseElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGEvent.cc b/ksvg/dom/SVGEvent.cc
new file mode 100644
index 00000000..19fa6d27
--- /dev/null
+++ b/ksvg/dom/SVGEvent.cc
@@ -0,0 +1,187 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGEvent.h"
+#include "SVGEventImpl.h"
+
+using namespace KSVG;
+
+SVGEvent::SVGEvent() : DOM::Event()
+{
+ impl = 0;
+}
+
+SVGEvent::SVGEvent(const SVGEvent &other) : DOM::Event(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGEvent &SVGEvent::operator =(const SVGEvent &other)
+{
+ DOM::Event::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGEvent::SVGEvent(SVGEventImpl *other) : DOM::Event()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGEvent::~SVGEvent()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGEvent::EventId SVGEvent::typeToId(DOM::DOMString type)
+{
+ if(type == "DOMFocusIn")
+ return DOMFOCUSIN_EVENT;
+ else if(type == "DOMFocusOut")
+ return DOMFOCUSOUT_EVENT;
+ else if(type == "DOMActivate")
+ return DOMACTIVATE_EVENT;
+ else if(type == "click")
+ return CLICK_EVENT;
+ else if(type == "mousedown")
+ return MOUSEDOWN_EVENT;
+ else if(type == "mouseup")
+ return MOUSEUP_EVENT;
+ else if(type == "mouseover")
+ return MOUSEOVER_EVENT;
+ else if(type == "mousemove")
+ return MOUSEMOVE_EVENT;
+ else if(type == "mouseout")
+ return MOUSEOUT_EVENT;
+ else if(type == "DOMSubtreeModified")
+ return DOMSUBTREEMODIFIED_EVENT;
+ else if(type == "DOMNodeInserted")
+ return DOMNODEINSERTED_EVENT;
+ else if(type == "DOMNodeRemoved")
+ return DOMNODEREMOVED_EVENT;
+ else if(type == "DOMNodeRemovedFromDocument")
+ return DOMNODEREMOVEDFROMDOCUMENT_EVENT;
+ else if(type == "DOMNodeInsertedIntoDocument")
+ return DOMNODEINSERTEDINTODOCUMENT_EVENT;
+ else if(type == "DOMAttrModified")
+ return DOMATTRMODIFIED_EVENT;
+ else if(type == "DOMCharacterDataModified")
+ return DOMCHARACTERDATAMODIFIED_EVENT;
+ else if(type == "load")
+ return LOAD_EVENT;
+ else if(type == "unload")
+ return UNLOAD_EVENT;
+ else if(type == "abort")
+ return ABORT_EVENT;
+ else if(type == "error")
+ return ERROR_EVENT;
+ else if(type == "resize")
+ return RESIZE_EVENT;
+ else if(type == "scroll")
+ return SCROLL_EVENT;
+ else if(type == "zoom")
+ return ZOOM_EVENT;
+ else if(type == "keydown")
+ return KEYDOWN_EVENT;
+ else if(type == "keyup")
+ return KEYUP_EVENT;
+ else if(type == "keypress")
+ return KEYPRESS_EVENT;
+
+ return UNKNOWN_EVENT;
+}
+
+DOM::DOMString SVGEvent::idToType(EventId id)
+{
+ switch(id)
+ {
+ case DOMFOCUSIN_EVENT:
+ return "DOMFocusIn";
+ case DOMFOCUSOUT_EVENT:
+ return "DOMFocusOut";
+ case DOMACTIVATE_EVENT:
+ return "DOMActivate";
+ case CLICK_EVENT:
+ return "click";
+ case MOUSEDOWN_EVENT:
+ return "mousedown";
+ case MOUSEUP_EVENT:
+ return "mouseup";
+ case MOUSEOVER_EVENT:
+ return "mouseover";
+ case MOUSEMOVE_EVENT:
+ return "mousemove";
+ case MOUSEOUT_EVENT:
+ return "mouseout";
+ case DOMSUBTREEMODIFIED_EVENT:
+ return "DOMSubtreeModified";
+ case DOMNODEINSERTED_EVENT:
+ return "DOMNodeInserted";
+ case DOMNODEREMOVED_EVENT:
+ return "DOMNodeRemoved";
+ case DOMNODEREMOVEDFROMDOCUMENT_EVENT:
+ return "DOMNodeRemovedFromDocument";
+ case DOMNODEINSERTEDINTODOCUMENT_EVENT:
+ return "DOMNodeInsertedIntoDocument";
+ case DOMATTRMODIFIED_EVENT:
+ return "DOMAttrModified";
+ case DOMCHARACTERDATAMODIFIED_EVENT:
+ return "DOMCharacterDataModified";
+ case LOAD_EVENT:
+ return "load";
+ case UNLOAD_EVENT:
+ return "unload";
+ case ABORT_EVENT:
+ return "abort";
+ case ERROR_EVENT:
+ return "error";
+ case RESIZE_EVENT:
+ return "resize";
+ case SCROLL_EVENT:
+ return "scroll";
+ case ZOOM_EVENT:
+ return "zoom";
+ case KEYDOWN_EVENT:
+ return "keydown";
+ case KEYUP_EVENT:
+ return "keyup";
+ case KEYPRESS_EVENT:
+ return "keypress";
+ default:
+ return DOM::DOMString();
+ break;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGEvent.h b/ksvg/dom/SVGEvent.h
new file mode 100644
index 00000000..6aebf0aa
--- /dev/null
+++ b/ksvg/dom/SVGEvent.h
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGEvent_H
+#define SVGEvent_H
+
+#include <dom/dom2_events.h>
+
+namespace KSVG
+{
+
+class SVGEventImpl;
+class SVGEvent : public DOM::Event
+{
+public:
+ enum EventId
+ {
+ UNKNOWN_EVENT = 0,
+
+ // UI events
+ DOMFOCUSIN_EVENT,
+ DOMFOCUSOUT_EVENT,
+ DOMACTIVATE_EVENT,
+
+ // Mouse events
+ CLICK_EVENT,
+ MOUSEDOWN_EVENT,
+ MOUSEUP_EVENT,
+ MOUSEOVER_EVENT,
+ MOUSEMOVE_EVENT,
+ MOUSEOUT_EVENT,
+
+ // Mutation events
+ DOMSUBTREEMODIFIED_EVENT,
+ DOMNODEINSERTED_EVENT,
+ DOMNODEREMOVED_EVENT,
+ DOMNODEREMOVEDFROMDOCUMENT_EVENT,
+ DOMNODEINSERTEDINTODOCUMENT_EVENT,
+ DOMATTRMODIFIED_EVENT,
+ DOMCHARACTERDATAMODIFIED_EVENT,
+
+ // SVG events
+ LOAD_EVENT,
+ UNLOAD_EVENT,
+ ABORT_EVENT,
+ ERROR_EVENT,
+ RESIZE_EVENT,
+ SCROLL_EVENT,
+ ZOOM_EVENT,
+
+ // Key Events
+ KEYDOWN_EVENT,
+ KEYPRESS_EVENT,
+ KEYUP_EVENT
+ };
+
+ SVGEvent();
+ SVGEvent(const SVGEvent &other);
+ SVGEvent &operator=(const SVGEvent &other);
+ SVGEvent(SVGEventImpl *other);
+ virtual ~SVGEvent();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGEventImpl *handle() const { return impl; }
+
+ // Helper functions
+ static EventId typeToId(DOM::DOMString type);
+ static DOM::DOMString idToType(EventId id);
+
+private:
+ SVGEventImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGException.h b/ksvg/dom/SVGException.h
new file mode 100644
index 00000000..dbbe7175
--- /dev/null
+++ b/ksvg/dom/SVGException.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGException_H
+#define SVGException_H
+
+namespace KSVG
+{
+// TODO : use when DOM is full and/or ecma binding comes into play
+class SVGException
+{
+public:
+ SVGException(unsigned short code) { m_code = code; }
+ SVGException(const SVGException &other) { m_code = other.m_code; }
+ SVGException &operator=(const SVGException &other)
+ {
+ m_code = other.m_code;
+ return *this;
+ }
+ ~SVGException() {}
+
+ enum ExceptionCode {
+ SVG_WRONG_TYPE_ERR = 0,
+ SVG_INVALID_VALUE_ERR = 1,
+ SVG_MATRIX_NOT_INVERTABLE = 2
+ };
+ unsigned short m_code;
+};
+
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGExternalResourcesRequired.cc b/ksvg/dom/SVGExternalResourcesRequired.cc
new file mode 100644
index 00000000..986bf564
--- /dev/null
+++ b/ksvg/dom/SVGExternalResourcesRequired.cc
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGExternalResourcesRequired.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "SVGAnimatedBoolean.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGExternalResourcesRequired::SVGExternalResourcesRequired()
+{
+ impl = 0;
+}
+
+SVGExternalResourcesRequired::SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGExternalResourcesRequired &SVGExternalResourcesRequired::operator=(const SVGExternalResourcesRequired &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGExternalResourcesRequired::SVGExternalResourcesRequired(SVGExternalResourcesRequiredImpl *other)
+{
+ impl = other;
+}
+
+SVGExternalResourcesRequired::~SVGExternalResourcesRequired()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+SVGAnimatedBoolean SVGExternalResourcesRequired::externalResourcesRequired() const
+{
+ if(!impl) return SVGAnimatedBoolean(0);
+ return SVGAnimatedBoolean(impl->externalResourcesRequired());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGExternalResourcesRequired.h b/ksvg/dom/SVGExternalResourcesRequired.h
new file mode 100644
index 00000000..e3668881
--- /dev/null
+++ b/ksvg/dom/SVGExternalResourcesRequired.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGExternalResourcesRequired_H
+#define SVGExternalResourcesRequired_H
+
+namespace KSVG
+{
+
+class SVGAnimatedBoolean;
+class SVGExternalResourcesRequiredImpl;
+class SVGExternalResourcesRequired
+{
+public:
+ SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other);
+ SVGExternalResourcesRequired &operator=(const SVGExternalResourcesRequired &other);
+ SVGExternalResourcesRequired(SVGExternalResourcesRequiredImpl *other);
+ ~SVGExternalResourcesRequired();
+
+ SVGAnimatedBoolean externalResourcesRequired() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGExternalResourcesRequiredImpl *handle() const { return impl; }
+
+protected:
+ SVGExternalResourcesRequired();
+
+private:
+ SVGExternalResourcesRequiredImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEBlendElement.cc b/ksvg/dom/SVGFEBlendElement.cc
new file mode 100644
index 00000000..c991d18c
--- /dev/null
+++ b/ksvg/dom/SVGFEBlendElement.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEBlendElement.h"
+#include "SVGFEBlendElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGFEBlendElement::SVGFEBlendElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEBlendElement::SVGFEBlendElement(const SVGFEBlendElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEBlendElement &SVGFEBlendElement::operator =(const SVGFEBlendElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEBlendElement::SVGFEBlendElement(SVGFEBlendElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEBlendElement::~SVGFEBlendElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEBlendElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedString SVGFEBlendElement::in2() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in2());
+}
+
+SVGAnimatedEnumeration SVGFEBlendElement::mode() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->mode());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEBlendElement.h b/ksvg/dom/SVGFEBlendElement.h
new file mode 100644
index 00000000..91c64b3f
--- /dev/null
+++ b/ksvg/dom/SVGFEBlendElement.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEBlendElement_H
+#define SVGFEBlendElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_FEBLEND_MODE_UNKNOWN = 0,
+ SVG_FEBLEND_MODE_NORMAL = 1,
+ SVG_FEBLEND_MODE_MULTIPLY = 2,
+ SVG_FEBLEND_MODE_SCREEN = 3,
+ SVG_FEBLEND_MODE_DARKEN = 4,
+ SVG_FEBLEND_MODE_LIGHTEN = 5
+};
+
+class SVGAnimatedString;
+class SVGAnimatedEnumeration;
+class SVGFEBlendElementImpl;
+class SVGFEBlendElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEBlendElement();
+ SVGFEBlendElement(const SVGFEBlendElement &other);
+ SVGFEBlendElement &operator=(const SVGFEBlendElement &other);
+ SVGFEBlendElement(SVGFEBlendElementImpl *other);
+ virtual ~SVGFEBlendElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedString in2() const;
+ SVGAnimatedEnumeration mode() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEBlendElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEBlendElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEColorMatrixElement.cc b/ksvg/dom/SVGFEColorMatrixElement.cc
new file mode 100644
index 00000000..1f77ac0e
--- /dev/null
+++ b/ksvg/dom/SVGFEColorMatrixElement.cc
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEColorMatrixElement.h"
+#include "SVGFEColorMatrixElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedNumberList.h"
+
+using namespace KSVG;
+
+SVGFEColorMatrixElement::SVGFEColorMatrixElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEColorMatrixElement::SVGFEColorMatrixElement(const SVGFEColorMatrixElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEColorMatrixElement &SVGFEColorMatrixElement::operator =(const SVGFEColorMatrixElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEColorMatrixElement::SVGFEColorMatrixElement(SVGFEColorMatrixElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEColorMatrixElement::~SVGFEColorMatrixElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEColorMatrixElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedEnumeration SVGFEColorMatrixElement::type() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->type());
+}
+
+SVGAnimatedNumberList SVGFEColorMatrixElement::values() const
+{
+ if(!impl) return SVGAnimatedNumberList(0);
+ return SVGAnimatedNumberList(impl->values());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEColorMatrixElement.h b/ksvg/dom/SVGFEColorMatrixElement.h
new file mode 100644
index 00000000..bbe51f16
--- /dev/null
+++ b/ksvg/dom/SVGFEColorMatrixElement.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEColorMatrixElement_H
+#define SVGFEColorMatrixElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0,
+ SVG_FECOLORMATRIX_TYPE_MATRIX = 1,
+ SVG_FECOLORMATRIX_TYPE_SATURATE = 2,
+ SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3,
+ SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
+};
+
+class SVGAnimatedString;
+class SVGAnimatedEnumeration;
+class SVGAnimatedNumberList;
+class SVGFEColorMatrixElementImpl;
+class SVGFEColorMatrixElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEColorMatrixElement();
+ SVGFEColorMatrixElement(const SVGFEColorMatrixElement &other);
+ SVGFEColorMatrixElement &operator=(const SVGFEColorMatrixElement &other);
+ SVGFEColorMatrixElement(SVGFEColorMatrixElementImpl *other);
+ virtual ~SVGFEColorMatrixElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedEnumeration type() const;
+ SVGAnimatedNumberList values() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEColorMatrixElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEColorMatrixElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEComponentTransferElement.cc b/ksvg/dom/SVGFEComponentTransferElement.cc
new file mode 100644
index 00000000..ea0d7490
--- /dev/null
+++ b/ksvg/dom/SVGFEComponentTransferElement.cc
@@ -0,0 +1,75 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEComponentTransferElement.h"
+#include "SVGFEComponentTransferElementImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFEComponentTransferElement::SVGFEComponentTransferElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEComponentTransferElement::SVGFEComponentTransferElement(const SVGFEComponentTransferElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEComponentTransferElement &SVGFEComponentTransferElement::operator =(const SVGFEComponentTransferElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEComponentTransferElement::SVGFEComponentTransferElement(SVGFEComponentTransferElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEComponentTransferElement::~SVGFEComponentTransferElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEComponentTransferElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEComponentTransferElement.h b/ksvg/dom/SVGFEComponentTransferElement.h
new file mode 100644
index 00000000..c387a4ca
--- /dev/null
+++ b/ksvg/dom/SVGFEComponentTransferElement.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEComponentTransferElement_H
+#define SVGFEComponentTransferElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGFEComponentTransferElementImpl;
+class SVGFEComponentTransferElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEComponentTransferElement();
+ SVGFEComponentTransferElement(const SVGFEComponentTransferElement &other);
+ SVGFEComponentTransferElement &operator=(const SVGFEComponentTransferElement &other);
+ SVGFEComponentTransferElement(SVGFEComponentTransferElementImpl *other);
+ virtual ~SVGFEComponentTransferElement();
+
+ SVGAnimatedString in1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEComponentTransferElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEComponentTransferElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFECompositeElement.cc b/ksvg/dom/SVGFECompositeElement.cc
new file mode 100644
index 00000000..61cf4352
--- /dev/null
+++ b/ksvg/dom/SVGFECompositeElement.cc
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFECompositeElement.h"
+#include "SVGFECompositeElementImpl.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGFECompositeElement::SVGFECompositeElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFECompositeElement::SVGFECompositeElement(const SVGFECompositeElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFECompositeElement &SVGFECompositeElement::operator =(const SVGFECompositeElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFECompositeElement::SVGFECompositeElement(SVGFECompositeElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFECompositeElement::~SVGFECompositeElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFECompositeElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedString SVGFECompositeElement::in2() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in2());
+}
+
+SVGAnimatedEnumeration SVGFECompositeElement::Operator() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->Operator());
+}
+
+SVGAnimatedNumber SVGFECompositeElement::k1() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->k1());
+}
+
+SVGAnimatedNumber SVGFECompositeElement::k2() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->k2());
+}
+
+SVGAnimatedNumber SVGFECompositeElement::k3() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->k3());
+}
+
+SVGAnimatedNumber SVGFECompositeElement::k4() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->k4());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFECompositeElement.h b/ksvg/dom/SVGFECompositeElement.h
new file mode 100644
index 00000000..dcfa1817
--- /dev/null
+++ b/ksvg/dom/SVGFECompositeElement.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFECompositeElement_H
+#define SVGFECompositeElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0,
+ SVG_FECOMPOSITE_OPERATOR_OVER = 1,
+ SVG_FECOMPOSITE_OPERATOR_IN = 2,
+ SVG_FECOMPOSITE_OPERATOR_OUT = 3,
+ SVG_FECOMPOSITE_OPERATOR_ATOP = 4,
+ SVG_FECOMPOSITE_OPERATOR_XOR = 5,
+ SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
+};
+
+class SVGAnimatedString;
+class SVGAnimatedEnumeration;
+class SVGAnimatedNumber;
+class SVGFECompositeElementImpl;
+class SVGFECompositeElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFECompositeElement();
+ SVGFECompositeElement(const SVGFECompositeElement &other);
+ SVGFECompositeElement &operator=(const SVGFECompositeElement &other);
+ SVGFECompositeElement(SVGFECompositeElementImpl *other);
+ virtual ~SVGFECompositeElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedString in2() const;
+ SVGAnimatedEnumeration Operator() const; // TODO : impossible otherwise ?
+ SVGAnimatedNumber k1() const;
+ SVGAnimatedNumber k2() const;
+ SVGAnimatedNumber k3() const;
+ SVGAnimatedNumber k4() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFECompositeElementImpl *handle() const { return impl; }
+
+private:
+ SVGFECompositeElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEConvolveMatrixElement.cc b/ksvg/dom/SVGFEConvolveMatrixElement.cc
new file mode 100644
index 00000000..5ecc292c
--- /dev/null
+++ b/ksvg/dom/SVGFEConvolveMatrixElement.cc
@@ -0,0 +1,140 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEConvolveMatrixElement.h"
+#include "SVGFEConvolveMatrixElementImpl.h"
+#include "SVGAnimatedInteger.h"
+#include "SVGAnimatedNumberList.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedBoolean.h"
+
+using namespace KSVG;
+
+SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const SVGFEConvolveMatrixElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEConvolveMatrixElement &SVGFEConvolveMatrixElement::operator =(const SVGFEConvolveMatrixElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(SVGFEConvolveMatrixElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedInteger SVGFEConvolveMatrixElement::orderX() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->orderX());
+}
+
+SVGAnimatedInteger SVGFEConvolveMatrixElement::orderY() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->orderY());
+}
+
+SVGAnimatedNumberList SVGFEConvolveMatrixElement::kernelMatrix() const
+{
+ if(!impl) return SVGAnimatedNumberList(0);
+ return SVGAnimatedNumberList(impl->kernelMatrix());
+}
+
+SVGAnimatedNumber SVGFEConvolveMatrixElement::divisor() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->divisor());
+}
+
+SVGAnimatedNumber SVGFEConvolveMatrixElement::bias() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->bias());
+}
+
+SVGAnimatedInteger SVGFEConvolveMatrixElement::targetX() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->targetX());
+}
+
+SVGAnimatedInteger SVGFEConvolveMatrixElement::targetY() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->targetY());
+}
+
+SVGAnimatedEnumeration SVGFEConvolveMatrixElement::edgeMode() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->edgeMode());
+}
+
+SVGAnimatedLength SVGFEConvolveMatrixElement::kernelUnitLengthX() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->kernelUnitLengthX());
+}
+
+SVGAnimatedLength SVGFEConvolveMatrixElement::kernelUnitLengthY() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->kernelUnitLengthY());
+}
+
+SVGAnimatedBoolean SVGFEConvolveMatrixElement::preserveAlpha() const
+{
+ if(!impl) return SVGAnimatedBoolean(0);
+ return SVGAnimatedBoolean(impl->preserveAlpha());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEConvolveMatrixElement.h b/ksvg/dom/SVGFEConvolveMatrixElement.h
new file mode 100644
index 00000000..88a7ed00
--- /dev/null
+++ b/ksvg/dom/SVGFEConvolveMatrixElement.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEConvolveMatrixElement_H
+#define SVGFEConvolveMatrixElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_EDGEMODE_UNKNOWN = 0,
+ SVG_EDGEMODE_DUPLICATE = 1,
+ SVG_EDGEMODE_WRAP = 2,
+ SVG_EDGEMODE_NONE = 3
+};
+
+class SVGAnimatedInteger;
+class SVGAnimatedNumberList;
+class SVGAnimatedNumber;
+class SVGAnimatedEnumeration;
+class SVGAnimatedLength;
+class SVGAnimatedBoolean;
+class SVGFEConvolveMatrixElementImpl;
+class SVGFEConvolveMatrixElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEConvolveMatrixElement();
+ SVGFEConvolveMatrixElement(const SVGFEConvolveMatrixElement &other);
+ SVGFEConvolveMatrixElement &operator=(const SVGFEConvolveMatrixElement &other);
+ SVGFEConvolveMatrixElement(SVGFEConvolveMatrixElementImpl *other);
+ virtual ~SVGFEConvolveMatrixElement();
+
+ SVGAnimatedInteger orderX() const;
+ SVGAnimatedInteger orderY() const;
+ SVGAnimatedNumberList kernelMatrix() const;
+ SVGAnimatedNumber divisor() const;
+ SVGAnimatedNumber bias() const;
+ SVGAnimatedInteger targetX() const;
+ SVGAnimatedInteger targetY() const;
+ SVGAnimatedEnumeration edgeMode() const;
+ SVGAnimatedLength kernelUnitLengthX() const;
+ SVGAnimatedLength kernelUnitLengthY() const;
+ SVGAnimatedBoolean preserveAlpha() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEConvolveMatrixElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEConvolveMatrixElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDiffuseLightingElement.cc b/ksvg/dom/SVGFEDiffuseLightingElement.cc
new file mode 100644
index 00000000..eba5935f
--- /dev/null
+++ b/ksvg/dom/SVGFEDiffuseLightingElement.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEDiffuseLightingElement.h"
+#include "SVGFEDiffuseLightingElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const SVGFEDiffuseLightingElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEDiffuseLightingElement &SVGFEDiffuseLightingElement::operator =(const SVGFEDiffuseLightingElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(SVGFEDiffuseLightingElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEDiffuseLightingElement::~SVGFEDiffuseLightingElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEDiffuseLightingElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedNumber SVGFEDiffuseLightingElement::surfaceScale() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->surfaceScale());
+}
+
+SVGAnimatedNumber SVGFEDiffuseLightingElement::diffuseConstant() const
+{
+ if(!impl) return SVGAnimatedNumber();
+ return SVGAnimatedNumber(impl->diffuseConstant());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDiffuseLightingElement.h b/ksvg/dom/SVGFEDiffuseLightingElement.h
new file mode 100644
index 00000000..6356d996
--- /dev/null
+++ b/ksvg/dom/SVGFEDiffuseLightingElement.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDiffuseLightingElement_H
+#define SVGFEDiffuseLightingElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGAnimatedNumber;
+class SVGFEDiffuseLightingElementImpl;
+class SVGFEDiffuseLightingElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEDiffuseLightingElement();
+ SVGFEDiffuseLightingElement(const SVGFEDiffuseLightingElement &other);
+ SVGFEDiffuseLightingElement &operator=(const SVGFEDiffuseLightingElement &other);
+ SVGFEDiffuseLightingElement(SVGFEDiffuseLightingElementImpl *other);
+ virtual ~SVGFEDiffuseLightingElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedNumber surfaceScale() const;
+ SVGAnimatedNumber diffuseConstant() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEDiffuseLightingElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEDiffuseLightingElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDisplacementMapElement.cc b/ksvg/dom/SVGFEDisplacementMapElement.cc
new file mode 100644
index 00000000..7c41fd3e
--- /dev/null
+++ b/ksvg/dom/SVGFEDisplacementMapElement.cc
@@ -0,0 +1,101 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEDisplacementMapElement.h"
+#include "SVGFEDisplacementMapElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGFEDisplacementMapElement::SVGFEDisplacementMapElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const SVGFEDisplacementMapElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEDisplacementMapElement &SVGFEDisplacementMapElement::operator =(const SVGFEDisplacementMapElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(SVGFEDisplacementMapElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEDisplacementMapElement::~SVGFEDisplacementMapElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEDisplacementMapElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedString SVGFEDisplacementMapElement::in2() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in2());
+}
+
+SVGAnimatedNumber SVGFEDisplacementMapElement::scale() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->scale());
+}
+
+SVGAnimatedEnumeration SVGFEDisplacementMapElement::xChannelSelector() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->xChannelSelector());
+}
+
+SVGAnimatedEnumeration SVGFEDisplacementMapElement::yChannelSelector() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->yChannelSelector());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDisplacementMapElement.h b/ksvg/dom/SVGFEDisplacementMapElement.h
new file mode 100644
index 00000000..ee591ca4
--- /dev/null
+++ b/ksvg/dom/SVGFEDisplacementMapElement.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDisplacementMapElement_H
+#define SVGFEDisplacementMapElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+enum
+{
+ SVG_CHANNEL_UNKNOWN = 0,
+ SVG_CHANNEL_R = 1,
+ SVG_CHANNEL_G = 2,
+ SVG_CHANNEL_B = 3,
+ SVG_CHANNEL_A = 4
+};
+
+class SVGAnimatedNumber;
+class SVGAnimatedString;
+class SVGAnimatedEnumeration;
+class SVGFEDisplacementMapElementImpl;
+class SVGFEDisplacementMapElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEDisplacementMapElement();
+ SVGFEDisplacementMapElement(const SVGFEDisplacementMapElement &other);
+ SVGFEDisplacementMapElement &operator=(const SVGFEDisplacementMapElement &other);
+ SVGFEDisplacementMapElement(SVGFEDisplacementMapElementImpl *other);
+ virtual ~SVGFEDisplacementMapElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedString in2() const;
+ SVGAnimatedNumber scale() const;
+ SVGAnimatedEnumeration xChannelSelector() const;
+ SVGAnimatedEnumeration yChannelSelector() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEDisplacementMapElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEDisplacementMapElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDistantLightElement.cc b/ksvg/dom/SVGFEDistantLightElement.cc
new file mode 100644
index 00000000..92371abc
--- /dev/null
+++ b/ksvg/dom/SVGFEDistantLightElement.cc
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEDistantLightElement.h"
+#include "SVGFEDistantLightElementImpl.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGFEDistantLightElement::SVGFEDistantLightElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFEDistantLightElement::SVGFEDistantLightElement(const SVGFEDistantLightElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEDistantLightElement &SVGFEDistantLightElement::operator =(const SVGFEDistantLightElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEDistantLightElement::SVGFEDistantLightElement(SVGFEDistantLightElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEDistantLightElement::~SVGFEDistantLightElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedNumber SVGFEDistantLightElement::azimuth() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->azimuth());
+}
+
+SVGAnimatedNumber SVGFEDistantLightElement::elevation() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->elevation());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEDistantLightElement.h b/ksvg/dom/SVGFEDistantLightElement.h
new file mode 100644
index 00000000..4b2c926a
--- /dev/null
+++ b/ksvg/dom/SVGFEDistantLightElement.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDistantLightElement_H
+#define SVGFEDistantLightElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumber;
+class SVGFEDistantLightElementImpl;
+class SVGFEDistantLightElement : public SVGElement
+{
+public:
+ SVGFEDistantLightElement();
+ SVGFEDistantLightElement(const SVGFEDistantLightElement &other);
+ SVGFEDistantLightElement &operator=(const SVGFEDistantLightElement &other);
+ SVGFEDistantLightElement(SVGFEDistantLightElementImpl *other);
+ virtual ~SVGFEDistantLightElement();
+
+ SVGAnimatedNumber azimuth() const;
+ SVGAnimatedNumber elevation() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEDistantLightElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEDistantLightElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFloodElement.cc b/ksvg/dom/SVGFEFloodElement.cc
new file mode 100644
index 00000000..7b0b320c
--- /dev/null
+++ b/ksvg/dom/SVGFEFloodElement.cc
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFloodElement.h"
+#include "SVGFEFloodElementImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFEFloodElement::SVGFEFloodElement() : SVGElement(), SVGStylable(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEFloodElement::SVGFEFloodElement(const SVGFEFloodElement &other) : SVGElement(other), SVGStylable(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEFloodElement &SVGFEFloodElement::operator =(const SVGFEFloodElement &other)
+{
+ SVGElement::operator=(other);
+ SVGStylable::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEFloodElement::SVGFEFloodElement(SVGFEFloodElementImpl *other) : SVGElement(other), SVGStylable(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEFloodElement::~SVGFEFloodElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEFloodElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFloodElement.h b/ksvg/dom/SVGFEFloodElement.h
new file mode 100644
index 00000000..401e056b
--- /dev/null
+++ b/ksvg/dom/SVGFEFloodElement.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFloodElement_H
+#define SVGFEFloodElement_H
+
+#include "SVGElement.h"
+#include "SVGStylable.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGFEFloodElementImpl;
+class SVGFEFloodElement : public SVGElement,
+ public SVGStylable,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEFloodElement();
+ SVGFEFloodElement(const SVGFEFloodElement &other);
+ SVGFEFloodElement &operator=(const SVGFEFloodElement &other);
+ SVGFEFloodElement(SVGFEFloodElementImpl *other);
+ virtual ~SVGFEFloodElement();
+
+ SVGAnimatedString in1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEFloodElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEFloodElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncAElement.cc b/ksvg/dom/SVGFEFuncAElement.cc
new file mode 100644
index 00000000..cd0e9f10
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncAElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncAElement.h"
+#include "SVGFEFuncAElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncAElement::SVGFEFuncAElement() : SVGComponentTransferFunctionElement()
+{
+ impl = 0;
+}
+
+SVGFEFuncAElement::SVGFEFuncAElement(const SVGFEFuncAElement &other) : SVGComponentTransferFunctionElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEFuncAElement &SVGFEFuncAElement::operator =(const SVGFEFuncAElement &other)
+{
+ SVGComponentTransferFunctionElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEFuncAElement::SVGFEFuncAElement(SVGFEFuncAElementImpl *other) : SVGComponentTransferFunctionElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEFuncAElement::~SVGFEFuncAElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncAElement.h b/ksvg/dom/SVGFEFuncAElement.h
new file mode 100644
index 00000000..64287f27
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncAElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncAElement_H
+#define SVGFEFuncAElement_H
+
+#include "SVGComponentTransferFunctionElement.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncAElementImpl;
+class SVGFEFuncAElement : public SVGComponentTransferFunctionElement
+{
+public:
+ SVGFEFuncAElement();
+ SVGFEFuncAElement(const SVGFEFuncAElement &other);
+ SVGFEFuncAElement &operator=(const SVGFEFuncAElement &other);
+ SVGFEFuncAElement(SVGFEFuncAElementImpl *other);
+ virtual ~SVGFEFuncAElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEFuncAElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEFuncAElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncBElement.cc b/ksvg/dom/SVGFEFuncBElement.cc
new file mode 100644
index 00000000..2cf0fdb0
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncBElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncBElement.h"
+#include "SVGFEFuncBElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncBElement::SVGFEFuncBElement() : SVGComponentTransferFunctionElement()
+{
+ impl = 0;
+}
+
+SVGFEFuncBElement::SVGFEFuncBElement(const SVGFEFuncBElement &other) : SVGComponentTransferFunctionElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEFuncBElement &SVGFEFuncBElement::operator =(const SVGFEFuncBElement &other)
+{
+ SVGComponentTransferFunctionElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEFuncBElement::SVGFEFuncBElement(SVGFEFuncBElementImpl *other) : SVGComponentTransferFunctionElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEFuncBElement::~SVGFEFuncBElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncBElement.h b/ksvg/dom/SVGFEFuncBElement.h
new file mode 100644
index 00000000..2eacbbc3
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncBElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncBElement_H
+#define SVGFEFuncBElement_H
+
+#include "SVGComponentTransferFunctionElement.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncBElementImpl;
+class SVGFEFuncBElement : public SVGComponentTransferFunctionElement
+{
+public:
+ SVGFEFuncBElement();
+ SVGFEFuncBElement(const SVGFEFuncBElement &other);
+ SVGFEFuncBElement &operator=(const SVGFEFuncBElement &other);
+ SVGFEFuncBElement(SVGFEFuncBElementImpl *other);
+ virtual ~SVGFEFuncBElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEFuncBElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEFuncBElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncGElement.cc b/ksvg/dom/SVGFEFuncGElement.cc
new file mode 100644
index 00000000..ef8fdfea
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncGElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncGElement.h"
+#include "SVGFEFuncGElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncGElement::SVGFEFuncGElement() : SVGComponentTransferFunctionElement()
+{
+ impl = 0;
+}
+
+SVGFEFuncGElement::SVGFEFuncGElement(const SVGFEFuncGElement &other) : SVGComponentTransferFunctionElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEFuncGElement &SVGFEFuncGElement::operator =(const SVGFEFuncGElement &other)
+{
+ SVGComponentTransferFunctionElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEFuncGElement::SVGFEFuncGElement(SVGFEFuncGElementImpl *other) : SVGComponentTransferFunctionElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEFuncGElement::~SVGFEFuncGElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncGElement.h b/ksvg/dom/SVGFEFuncGElement.h
new file mode 100644
index 00000000..09c98195
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncGElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncGElement_H
+#define SVGFEFuncGElement_H
+
+#include "SVGComponentTransferFunctionElement.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncGElementImpl;
+class SVGFEFuncGElement : public SVGComponentTransferFunctionElement
+{
+public:
+ SVGFEFuncGElement();
+ SVGFEFuncGElement(const SVGFEFuncGElement &other);
+ SVGFEFuncGElement &operator=(const SVGFEFuncGElement &other);
+ SVGFEFuncGElement(SVGFEFuncGElementImpl *other);
+ virtual ~SVGFEFuncGElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEFuncGElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEFuncGElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncRElement.cc b/ksvg/dom/SVGFEFuncRElement.cc
new file mode 100644
index 00000000..2020e33c
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncRElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncRElement.h"
+#include "SVGFEFuncRElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncRElement::SVGFEFuncRElement() : SVGComponentTransferFunctionElement()
+{
+ impl = 0;
+}
+
+SVGFEFuncRElement::SVGFEFuncRElement(const SVGFEFuncRElement &other) : SVGComponentTransferFunctionElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEFuncRElement &SVGFEFuncRElement::operator =(const SVGFEFuncRElement &other)
+{
+ SVGComponentTransferFunctionElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEFuncRElement::SVGFEFuncRElement(SVGFEFuncRElementImpl *other) : SVGComponentTransferFunctionElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEFuncRElement::~SVGFEFuncRElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEFuncRElement.h b/ksvg/dom/SVGFEFuncRElement.h
new file mode 100644
index 00000000..1a58ef15
--- /dev/null
+++ b/ksvg/dom/SVGFEFuncRElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncRElement_H
+#define SVGFEFuncRElement_H
+
+#include "SVGComponentTransferFunctionElement.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncRElementImpl;
+class SVGFEFuncRElement : public SVGComponentTransferFunctionElement
+{
+public:
+ SVGFEFuncRElement();
+ SVGFEFuncRElement(const SVGFEFuncRElement &other);
+ SVGFEFuncRElement &operator=(const SVGFEFuncRElement &other);
+ SVGFEFuncRElement(SVGFEFuncRElementImpl *other);
+ virtual ~SVGFEFuncRElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEFuncRElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEFuncRElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEGaussianBlurElement.cc b/ksvg/dom/SVGFEGaussianBlurElement.cc
new file mode 100644
index 00000000..2daaa8b8
--- /dev/null
+++ b/ksvg/dom/SVGFEGaussianBlurElement.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEGaussianBlurElement.h"
+#include "SVGFEGaussianBlurElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGFEGaussianBlurElement::SVGFEGaussianBlurElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const SVGFEGaussianBlurElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEGaussianBlurElement &SVGFEGaussianBlurElement::operator =(const SVGFEGaussianBlurElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(SVGFEGaussianBlurElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEGaussianBlurElement::~SVGFEGaussianBlurElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEGaussianBlurElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedNumber SVGFEGaussianBlurElement::stdDeviationX() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->stdDeviationX());
+}
+
+SVGAnimatedNumber SVGFEGaussianBlurElement::stdDeviationY() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->stdDeviationY());
+}
+
+void SVGFEGaussianBlurElement::setStdDeviation(float stdDeviationX, float stdDeviationY)
+{
+ if(impl)
+ impl->setStdDeviation(stdDeviationX, stdDeviationY);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEGaussianBlurElement.h b/ksvg/dom/SVGFEGaussianBlurElement.h
new file mode 100644
index 00000000..a920ea68
--- /dev/null
+++ b/ksvg/dom/SVGFEGaussianBlurElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEGaussianBlurElement_H
+#define SVGFEGaussianBlurElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGAnimatedNumber;
+class SVGFEGaussianBlurElementImpl;
+class SVGFEGaussianBlurElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEGaussianBlurElement();
+ SVGFEGaussianBlurElement(const SVGFEGaussianBlurElement &other);
+ SVGFEGaussianBlurElement &operator=(const SVGFEGaussianBlurElement &other);
+ SVGFEGaussianBlurElement(SVGFEGaussianBlurElementImpl *other);
+ virtual ~SVGFEGaussianBlurElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedNumber stdDeviationX() const;
+ SVGAnimatedNumber stdDeviationY() const;
+
+ void setStdDeviation(float stdDeviationX, float stdDeviationY);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEGaussianBlurElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEGaussianBlurElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEImageElement.cc b/ksvg/dom/SVGFEImageElement.cc
new file mode 100644
index 00000000..6781edb6
--- /dev/null
+++ b/ksvg/dom/SVGFEImageElement.cc
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEImageElement.h"
+#include "SVGFEImageElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEImageElement::SVGFEImageElement() : SVGElement(), SVGURIReference(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEImageElement::SVGFEImageElement(const SVGFEImageElement &other) : SVGElement(other), SVGURIReference(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEImageElement &SVGFEImageElement::operator =(const SVGFEImageElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEImageElement::SVGFEImageElement(SVGFEImageElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEImageElement::~SVGFEImageElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEImageElement.h b/ksvg/dom/SVGFEImageElement.h
new file mode 100644
index 00000000..2c8d5b38
--- /dev/null
+++ b/ksvg/dom/SVGFEImageElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEImageElement_H
+#define SVGFEImageElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGFEImageElementImpl;
+class SVGFEImageElement : public SVGElement,
+ public SVGURIReference,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEImageElement();
+ SVGFEImageElement(const SVGFEImageElement &other);
+ SVGFEImageElement &operator=(const SVGFEImageElement &other);
+ SVGFEImageElement(SVGFEImageElementImpl *other);
+ virtual ~SVGFEImageElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEImageElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEImageElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMergeElement.cc b/ksvg/dom/SVGFEMergeElement.cc
new file mode 100644
index 00000000..8440cd53
--- /dev/null
+++ b/ksvg/dom/SVGFEMergeElement.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEMergeElement.h"
+#include "SVGFEMergeElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEMergeElement::SVGFEMergeElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEMergeElement::SVGFEMergeElement(const SVGFEMergeElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEMergeElement &SVGFEMergeElement::operator =(const SVGFEMergeElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEMergeElement::SVGFEMergeElement(SVGFEMergeElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEMergeElement::~SVGFEMergeElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMergeElement.h b/ksvg/dom/SVGFEMergeElement.h
new file mode 100644
index 00000000..72e915ec
--- /dev/null
+++ b/ksvg/dom/SVGFEMergeElement.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMergeElement_H
+#define SVGFEMergeElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGFEMergeElementImpl;
+class SVGFEMergeElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEMergeElement();
+ SVGFEMergeElement(const SVGFEMergeElement &other);
+ SVGFEMergeElement &operator=(const SVGFEMergeElement &other);
+ SVGFEMergeElement(SVGFEMergeElementImpl *other);
+ virtual ~SVGFEMergeElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEMergeElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEMergeElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMergeNodeElement.cc b/ksvg/dom/SVGFEMergeNodeElement.cc
new file mode 100644
index 00000000..7abe70e7
--- /dev/null
+++ b/ksvg/dom/SVGFEMergeNodeElement.cc
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEMergeNodeElement.h"
+#include "SVGFEMergeNodeElementImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFEMergeNodeElement::SVGFEMergeNodeElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFEMergeNodeElement::SVGFEMergeNodeElement(const SVGFEMergeNodeElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEMergeNodeElement &SVGFEMergeNodeElement::operator =(const SVGFEMergeNodeElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEMergeNodeElement::SVGFEMergeNodeElement(SVGFEMergeNodeElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEMergeNodeElement::~SVGFEMergeNodeElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEMergeNodeElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMergeNodeElement.h b/ksvg/dom/SVGFEMergeNodeElement.h
new file mode 100644
index 00000000..e9002f0c
--- /dev/null
+++ b/ksvg/dom/SVGFEMergeNodeElement.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMergeNodeElement_H
+#define SVGFEMergeNodeElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGFEMergeNodeElementImpl;
+class SVGFEMergeNodeElement : public SVGElement
+{
+public:
+ SVGFEMergeNodeElement();
+ SVGFEMergeNodeElement(const SVGFEMergeNodeElement &other);
+ SVGFEMergeNodeElement &operator=(const SVGFEMergeNodeElement &other);
+ SVGFEMergeNodeElement(SVGFEMergeNodeElementImpl *other);
+ virtual ~SVGFEMergeNodeElement();
+
+ SVGAnimatedString in1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEMergeNodeElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEMergeNodeElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMorphologyElement.cc b/ksvg/dom/SVGFEMorphologyElement.cc
new file mode 100644
index 00000000..293d86a8
--- /dev/null
+++ b/ksvg/dom/SVGFEMorphologyElement.cc
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEMorphologyElement.h"
+#include "SVGFEMorphologyElementImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGFEMorphologyElement::SVGFEMorphologyElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEMorphologyElement::SVGFEMorphologyElement(const SVGFEMorphologyElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEMorphologyElement &SVGFEMorphologyElement::operator =(const SVGFEMorphologyElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEMorphologyElement::SVGFEMorphologyElement(SVGFEMorphologyElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEMorphologyElement::~SVGFEMorphologyElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEMorphologyElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedEnumeration SVGFEMorphologyElement::Operator() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->Operator());
+}
+
+SVGAnimatedLength SVGFEMorphologyElement::radiusX() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->radiusX());
+}
+
+SVGAnimatedLength SVGFEMorphologyElement::radiusY() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->radiusY());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEMorphologyElement.h b/ksvg/dom/SVGFEMorphologyElement.h
new file mode 100644
index 00000000..7ca1b6a0
--- /dev/null
+++ b/ksvg/dom/SVGFEMorphologyElement.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMorphologyElement_H
+#define SVGFEMorphologyElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0,
+ SVG_MORPHOLOGY_OPERATOR_ERODE = 1,
+ SVG_MORPHOLOGY_OPERATOR_DILATE = 2
+};
+
+class SVGAnimatedString;
+class SVGAnimatedEnumeration;
+class SVGAnimatedLength;
+class SVGFEMorphologyElementImpl;
+class SVGFEMorphologyElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEMorphologyElement();
+ SVGFEMorphologyElement(const SVGFEMorphologyElement &other);
+ SVGFEMorphologyElement &operator=(const SVGFEMorphologyElement &other);
+ SVGFEMorphologyElement(SVGFEMorphologyElementImpl *other);
+ virtual ~SVGFEMorphologyElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedEnumeration Operator() const;
+ SVGAnimatedLength radiusX() const;
+ SVGAnimatedLength radiusY() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEMorphologyElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEMorphologyElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEOffsetElement.cc b/ksvg/dom/SVGFEOffsetElement.cc
new file mode 100644
index 00000000..f16ff5ed
--- /dev/null
+++ b/ksvg/dom/SVGFEOffsetElement.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEOffsetElement.h"
+#include "SVGFEOffsetElementImpl.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFEOffsetElement::SVGFEOffsetElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFEOffsetElement::SVGFEOffsetElement(const SVGFEOffsetElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEOffsetElement &SVGFEOffsetElement::operator =(const SVGFEOffsetElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEOffsetElement::SVGFEOffsetElement(SVGFEOffsetElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEOffsetElement::~SVGFEOffsetElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFEOffsetElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedNumber SVGFEOffsetElement::dx() const
+{
+ if(!impl) return SVGAnimatedNumber(0); // FIXME
+ return SVGAnimatedNumber(impl->dx());
+}
+
+SVGAnimatedNumber SVGFEOffsetElement::dy() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->dy());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEOffsetElement.h b/ksvg/dom/SVGFEOffsetElement.h
new file mode 100644
index 00000000..62b63407
--- /dev/null
+++ b/ksvg/dom/SVGFEOffsetElement.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEOffsetElement_H
+#define SVGFEOffsetElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGAnimatedNumber;
+class SVGFEOffsetElementImpl;
+class SVGFEOffsetElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFEOffsetElement();
+ SVGFEOffsetElement(const SVGFEOffsetElement &other);
+ SVGFEOffsetElement &operator=(const SVGFEOffsetElement &other);
+ SVGFEOffsetElement(SVGFEOffsetElementImpl *other);
+ virtual ~SVGFEOffsetElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedNumber dx() const;
+ SVGAnimatedNumber dy() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEOffsetElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEOffsetElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEPointLightElement.cc b/ksvg/dom/SVGFEPointLightElement.cc
new file mode 100644
index 00000000..ce5e4635
--- /dev/null
+++ b/ksvg/dom/SVGFEPointLightElement.cc
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEPointLightElement.h"
+#include "SVGFEPointLightElementImpl.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGFEPointLightElement::SVGFEPointLightElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFEPointLightElement::SVGFEPointLightElement(const SVGFEPointLightElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFEPointLightElement &SVGFEPointLightElement::operator =(const SVGFEPointLightElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFEPointLightElement::SVGFEPointLightElement(SVGFEPointLightElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFEPointLightElement::~SVGFEPointLightElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedNumber SVGFEPointLightElement::x() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->x());
+}
+
+SVGAnimatedNumber SVGFEPointLightElement::y() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->y());
+}
+
+SVGAnimatedNumber SVGFEPointLightElement::z() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->z());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFEPointLightElement.h b/ksvg/dom/SVGFEPointLightElement.h
new file mode 100644
index 00000000..1d029e00
--- /dev/null
+++ b/ksvg/dom/SVGFEPointLightElement.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEPointLightElement_H
+#define SVGFEPointLightElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumber;
+class SVGFEPointLightElementImpl;
+class SVGFEPointLightElement : public SVGElement
+{
+public:
+ SVGFEPointLightElement();
+ SVGFEPointLightElement(const SVGFEPointLightElement &other);
+ SVGFEPointLightElement &operator=(const SVGFEPointLightElement &other);
+ SVGFEPointLightElement(SVGFEPointLightElementImpl *other);
+ virtual ~SVGFEPointLightElement();
+
+ SVGAnimatedNumber x() const;
+ SVGAnimatedNumber y() const;
+ SVGAnimatedNumber z() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFEPointLightElementImpl *handle() const { return impl; }
+
+private:
+ SVGFEPointLightElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFESpecularLightingElement.cc b/ksvg/dom/SVGFESpecularLightingElement.cc
new file mode 100644
index 00000000..924e1ce7
--- /dev/null
+++ b/ksvg/dom/SVGFESpecularLightingElement.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFESpecularLightingElement.h"
+#include "SVGFESpecularLightingElementImpl.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFESpecularLightingElement::SVGFESpecularLightingElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFESpecularLightingElement::SVGFESpecularLightingElement(const SVGFESpecularLightingElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFESpecularLightingElement &SVGFESpecularLightingElement::operator =(const SVGFESpecularLightingElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFESpecularLightingElement::SVGFESpecularLightingElement(SVGFESpecularLightingElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFESpecularLightingElement::~SVGFESpecularLightingElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFESpecularLightingElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+SVGAnimatedNumber SVGFESpecularLightingElement::surfaceScale() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->surfaceScale());
+}
+
+SVGAnimatedNumber SVGFESpecularLightingElement::specularConstant() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->specularConstant());
+}
+
+SVGAnimatedNumber SVGFESpecularLightingElement::specularExponent() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->specularExponent());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFESpecularLightingElement.h b/ksvg/dom/SVGFESpecularLightingElement.h
new file mode 100644
index 00000000..3566006c
--- /dev/null
+++ b/ksvg/dom/SVGFESpecularLightingElement.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFESpecularLightingElement_H
+#define SVGFESpecularLightingElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGAnimatedNumber;
+class SVGFESpecularLightingElementImpl;
+class SVGFESpecularLightingElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFESpecularLightingElement();
+ SVGFESpecularLightingElement(const SVGFESpecularLightingElement &other);
+ SVGFESpecularLightingElement &operator=(const SVGFESpecularLightingElement &other);
+ SVGFESpecularLightingElement(SVGFESpecularLightingElementImpl *other);
+ virtual ~SVGFESpecularLightingElement();
+
+ SVGAnimatedString in1() const;
+ SVGAnimatedNumber surfaceScale() const;
+ SVGAnimatedNumber specularConstant() const;
+ SVGAnimatedNumber specularExponent() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFESpecularLightingElementImpl *handle() const { return impl; }
+
+private:
+ SVGFESpecularLightingElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFESpotLightElement.cc b/ksvg/dom/SVGFESpotLightElement.cc
new file mode 100644
index 00000000..57dd498f
--- /dev/null
+++ b/ksvg/dom/SVGFESpotLightElement.cc
@@ -0,0 +1,116 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFESpotLightElement.h"
+#include "SVGFESpotLightElementImpl.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGFESpotLightElement::SVGFESpotLightElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFESpotLightElement::SVGFESpotLightElement(const SVGFESpotLightElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFESpotLightElement &SVGFESpotLightElement::operator =(const SVGFESpotLightElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFESpotLightElement::SVGFESpotLightElement(SVGFESpotLightElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFESpotLightElement::~SVGFESpotLightElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::x() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->x());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::y() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->y());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::z() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->z());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::pointsAtX() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->pointsAtX());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::pointsAtY() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->pointsAtY());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::pointsAtZ() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->pointsAtZ());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::specularExponent() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->specularExponent());
+}
+
+SVGAnimatedNumber SVGFESpotLightElement::limitingConeAngle() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->limitingConeAngle());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFESpotLightElement.h b/ksvg/dom/SVGFESpotLightElement.h
new file mode 100644
index 00000000..735a6428
--- /dev/null
+++ b/ksvg/dom/SVGFESpotLightElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFESpotLightElement_H
+#define SVGFESpotLightElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumber;
+class SVGFESpotLightElementImpl;
+class SVGFESpotLightElement : public SVGElement
+{
+public:
+ SVGFESpotLightElement();
+ SVGFESpotLightElement(const SVGFESpotLightElement &other);
+ SVGFESpotLightElement &operator=(const SVGFESpotLightElement &other);
+ SVGFESpotLightElement(SVGFESpotLightElementImpl *other);
+ virtual ~SVGFESpotLightElement();
+
+ SVGAnimatedNumber x() const;
+ SVGAnimatedNumber y() const;
+ SVGAnimatedNumber z() const;
+ SVGAnimatedNumber pointsAtX() const;
+ SVGAnimatedNumber pointsAtY() const;
+ SVGAnimatedNumber pointsAtZ() const;
+ SVGAnimatedNumber specularExponent() const;
+ SVGAnimatedNumber limitingConeAngle() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFESpotLightElementImpl *handle() const { return impl; }
+
+private:
+ SVGFESpotLightElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFETileElement.cc b/ksvg/dom/SVGFETileElement.cc
new file mode 100644
index 00000000..01c7ffed
--- /dev/null
+++ b/ksvg/dom/SVGFETileElement.cc
@@ -0,0 +1,75 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFETileElement.h"
+#include "SVGFETileElementImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGFETileElement::SVGFETileElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFETileElement::SVGFETileElement(const SVGFETileElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFETileElement &SVGFETileElement::operator =(const SVGFETileElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFETileElement::SVGFETileElement(SVGFETileElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFETileElement::~SVGFETileElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedString SVGFETileElement::in1() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->in1());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFETileElement.h b/ksvg/dom/SVGFETileElement.h
new file mode 100644
index 00000000..cbf548b1
--- /dev/null
+++ b/ksvg/dom/SVGFETileElement.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFETileElement_H
+#define SVGFETileElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGFETileElementImpl;
+class SVGFETileElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFETileElement();
+ SVGFETileElement(const SVGFETileElement &other);
+ SVGFETileElement &operator=(const SVGFETileElement &other);
+ SVGFETileElement(SVGFETileElementImpl *other);
+ virtual ~SVGFETileElement();
+
+ SVGAnimatedString in1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFETileElementImpl *handle() const { return impl; }
+
+private:
+ SVGFETileElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFETurbulenceElement.cc b/ksvg/dom/SVGFETurbulenceElement.cc
new file mode 100644
index 00000000..7d846e6b
--- /dev/null
+++ b/ksvg/dom/SVGFETurbulenceElement.cc
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFETurbulenceElement.h"
+#include "SVGFETurbulenceElementImpl.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedInteger.h"
+
+using namespace KSVG;
+
+SVGFETurbulenceElement::SVGFETurbulenceElement() : SVGElement(), SVGFilterPrimitiveStandardAttributes()
+{
+ impl = 0;
+}
+
+SVGFETurbulenceElement::SVGFETurbulenceElement(const SVGFETurbulenceElement &other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFETurbulenceElement &SVGFETurbulenceElement::operator =(const SVGFETurbulenceElement &other)
+{
+ SVGElement::operator=(other);
+ SVGFilterPrimitiveStandardAttributes::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFETurbulenceElement::SVGFETurbulenceElement(SVGFETurbulenceElementImpl *other) : SVGElement(other), SVGFilterPrimitiveStandardAttributes(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFETurbulenceElement::~SVGFETurbulenceElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedNumber SVGFETurbulenceElement::baseFrequencyX() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->baseFrequencyX());
+}
+
+SVGAnimatedNumber SVGFETurbulenceElement::baseFrequencyY() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->baseFrequencyY());
+}
+
+SVGAnimatedInteger SVGFETurbulenceElement::numOctaves() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->numOctaves());
+}
+
+SVGAnimatedNumber SVGFETurbulenceElement::seed() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->seed());
+}
+
+SVGAnimatedEnumeration SVGFETurbulenceElement::stitchTiles() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->stitchTiles());
+}
+
+SVGAnimatedEnumeration SVGFETurbulenceElement::type() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->type());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFETurbulenceElement.h b/ksvg/dom/SVGFETurbulenceElement.h
new file mode 100644
index 00000000..39b6050d
--- /dev/null
+++ b/ksvg/dom/SVGFETurbulenceElement.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFETurbulenceElement_H
+#define SVGFETurbulenceElement_H
+
+#include "SVGElement.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace KSVG
+{
+enum
+{
+ SVG_TURBULENCE_TYPE_UNKNOWN = 0,
+ SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
+ SVG_TURBULENCE_TYPE_TURBULENCE = 2,
+ SVG_STITCHTYPE_UNKNOWN = 0,
+ SVG_STITCHTYPE_STITCH = 1,
+ SVG_STITCHTYPE_NOSTITCH = 2
+};
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedNumber;
+class SVGAnimatedInteger;
+class SVGFETurbulenceElementImpl;
+class SVGFETurbulenceElement : public SVGElement,
+ public SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFETurbulenceElement();
+ SVGFETurbulenceElement(const SVGFETurbulenceElement &other);
+ SVGFETurbulenceElement &operator=(const SVGFETurbulenceElement &other);
+ SVGFETurbulenceElement(SVGFETurbulenceElementImpl *other);
+ virtual ~SVGFETurbulenceElement();
+
+ SVGAnimatedNumber baseFrequencyX() const;
+ SVGAnimatedNumber baseFrequencyY() const;
+ SVGAnimatedInteger numOctaves() const;
+ SVGAnimatedNumber seed() const;
+ SVGAnimatedEnumeration stitchTiles() const;
+ SVGAnimatedEnumeration type() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFETurbulenceElementImpl *handle() const { return impl; }
+
+private:
+ SVGFETurbulenceElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFilterElement.cc b/ksvg/dom/SVGFilterElement.cc
new file mode 100644
index 00000000..3644a807
--- /dev/null
+++ b/ksvg/dom/SVGFilterElement.cc
@@ -0,0 +1,128 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFilterElement.h"
+#include "SVGFilterElementImpl.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedInteger.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGFilterElement::SVGFilterElement() : SVGElement(), SVGURIReference(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGUnitTypes()
+{
+ impl = 0;
+}
+
+SVGFilterElement::SVGFilterElement(const SVGFilterElement &other) : SVGElement(other), SVGURIReference(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes(), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFilterElement &SVGFilterElement::operator =(const SVGFilterElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFilterElement::SVGFilterElement(SVGFilterElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFilterElement::~SVGFilterElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedEnumeration SVGFilterElement::filterUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->filterUnits());
+}
+
+SVGAnimatedEnumeration SVGFilterElement::primitiveUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->primitiveUnits());
+}
+
+SVGAnimatedLength SVGFilterElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGFilterElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGFilterElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGFilterElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+SVGAnimatedInteger SVGFilterElement::filterResX() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->filterResX());
+}
+
+SVGAnimatedInteger SVGFilterElement::filterResY() const
+{
+ if(!impl) return SVGAnimatedInteger(0);
+ return SVGAnimatedInteger(impl->filterResY());
+}
+
+void SVGFilterElement::setFilterRes(unsigned long filterResX, unsigned long filterResY)
+{
+ if(impl)
+ impl->setFilterRes(filterResX, filterResY);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFilterElement.h b/ksvg/dom/SVGFilterElement.h
new file mode 100644
index 00000000..82f67e5c
--- /dev/null
+++ b/ksvg/dom/SVGFilterElement.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFilterElement_H
+#define SVGFilterElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGUnitTypes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedLength;
+class SVGAnimatedInteger;
+class SVGFilterElementImpl;
+class SVGFilterElement : public SVGElement,
+ public SVGURIReference,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGUnitTypes
+{
+public:
+ SVGFilterElement();
+ SVGFilterElement(const SVGFilterElement &other);
+ SVGFilterElement &operator=(const SVGFilterElement &other);
+ SVGFilterElement(SVGFilterElementImpl *other);
+ virtual ~SVGFilterElement();
+
+ SVGAnimatedEnumeration filterUnits() const;
+ SVGAnimatedEnumeration primitiveUnits() const;
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+ SVGAnimatedLength width() const;
+ SVGAnimatedLength height() const;
+ SVGAnimatedInteger filterResX() const;
+ SVGAnimatedInteger filterResY() const;
+
+ void setFilterRes(unsigned long filterResX, unsigned long filterResY);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFilterElementImpl *handle() const { return impl; }
+
+private:
+ SVGFilterElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFilterPrimitiveStandardAttributes.cc b/ksvg/dom/SVGFilterPrimitiveStandardAttributes.cc
new file mode 100644
index 00000000..05b2ef2a
--- /dev/null
+++ b/ksvg/dom/SVGFilterPrimitiveStandardAttributes.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFilterPrimitiveStandardAttributes.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes()
+{
+ impl = new SVGFilterPrimitiveStandardAttributesImpl();
+}
+
+SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes &other)
+{
+ impl = other.impl;
+}
+
+SVGFilterPrimitiveStandardAttributes &SVGFilterPrimitiveStandardAttributes::operator=(const SVGFilterPrimitiveStandardAttributes &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(SVGFilterPrimitiveStandardAttributesImpl *other)
+{
+ impl = other;
+}
+
+SVGFilterPrimitiveStandardAttributes::~SVGFilterPrimitiveStandardAttributes()
+{
+}
+
+SVGAnimatedLength SVGFilterPrimitiveStandardAttributes::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGFilterPrimitiveStandardAttributes::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGFilterPrimitiveStandardAttributes::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGFilterPrimitiveStandardAttributes::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+SVGAnimatedString SVGFilterPrimitiveStandardAttributes::result() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->result());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFilterPrimitiveStandardAttributes.h b/ksvg/dom/SVGFilterPrimitiveStandardAttributes.h
new file mode 100644
index 00000000..9d2c9894
--- /dev/null
+++ b/ksvg/dom/SVGFilterPrimitiveStandardAttributes.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFilterPrimitiveStandardAttributes_H
+#define SVGFilterPrimitiveStandardAttributes_H
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGAnimatedString;
+class SVGFilterPrimitiveStandardAttributesImpl;
+class SVGFilterPrimitiveStandardAttributes
+{
+public:
+ SVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes &other);
+ SVGFilterPrimitiveStandardAttributes &operator=(const SVGFilterPrimitiveStandardAttributes &other);
+ SVGFilterPrimitiveStandardAttributes(SVGFilterPrimitiveStandardAttributesImpl *other);
+ virtual ~SVGFilterPrimitiveStandardAttributes();
+
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+ SVGAnimatedLength width() const;
+ SVGAnimatedLength height() const;
+ SVGAnimatedString result() const;
+
+protected:
+ SVGFilterPrimitiveStandardAttributes();
+
+private:
+ SVGFilterPrimitiveStandardAttributesImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFitToViewBox.cc b/ksvg/dom/SVGFitToViewBox.cc
new file mode 100644
index 00000000..e0d576f0
--- /dev/null
+++ b/ksvg/dom/SVGFitToViewBox.cc
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFitToViewBox.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGAnimatedRect.h"
+#include "SVGAnimatedPreserveAspectRatio.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGFitToViewBox::SVGFitToViewBox()
+{
+ impl = 0;
+}
+
+SVGFitToViewBox::SVGFitToViewBox(const SVGFitToViewBox &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGFitToViewBox &SVGFitToViewBox::operator=(const SVGFitToViewBox &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGFitToViewBox::SVGFitToViewBox(SVGFitToViewBoxImpl *other)
+{
+ impl = other;
+}
+
+SVGFitToViewBox::~SVGFitToViewBox()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+SVGAnimatedRect SVGFitToViewBox::viewBox() const
+{
+ if(!impl) return SVGAnimatedRect(0);
+ return SVGAnimatedRect(impl->viewBox());
+}
+
+SVGAnimatedPreserveAspectRatio SVGFitToViewBox::preserveAspectRatio() const
+{
+ if(!impl) return SVGAnimatedPreserveAspectRatio(0);
+ return SVGAnimatedPreserveAspectRatio(impl->preserveAspectRatio());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFitToViewBox.h b/ksvg/dom/SVGFitToViewBox.h
new file mode 100644
index 00000000..50778657
--- /dev/null
+++ b/ksvg/dom/SVGFitToViewBox.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFitToViewBox_H
+#define SVGFitToViewBox_H
+
+namespace KSVG
+{
+
+class SVGAnimatedRect;
+class SVGAnimatedPreserveAspectRatio;
+class SVGFitToViewBoxImpl;
+class SVGFitToViewBox
+{
+public:
+ SVGFitToViewBox(const SVGFitToViewBox &other);
+ SVGFitToViewBox &operator=(const SVGFitToViewBox &other);
+ SVGFitToViewBox(SVGFitToViewBoxImpl *other);
+ ~SVGFitToViewBox();
+
+ SVGAnimatedRect viewBox() const;
+ SVGAnimatedPreserveAspectRatio preserveAspectRatio() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFitToViewBoxImpl *handle() const { return impl; }
+
+protected:
+ SVGFitToViewBox();
+
+private:
+ SVGFitToViewBoxImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontElement.cc b/ksvg/dom/SVGFontElement.cc
new file mode 100644
index 00000000..5fae52ee
--- /dev/null
+++ b/ksvg/dom/SVGFontElement.cc
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontElement.h"
+#include "SVGFontElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontElement::SVGFontElement() : SVGElement(), SVGExternalResourcesRequired(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGFontElement::SVGFontElement(const SVGFontElement &other) : SVGElement(other), SVGExternalResourcesRequired(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontElement &SVGFontElement::operator =(const SVGFontElement &other)
+{
+ SVGElement::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontElement::SVGFontElement(SVGFontElementImpl *other) : SVGElement(other), SVGExternalResourcesRequired(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontElement::~SVGFontElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontElement.h b/ksvg/dom/SVGFontElement.h
new file mode 100644
index 00000000..9ecc36bf
--- /dev/null
+++ b/ksvg/dom/SVGFontElement.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontElement_H
+#define SVGFontElement_H
+
+#include "SVGElement.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGFontElementImpl;
+class SVGFontElement : public SVGElement,
+ public SVGExternalResourcesRequired,
+ public SVGStylable
+{
+public:
+ SVGFontElement();
+ SVGFontElement(const SVGFontElement &other);
+ SVGFontElement &operator=(const SVGFontElement &other);
+ SVGFontElement(SVGFontElementImpl *other);
+ virtual ~SVGFontElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceElement.cc b/ksvg/dom/SVGFontFaceElement.cc
new file mode 100644
index 00000000..6d542a04
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceElement.h"
+#include "SVGFontFaceElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceElement::SVGFontFaceElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFontFaceElement::SVGFontFaceElement(const SVGFontFaceElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontFaceElement &SVGFontFaceElement::operator =(const SVGFontFaceElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontFaceElement::SVGFontFaceElement(SVGFontFaceElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontFaceElement::~SVGFontFaceElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceElement.h b/ksvg/dom/SVGFontFaceElement.h
new file mode 100644
index 00000000..f16d0eb2
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceElement_H
+#define SVGFontFaceElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceElementImpl;
+class SVGFontFaceElement : public SVGElement
+{
+public:
+ SVGFontFaceElement();
+ SVGFontFaceElement(const SVGFontFaceElement &other);
+ SVGFontFaceElement &operator=(const SVGFontFaceElement &other);
+ SVGFontFaceElement(SVGFontFaceElementImpl *other);
+ virtual ~SVGFontFaceElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontFaceElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontFaceElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceFormatElement.cc b/ksvg/dom/SVGFontFaceFormatElement.cc
new file mode 100644
index 00000000..a64c5fa8
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceFormatElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceFormatElement.h"
+#include "SVGFontFaceFormatElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceFormatElement::SVGFontFaceFormatElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFontFaceFormatElement::SVGFontFaceFormatElement(const SVGFontFaceFormatElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontFaceFormatElement &SVGFontFaceFormatElement::operator =(const SVGFontFaceFormatElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontFaceFormatElement::SVGFontFaceFormatElement(SVGFontFaceFormatElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontFaceFormatElement::~SVGFontFaceFormatElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceFormatElement.h b/ksvg/dom/SVGFontFaceFormatElement.h
new file mode 100644
index 00000000..577cae35
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceFormatElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceFormatElement_H
+#define SVGFontFaceFormatElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceFormatElementImpl;
+class SVGFontFaceFormatElement : public SVGElement
+{
+public:
+ SVGFontFaceFormatElement();
+ SVGFontFaceFormatElement(const SVGFontFaceFormatElement &other);
+ SVGFontFaceFormatElement &operator=(const SVGFontFaceFormatElement &other);
+ SVGFontFaceFormatElement(SVGFontFaceFormatElementImpl *other);
+ virtual ~SVGFontFaceFormatElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontFaceFormatElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontFaceFormatElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceNameElement.cc b/ksvg/dom/SVGFontFaceNameElement.cc
new file mode 100644
index 00000000..e5160869
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceNameElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceNameElement.h"
+#include "SVGFontFaceNameElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceNameElement::SVGFontFaceNameElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFontFaceNameElement::SVGFontFaceNameElement(const SVGFontFaceNameElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontFaceNameElement &SVGFontFaceNameElement::operator =(const SVGFontFaceNameElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontFaceNameElement::SVGFontFaceNameElement(SVGFontFaceNameElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontFaceNameElement::~SVGFontFaceNameElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceNameElement.h b/ksvg/dom/SVGFontFaceNameElement.h
new file mode 100644
index 00000000..b246e61d
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceNameElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceNameElement_H
+#define SVGFontFaceNameElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceNameElementImpl;
+class SVGFontFaceNameElement : public SVGElement
+{
+public:
+ SVGFontFaceNameElement();
+ SVGFontFaceNameElement(const SVGFontFaceNameElement &other);
+ SVGFontFaceNameElement &operator=(const SVGFontFaceNameElement &other);
+ SVGFontFaceNameElement(SVGFontFaceNameElementImpl *other);
+ virtual ~SVGFontFaceNameElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontFaceNameElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontFaceNameElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceSrcElement.cc b/ksvg/dom/SVGFontFaceSrcElement.cc
new file mode 100644
index 00000000..8ecbbffa
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceSrcElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceSrcElement.h"
+#include "SVGFontFaceSrcElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceSrcElement::SVGFontFaceSrcElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFontFaceSrcElement::SVGFontFaceSrcElement(const SVGFontFaceSrcElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontFaceSrcElement &SVGFontFaceSrcElement::operator =(const SVGFontFaceSrcElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontFaceSrcElement::SVGFontFaceSrcElement(SVGFontFaceSrcElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontFaceSrcElement::~SVGFontFaceSrcElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceSrcElement.h b/ksvg/dom/SVGFontFaceSrcElement.h
new file mode 100644
index 00000000..585971e0
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceSrcElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceSrcElement_H
+#define SVGFontFaceSrcElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceSrcElementImpl;
+class SVGFontFaceSrcElement : public SVGElement
+{
+public:
+ SVGFontFaceSrcElement();
+ SVGFontFaceSrcElement(const SVGFontFaceSrcElement &other);
+ SVGFontFaceSrcElement &operator=(const SVGFontFaceSrcElement &other);
+ SVGFontFaceSrcElement(SVGFontFaceSrcElementImpl *other);
+ virtual ~SVGFontFaceSrcElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontFaceSrcElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontFaceSrcElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceUriElement.cc b/ksvg/dom/SVGFontFaceUriElement.cc
new file mode 100644
index 00000000..aafb392b
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceUriElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceUriElement.h"
+#include "SVGFontFaceUriElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceUriElement::SVGFontFaceUriElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGFontFaceUriElement::SVGFontFaceUriElement(const SVGFontFaceUriElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGFontFaceUriElement &SVGFontFaceUriElement::operator =(const SVGFontFaceUriElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGFontFaceUriElement::SVGFontFaceUriElement(SVGFontFaceUriElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGFontFaceUriElement::~SVGFontFaceUriElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGFontFaceUriElement.h b/ksvg/dom/SVGFontFaceUriElement.h
new file mode 100644
index 00000000..c2dd6514
--- /dev/null
+++ b/ksvg/dom/SVGFontFaceUriElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceUriElement_H
+#define SVGFontFaceUriElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceUriElementImpl;
+class SVGFontFaceUriElement : public SVGElement
+{
+public:
+ SVGFontFaceUriElement();
+ SVGFontFaceUriElement(const SVGFontFaceUriElement &other);
+ SVGFontFaceUriElement &operator=(const SVGFontFaceUriElement &other);
+ SVGFontFaceUriElement(SVGFontFaceUriElementImpl *other);
+ virtual ~SVGFontFaceUriElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGFontFaceUriElementImpl *handle() const { return impl; }
+
+private:
+ SVGFontFaceUriElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGForeignObjectElement.cc b/ksvg/dom/SVGForeignObjectElement.cc
new file mode 100644
index 00000000..e12a194a
--- /dev/null
+++ b/ksvg/dom/SVGForeignObjectElement.cc
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGForeignObjectElement.h"
+#include "SVGForeignObjectElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGForeignObjectElement::SVGForeignObjectElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGForeignObjectElement::SVGForeignObjectElement(const SVGForeignObjectElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ (*this) = other;
+}
+
+SVGForeignObjectElement &SVGForeignObjectElement::operator =(const SVGForeignObjectElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGForeignObjectElement::SVGForeignObjectElement(SVGForeignObjectElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGForeignObjectElement::~SVGForeignObjectElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGForeignObjectElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGForeignObjectElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGForeignObjectElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGForeignObjectElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGForeignObjectElement.h b/ksvg/dom/SVGForeignObjectElement.h
new file mode 100644
index 00000000..0d35019f
--- /dev/null
+++ b/ksvg/dom/SVGForeignObjectElement.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGForeignObjectElement_H
+#define SVGForeignObjectElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGForeignObjectElementImpl;
+class SVGForeignObjectElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGForeignObjectElement();
+ SVGForeignObjectElement(const SVGForeignObjectElement &other);
+ SVGForeignObjectElement &operator=(const SVGForeignObjectElement &other);
+ SVGForeignObjectElement(SVGForeignObjectElementImpl *other);
+ virtual ~SVGForeignObjectElement();
+
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+ SVGAnimatedLength width() const;
+ SVGAnimatedLength height() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGForeignObjectElementImpl *handle() const { return impl; }
+
+private:
+ SVGForeignObjectElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGElement.cc b/ksvg/dom/SVGGElement.cc
new file mode 100644
index 00000000..272c7608
--- /dev/null
+++ b/ksvg/dom/SVGGElement.cc
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGElement.h"
+#include "SVGGElementImpl.h"
+
+using namespace KSVG;
+
+SVGGElement::SVGGElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGGElement::SVGGElement(const SVGGElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGGElement &SVGGElement::operator =(const SVGGElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGGElement::SVGGElement(SVGGElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGGElement::~SVGGElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGElement.h b/ksvg/dom/SVGGElement.h
new file mode 100644
index 00000000..724bbadb
--- /dev/null
+++ b/ksvg/dom/SVGGElement.h
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGGElement_H
+#define SVGGElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGGElementImpl;
+
+/**
+ * The 'g' element is a container element for grouping together related graphics elements.
+ *
+ * Grouping constructs, when used in conjunction with the @ref desc and @ref title elements, provide
+ * information about document structure and semantics. Documents that are rich in structure may be
+ * rendered graphically, as speech, or as braille, and thus promote accessibility.
+ *
+ * A group of elements, as well as individual objects, can be given a name using the <code> id </code> attribute.
+ * Named groups are needed for several purposes such as animation and re-usable objects.
+ *
+ * A 'g' element can contain other 'g' elements nested within it, to an arbitrary depth.
+ */
+class SVGGElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGGElement();
+ SVGGElement(const SVGGElement &other);
+ SVGGElement &operator=(const SVGGElement &other);
+ SVGGElement(SVGGElementImpl *other);
+ ~SVGGElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGGElementImpl *handle() const { return impl; }
+
+private:
+ SVGGElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGlyphElement.cc b/ksvg/dom/SVGGlyphElement.cc
new file mode 100644
index 00000000..c852d44d
--- /dev/null
+++ b/ksvg/dom/SVGGlyphElement.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGlyphElement.h"
+#include "SVGGlyphElementImpl.h"
+
+using namespace KSVG;
+
+SVGGlyphElement::SVGGlyphElement() : SVGElement(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGGlyphElement::SVGGlyphElement(const SVGGlyphElement &other) : SVGElement(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGGlyphElement &SVGGlyphElement::operator =(const SVGGlyphElement &other)
+{
+ SVGElement::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGGlyphElement::SVGGlyphElement(SVGGlyphElementImpl *other) : SVGElement(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGGlyphElement::~SVGGlyphElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGlyphElement.h b/ksvg/dom/SVGGlyphElement.h
new file mode 100644
index 00000000..c3d2237b
--- /dev/null
+++ b/ksvg/dom/SVGGlyphElement.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGlyphElement_H
+#define SVGGlyphElement_H
+
+#include "SVGElement.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGGlyphElementImpl;
+class SVGGlyphElement : public SVGElement,
+ public SVGStylable
+{
+public:
+ SVGGlyphElement();
+ SVGGlyphElement(const SVGGlyphElement &other);
+ SVGGlyphElement &operator=(const SVGGlyphElement &other);
+ SVGGlyphElement(SVGGlyphElementImpl *other);
+ virtual ~SVGGlyphElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGGlyphElementImpl *handle() const { return impl; }
+
+private:
+ SVGGlyphElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGlyphRefElement.cc b/ksvg/dom/SVGGlyphRefElement.cc
new file mode 100644
index 00000000..85c4c39f
--- /dev/null
+++ b/ksvg/dom/SVGGlyphRefElement.cc
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGlyphRefElement.h"
+#include "SVGGlyphRefElementImpl.h"
+
+using namespace KSVG;
+
+SVGGlyphRefElement::SVGGlyphRefElement() : SVGElement(), SVGURIReference(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGGlyphRefElement::SVGGlyphRefElement(const SVGGlyphRefElement &other) : SVGElement(other), SVGURIReference(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGGlyphRefElement &SVGGlyphRefElement::operator =(const SVGGlyphRefElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGGlyphRefElement::SVGGlyphRefElement(SVGGlyphRefElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGGlyphRefElement::~SVGGlyphRefElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+DOM::DOMString SVGGlyphRefElement::format()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->format();
+}
+
+DOM::DOMString SVGGlyphRefElement::glyphRef()
+{
+ if(!impl) return DOM::DOMString();
+ return impl->glyphRef();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGlyphRefElement.h b/ksvg/dom/SVGGlyphRefElement.h
new file mode 100644
index 00000000..29e91e57
--- /dev/null
+++ b/ksvg/dom/SVGGlyphRefElement.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGlyphRefElement_H
+#define SVGGlyphRefElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGGlyphRefElementImpl;
+class SVGGlyphRefElement : public SVGElement,
+ public SVGURIReference,
+ public SVGStylable
+{
+public:
+ SVGGlyphRefElement();
+ SVGGlyphRefElement(const SVGGlyphRefElement &other);
+ SVGGlyphRefElement &operator=(const SVGGlyphRefElement &other);
+ SVGGlyphRefElement(SVGGlyphRefElementImpl *other);
+ virtual ~SVGGlyphRefElement();
+
+ DOM::DOMString glyphRef();
+ DOM::DOMString format();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGGlyphRefElementImpl *handle() const { return impl; }
+
+private:
+ SVGGlyphRefElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGradientElement.cc b/ksvg/dom/SVGGradientElement.cc
new file mode 100644
index 00000000..2afb305e
--- /dev/null
+++ b/ksvg/dom/SVGGradientElement.cc
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGradientElement.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGAnimatedTransformList.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGGradientElement::SVGGradientElement() : SVGElement(), SVGURIReference(), SVGExternalResourcesRequired(), SVGStylable(), SVGUnitTypes()
+{
+ impl = 0;
+}
+
+SVGGradientElement::SVGGradientElement(const SVGGradientElement &other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGGradientElement &SVGGradientElement::operator =(const SVGGradientElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGGradientElement::SVGGradientElement(SVGGradientElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes()
+{
+ impl = other;
+}
+
+SVGGradientElement::~SVGGradientElement()
+{
+}
+
+SVGAnimatedEnumeration SVGGradientElement::gradientUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->gradientUnits());
+}
+
+SVGAnimatedTransformList SVGGradientElement::gradientTransform() const
+{
+ if(!impl) return SVGAnimatedTransformList(0);
+ return SVGAnimatedTransformList(impl->gradientTransform());
+}
+
+SVGAnimatedEnumeration SVGGradientElement::spreadMethod() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->spreadMethod());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGGradientElement.h b/ksvg/dom/SVGGradientElement.h
new file mode 100644
index 00000000..cff47ad8
--- /dev/null
+++ b/ksvg/dom/SVGGradientElement.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGradientElement_H
+#define SVGGradientElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGUnitTypes.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_SPREADMETHOD_UNKNOWN = 0,
+ SVG_SPREADMETHOD_PAD = 1,
+ SVG_SPREADMETHOD_REFLECT = 2,
+ SVG_SPREADMETHOD_REPEAT = 3
+};
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedTransformList;
+class SVGGradientElementImpl;
+class SVGGradientElement : public SVGElement,
+ public SVGURIReference,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGUnitTypes
+{
+public:
+ SVGGradientElement(const SVGGradientElement &other);
+ SVGGradientElement &operator=(const SVGGradientElement &other);
+ SVGGradientElement(SVGGradientElementImpl *other);
+ virtual ~SVGGradientElement();
+
+ SVGAnimatedEnumeration gradientUnits() const;
+ SVGAnimatedTransformList gradientTransform() const;
+ SVGAnimatedEnumeration spreadMethod() const;
+
+protected:
+ SVGGradientElement();
+
+private:
+ SVGGradientElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGHKernElement.cc b/ksvg/dom/SVGHKernElement.cc
new file mode 100644
index 00000000..db46aa63
--- /dev/null
+++ b/ksvg/dom/SVGHKernElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGHKernElement.h"
+#include "SVGHKernElementImpl.h"
+
+using namespace KSVG;
+
+SVGHKernElement::SVGHKernElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGHKernElement::SVGHKernElement(const SVGHKernElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGHKernElement &SVGHKernElement::operator =(const SVGHKernElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGHKernElement::SVGHKernElement(SVGHKernElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGHKernElement::~SVGHKernElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGHKernElement.h b/ksvg/dom/SVGHKernElement.h
new file mode 100644
index 00000000..42890727
--- /dev/null
+++ b/ksvg/dom/SVGHKernElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGHKernElement_H
+#define SVGHKernElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGHKernElementImpl;
+class SVGHKernElement : public SVGElement
+{
+public:
+ SVGHKernElement();
+ SVGHKernElement(const SVGHKernElement &other);
+ SVGHKernElement &operator=(const SVGHKernElement &other);
+ SVGHKernElement(SVGHKernElementImpl *other);
+ virtual ~SVGHKernElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGHKernElementImpl *handle() const { return impl; }
+
+private:
+ SVGHKernElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGICCColor.cc b/ksvg/dom/SVGICCColor.cc
new file mode 100644
index 00000000..6b21f3fb
--- /dev/null
+++ b/ksvg/dom/SVGICCColor.cc
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGICCColor.h"
+#include "SVGICCColorImpl.h"
+#include "SVGNumberList.h"
+
+using namespace KSVG;
+
+SVGICCColor::SVGICCColor()
+{
+ impl = new SVGICCColorImpl();
+ impl->ref();
+}
+
+SVGICCColor::SVGICCColor(const SVGICCColor &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGICCColor &SVGICCColor::operator =(const SVGICCColor &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGICCColor::SVGICCColor(SVGICCColorImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGICCColor::~SVGICCColor()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGICCColor::setColorProfile(const DOM::DOMString &colorProfile)
+{
+ if(impl)
+ impl->setColorProfile(colorProfile);
+}
+
+DOM::DOMString SVGICCColor::colorProfile() const
+{
+ if(!impl) return DOM::DOMString();
+ return DOM::DOMString(impl->colorProfile());
+}
+
+SVGNumberList SVGICCColor::colors() const
+{
+ if(!impl) return SVGNumberList(0);
+ return SVGNumberList(impl->colors());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGICCColor.h b/ksvg/dom/SVGICCColor.h
new file mode 100644
index 00000000..628feda9
--- /dev/null
+++ b/ksvg/dom/SVGICCColor.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGICCColor_H
+#define SVGICCColor_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGNumberList;
+class SVGICCColorImpl;
+class SVGICCColor
+{
+public:
+ SVGICCColor();
+ SVGICCColor(const SVGICCColor &other);
+ SVGICCColor &operator=(const SVGICCColor &other);
+ SVGICCColor(SVGICCColorImpl *other);
+ ~SVGICCColor();
+
+ void setColorProfile(const DOM::DOMString &colorProfile);
+ DOM::DOMString colorProfile() const;
+
+ SVGNumberList colors() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGICCColorImpl *handle() const { return impl; }
+
+private:
+ SVGICCColorImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGImageElement.cc b/ksvg/dom/SVGImageElement.cc
new file mode 100644
index 00000000..9d9374fa
--- /dev/null
+++ b/ksvg/dom/SVGImageElement.cc
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGImageElement.h"
+#include "SVGImageElementImpl.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedPreserveAspectRatio.h"
+
+using namespace KSVG;
+
+SVGImageElement::SVGImageElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGImageElement::SVGImageElement(const SVGImageElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGImageElement &SVGImageElement::operator=(const SVGImageElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGImageElement::SVGImageElement(SVGImageElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGImageElement::~SVGImageElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGImageElement::x()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGImageElement::y()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGImageElement::width()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGImageElement::height()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+SVGAnimatedPreserveAspectRatio SVGImageElement::preserveAspectRatio() const
+{
+ if(!impl) return SVGAnimatedPreserveAspectRatio(0);
+ return SVGAnimatedPreserveAspectRatio(impl->preserveAspectRatio());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGImageElement.h b/ksvg/dom/SVGImageElement.h
new file mode 100644
index 00000000..c6487fed
--- /dev/null
+++ b/ksvg/dom/SVGImageElement.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGImageElement_H
+#define SVGImageElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedPreserveAspectRatio;
+class SVGAnimatedLength;
+class SVGImageElementImpl;
+class SVGImageElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGURIReference
+{
+public:
+ SVGImageElement();
+ SVGImageElement(const SVGImageElement &);
+ SVGImageElement &operator=(const SVGImageElement &other);
+ SVGImageElement(SVGImageElementImpl *);
+ ~SVGImageElement();
+
+ SVGAnimatedLength x();
+ SVGAnimatedLength y();
+ SVGAnimatedLength width();
+ SVGAnimatedLength height();
+ SVGAnimatedPreserveAspectRatio preserveAspectRatio() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGImageElementImpl *handle() const { return impl; }
+
+private:
+ SVGImageElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLangSpace.cc b/ksvg/dom/SVGLangSpace.cc
new file mode 100644
index 00000000..2373e648
--- /dev/null
+++ b/ksvg/dom/SVGLangSpace.cc
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGLangSpace.h"
+#include "SVGLangSpaceImpl.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGLangSpace::SVGLangSpace()
+{
+ impl = 0;
+}
+
+SVGLangSpace::SVGLangSpace(const SVGLangSpace &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGLangSpace &SVGLangSpace::operator=(const SVGLangSpace &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGLangSpace::SVGLangSpace(SVGLangSpaceImpl *other)
+{
+ impl = other;
+}
+
+SVGLangSpace::~SVGLangSpace()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+void SVGLangSpace::setXmllang(const DOM::DOMString &xmllang)
+{
+ if(impl)
+ impl->setXmllang(xmllang);
+}
+
+DOM::DOMString SVGLangSpace::xmllang() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->xmllang();
+}
+
+void SVGLangSpace::setXmlspace(const DOM::DOMString &xmlspace)
+{
+ if(impl)
+ impl->setXmlspace(xmlspace);
+}
+
+DOM::DOMString SVGLangSpace::xmlspace() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->xmlspace();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLangSpace.h b/ksvg/dom/SVGLangSpace.h
new file mode 100644
index 00000000..391e625d
--- /dev/null
+++ b/ksvg/dom/SVGLangSpace.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLangSpace_H
+#define SVGLangSpace_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGLangSpaceImpl;
+class SVGLangSpace
+{
+public:
+ SVGLangSpace(const SVGLangSpace &other);
+ SVGLangSpace &operator=(const SVGLangSpace &other);
+ SVGLangSpace(SVGLangSpaceImpl *other);
+ ~SVGLangSpace();
+
+ void setXmllang(const DOM::DOMString &xmllang);
+ DOM::DOMString xmllang() const;
+
+ void setXmlspace(const DOM::DOMString &xmlspace);
+ DOM::DOMString xmlspace() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLangSpaceImpl *handle() const { return impl; }
+
+protected:
+ SVGLangSpace();
+
+private:
+ SVGLangSpaceImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLength.cc b/ksvg/dom/SVGLength.cc
new file mode 100644
index 00000000..bb2db73f
--- /dev/null
+++ b/ksvg/dom/SVGLength.cc
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <dom/dom_string.h>
+#include "SVGLength.h"
+#include "SVGShapeImpl.h"
+#include "SVGLengthImpl.h"
+
+using namespace KSVG;
+
+SVGLength::SVGLength()
+{
+ impl = new SVGLengthImpl();
+ impl->ref();
+}
+
+SVGLength::SVGLength(const SVGLength &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGLength &SVGLength::operator =(const SVGLength &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGLength::SVGLength(SVGLengthImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGLength::~SVGLength()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned short SVGLength::unitType() const
+{
+ if(!impl) return SVG_LENGTHTYPE_UNKNOWN;
+ return impl->unitType();
+}
+
+void SVGLength::setValue(float value)
+{
+ if(impl)
+ {
+ impl->setValue(value);
+
+ // Automatic updating of the shape if any value is changed, imagine:
+ // SVGCircleElement c; [...] c.r().baseVal().setValue(150);
+ if(impl->context() && dynamic_cast<SVGShapeImpl *>(impl->context()))
+ dynamic_cast<SVGShapeImpl *>(impl->context())->update(UPDATE_TRANSFORM, 0, 0);
+ }
+}
+
+float SVGLength::value() const
+{
+ if(!impl) return -1;
+ return impl->value();
+}
+
+void SVGLength::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
+{
+ if(impl)
+ impl->setValueInSpecifiedUnits(valueInSpecifiedUnits);
+}
+
+float SVGLength::valueInSpecifiedUnits() const
+{
+ if(!impl) return -1;
+ return impl->valueInSpecifiedUnits();
+}
+
+void SVGLength::setValueAsString(const DOM::DOMString &valueAsString)
+{
+ if(impl)
+ impl->setValueAsString(valueAsString);
+}
+
+DOM::DOMString SVGLength::valueAsString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->valueAsString();
+}
+
+void SVGLength::newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits)
+{
+ if(impl)
+ impl->newValueSpecifiedUnits(unitType, valueInSpecifiedUnits);
+}
+
+void SVGLength::convertToSpecifiedUnits(unsigned short unitType)
+{
+ if(impl)
+ impl->convertToSpecifiedUnits(unitType);
+}
+
+SVGLength::operator float()
+{
+ if(!impl) return -1;
+ return impl->valueInSpecifiedUnits();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLength.h b/ksvg/dom/SVGLength.h
new file mode 100644
index 00000000..1f0bbdae
--- /dev/null
+++ b/ksvg/dom/SVGLength.h
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLength_H
+#define SVGLength_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_LENGTHTYPE_UNKNOWN,
+ SVG_LENGTHTYPE_NUMBER,
+ SVG_LENGTHTYPE_PERCENTAGE,
+ SVG_LENGTHTYPE_EMS,
+ SVG_LENGTHTYPE_EXS,
+ SVG_LENGTHTYPE_PX,
+ SVG_LENGTHTYPE_CM,
+ SVG_LENGTHTYPE_MM,
+ SVG_LENGTHTYPE_IN,
+ SVG_LENGTHTYPE_PT,
+ SVG_LENGTHTYPE_PC
+};
+
+class SVGLengthImpl;
+class SVGLength
+{
+public:
+ SVGLength();
+ SVGLength(const SVGLength &);
+ SVGLength(SVGLengthImpl *);
+ SVGLength &operator=(const SVGLength &);
+ ~SVGLength();
+
+ unsigned short unitType() const;
+
+ void setValue(float value);
+ float value() const;
+
+ void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
+ float valueInSpecifiedUnits() const;
+
+ void setValueAsString(const DOM::DOMString &);
+ DOM::DOMString valueAsString() const;
+
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ void convertToSpecifiedUnits(unsigned short unitType);
+
+ operator float();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLengthImpl *handle() const { return impl; }
+
+private:
+ SVGLengthImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLengthList.cc b/ksvg/dom/SVGLengthList.cc
new file mode 100644
index 00000000..c308019b
--- /dev/null
+++ b/ksvg/dom/SVGLengthList.cc
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGLengthList.h"
+#include "SVGLengthListImpl.h"
+#include "SVGLength.h"
+
+using namespace KSVG;
+
+SVGLengthList::SVGLengthList()
+{
+ impl = new SVGLengthListImpl();
+ impl->ref();
+}
+
+SVGLengthList::SVGLengthList(const SVGLengthList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGLengthList &SVGLengthList::operator=(const SVGLengthList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGLengthList::SVGLengthList(SVGLengthListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGLengthList::~SVGLengthList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGLengthList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGLengthList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+SVGLength *SVGLengthList::initialize(SVGLength *newItem)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->initialize(newItem->handle()));
+}
+
+SVGLength *SVGLengthList::getItem(unsigned long index)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->getItem(index));
+}
+
+SVGLength *SVGLengthList::insertItemBefore(SVGLength *newItem, unsigned long index)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->insertItemBefore(newItem->handle(), index));
+}
+
+SVGLength *SVGLengthList::replaceItem(SVGLength *newItem, unsigned long index)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->replaceItem(newItem->handle(), index));
+}
+
+SVGLength *SVGLengthList::removeItem(unsigned long index)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->removeItem(index));
+}
+
+SVGLength *SVGLengthList::appendItem(SVGLength *newItem)
+{
+ if(!impl) return new SVGLength(0);
+ return new SVGLength(impl->appendItem(newItem->handle()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLengthList.h b/ksvg/dom/SVGLengthList.h
new file mode 100644
index 00000000..bf4ab633
--- /dev/null
+++ b/ksvg/dom/SVGLengthList.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLengthList_H
+#define SVGLengthList_H
+
+namespace KSVG
+{
+
+class SVGLength;
+class SVGLengthListImpl;
+class SVGLengthList
+{
+public:
+ SVGLengthList();
+ SVGLengthList(const SVGLengthList &);
+ SVGLengthList &operator=(const SVGLengthList &);
+ SVGLengthList(SVGLengthListImpl *);
+ ~SVGLengthList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+
+ SVGLength *initialize(SVGLength *newItem);
+ SVGLength *getItem(unsigned long index);
+ SVGLength *insertItemBefore(SVGLength *newItem, unsigned long index);
+ SVGLength *replaceItem(SVGLength *newItem, unsigned long index);
+ SVGLength *removeItem(unsigned long index);
+ SVGLength *appendItem(SVGLength *newItem);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLengthListImpl *handle() const { return impl; }
+
+private:
+ SVGLengthListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLineElement.cc b/ksvg/dom/SVGLineElement.cc
new file mode 100644
index 00000000..583c3fe3
--- /dev/null
+++ b/ksvg/dom/SVGLineElement.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGLineElement.h"
+#include "SVGLineElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGLineElement::SVGLineElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGLineElement::SVGLineElement(const SVGLineElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGLineElement &SVGLineElement::operator=(const SVGLineElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGLineElement::SVGLineElement(SVGLineElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGLineElement::~SVGLineElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGLineElement::x1()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x1());
+}
+
+SVGAnimatedLength SVGLineElement::y1()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y1());
+}
+
+SVGAnimatedLength SVGLineElement::x2()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x2());
+}
+
+SVGAnimatedLength SVGLineElement::y2()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y2());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLineElement.h b/ksvg/dom/SVGLineElement.h
new file mode 100644
index 00000000..b08a78ba
--- /dev/null
+++ b/ksvg/dom/SVGLineElement.h
@@ -0,0 +1,126 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGLineElement_H
+#define SVGLineElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGLineElementImpl;
+
+/**
+ * The <code>line</code> element defines a line segment that starts at
+ * one point and ends at another.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.5 The
+ * 'line' element</a>.
+ */
+class SVGLineElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGLineElement();
+ SVGLineElement(const SVGLineElement &);
+ SVGLineElement &operator=(const SVGLineElement &other);
+ SVGLineElement(SVGLineElementImpl *);
+ ~SVGLineElement();
+
+ /**
+ * The x-axis coordinate of the start of the line.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the start of the line.
+ */
+ SVGAnimatedLength x1();
+
+ /**
+ * The y-axis coordinate of the start of the line.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the start of the line.
+ */
+ SVGAnimatedLength y1();
+
+ /**
+ * The x-axis coordinate of the end of the line.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the end of the line.
+ */
+ SVGAnimatedLength x2();
+
+ /**
+ * The y-axis coordinate of the end of the line.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the end of the line.
+ */
+ SVGAnimatedLength y2();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLineElementImpl *handle() const { return impl; }
+
+private:
+ SVGLineElementImpl *impl;
+};
+
+}
+
+#endif
+
+//vim:ts=4:noet
diff --git a/ksvg/dom/SVGLinearGradientElement.cc b/ksvg/dom/SVGLinearGradientElement.cc
new file mode 100644
index 00000000..b3936dc4
--- /dev/null
+++ b/ksvg/dom/SVGLinearGradientElement.cc
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGLinearGradientElement.h"
+#include "SVGLinearGradientElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGLinearGradientElement::SVGLinearGradientElement() : SVGGradientElement()
+{
+ impl = 0;
+}
+
+SVGLinearGradientElement::SVGLinearGradientElement(const SVGLinearGradientElement &other) : SVGGradientElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGLinearGradientElement &SVGLinearGradientElement::operator =(const SVGLinearGradientElement &other)
+{
+ SVGGradientElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGLinearGradientElement::SVGLinearGradientElement(SVGLinearGradientElementImpl *other) : SVGGradientElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGLinearGradientElement::~SVGLinearGradientElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGLinearGradientElement::x1() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x1());
+}
+
+SVGAnimatedLength SVGLinearGradientElement::y1() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y1());
+}
+
+SVGAnimatedLength SVGLinearGradientElement::x2() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x2());
+}
+
+SVGAnimatedLength SVGLinearGradientElement::y2() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y2());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLinearGradientElement.h b/ksvg/dom/SVGLinearGradientElement.h
new file mode 100644
index 00000000..fe60df89
--- /dev/null
+++ b/ksvg/dom/SVGLinearGradientElement.h
@@ -0,0 +1,141 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGLinearGradientElement_H
+#define SVGLinearGradientElement_H
+
+#include "SVGGradientElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGLinearGradientElementImpl;
+
+/**
+ * <code>linearGradient</code> elements are never rendered directly; their
+ * only usage is as something that can be referenced using the
+ * <code>fill</code> and <code>stroke</code> properties.
+ * The <code>display</code> property does not apply to the
+ * <code>linearGradient</code> element; thus,
+ * <code>linearGradient</code> elements are not directly rendered even if the
+ * <code>display</code> property is set to a value other than none, and
+ * <code>linearGradient</code> elements are available for referencing even when
+ * the <code>display</code> property on the <code>linearGradient</code> element
+ * or any of its ancestors is set to none.
+ *
+ * For more information :
+ * <a href="http://www.w3.org/TR/SVG/pservers.html#LinearGradients">
+ * 13.2.2 Linear gradients</a>
+ *
+ */
+
+class SVGLinearGradientElement : public SVGGradientElement
+{
+public:
+ SVGLinearGradientElement();
+ SVGLinearGradientElement(const SVGLinearGradientElement &other);
+ SVGLinearGradientElement &operator=(const SVGLinearGradientElement &other);
+ SVGLinearGradientElement(SVGLinearGradientElementImpl *other);
+ virtual ~SVGLinearGradientElement();
+
+ /**
+ * x1, y1, x2, y2 define a gradient vector for the linear gradient.
+ * This gradient vector provides starting and ending points onto which the
+ * @ref SVGGradientElement (gradient stops) are mapped. The values of x1,
+ * y1, x2, y2 can be either numbers or percentages.
+ *
+ * If the attribute is not specified, the effect is as if a value of "0%"
+ * were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x1 value
+ */
+ SVGAnimatedLength x1() const;
+
+ /**
+ * x1, y1, x2, y2 define a gradient vector for the linear gradient.
+ * This gradient vector provides starting and ending points onto which the
+ * @ref SVGGradientElement (gradient stops) are mapped. The values of x1,
+ * y1, x2, y2 can be either numbers or percentages.
+ *
+ * If the attribute is not specified, the effect is as if a value of "0%"
+ * were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y1 value
+ */
+ SVGAnimatedLength y1() const;
+
+ /**
+ * x1, y1, x2, y2 define a gradient vector for the linear gradient.
+ * This gradient vector provides starting and ending points onto which the
+ * @ref SVGGradientElement (gradient stops) are mapped. The values of x1,
+ * y1, x2, y2 can be either numbers or percentages.
+ *
+ * If the attribute is not specified, the effect is as if a value of "100%"
+ * were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x2 value
+ */
+ SVGAnimatedLength x2() const;
+
+ /**
+ * x1, y1, x2, y2 define a gradient vector for the linear gradient.
+ * This gradient vector provides starting and ending points onto which the
+ * @ref SVGGradientElement (gradient stops) are mapped. The values of x1,
+ * y1, x2, y2 can be either numbers or percentages.
+ *
+ * If the attribute is not specified, the effect is as if a value of "0%"
+ * were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y2 value
+ */
+ SVGAnimatedLength y2() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLinearGradientElementImpl *handle() const { return impl; }
+
+private:
+ SVGLinearGradientElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
+
diff --git a/ksvg/dom/SVGLocatable.cc b/ksvg/dom/SVGLocatable.cc
new file mode 100644
index 00000000..62a89e2e
--- /dev/null
+++ b/ksvg/dom/SVGLocatable.cc
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGLocatable.h"
+#include "SVGLocatableImpl.h"
+#include "SVGElement.h"
+#include "SVGRect.h"
+#include "SVGMatrix.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGLocatable::SVGLocatable()
+{
+ impl = 0;
+}
+
+SVGLocatable::SVGLocatable(const SVGLocatable &other)
+{
+ (*this) = other;
+}
+
+SVGLocatable &SVGLocatable::operator=(const SVGLocatable &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGLocatable::SVGLocatable(SVGLocatableImpl *other)
+{
+ impl = other;
+}
+
+SVGLocatable::~SVGLocatable()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+SVGElement SVGLocatable::nearestViewportElement() const
+{
+ if(!impl) return SVGElement(0);
+ return impl->nearestViewportElement();
+}
+
+SVGElement SVGLocatable::farthestViewportElement() const
+{
+ if(!impl) return SVGElement(0);
+ return impl->farthestViewportElement();
+}
+
+SVGRect SVGLocatable::getBBox()
+{
+ if(!impl) return SVGRect(0);
+ return SVGRect(impl->getBBox()); // TODO: Check correctness
+}
+
+SVGMatrix SVGLocatable::getCTM()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->getCTM());
+}
+
+SVGMatrix SVGLocatable::getScreenCTM()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->getScreenCTM());
+}
+
+SVGMatrix SVGLocatable::getTransformToElement(const SVGElement &element)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->getTransformToElement(element.handle()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGLocatable.h b/ksvg/dom/SVGLocatable.h
new file mode 100644
index 00000000..ecb93adc
--- /dev/null
+++ b/ksvg/dom/SVGLocatable.h
@@ -0,0 +1,122 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGLocatable_H
+#define SVGLocatable_H
+
+namespace KSVG
+{
+
+class SVGElement;
+class SVGMatrix;
+class SVGRect;
+class SVGLocatableImpl;
+
+/**
+ * Interface SVGLocatable is for all elements which either have a <code>transform</code>
+ * attribute or don't have a <code>transform</code> attribute but whose content can have
+ * a bounding box in current user space.
+ */
+class SVGLocatable
+{
+public:
+ SVGLocatable(const SVGLocatable &other);
+ SVGLocatable &operator=(const SVGLocatable &other);
+ SVGLocatable(SVGLocatableImpl *other);
+ virtual ~SVGLocatable();
+
+ /**
+ * The element which established the current viewport. Often, the nearest
+ * ancestor 'svg' element. Null if the current element is the outermost 'svg' element.
+ */
+ SVGElement nearestViewportElement() const;
+
+ /**
+ * The farthest ancestor 'svg' element. Null if the current element is
+ * the outermost 'svg' element.
+ */
+ SVGElement farthestViewportElement() const;
+
+ /**
+ * Returns the tight bounding box in current user space (i.e., after application of
+ * the <code>transform</code> attribute, if any) on the geometry of all contained graphics
+ * elements, exclusive of stroke-width and filter effects).
+ *
+ * @return An SVGRect object that defines the bounding box.
+ */
+ SVGRect getBBox();
+
+ /**
+ * Returns the transformation matrix from current user units (i.e., after application of
+ * the <code>transform</code> attribute, if any) to the viewport coordinate system for
+ * the nearestViewportElement.
+ *
+ * @return An SVGMatrix object that defines the CTM.
+ */
+ SVGMatrix getCTM();
+
+ /**
+ * Returns the transformation matrix from current user units (i.e., after application of
+ * the <code>transform</code> attribute, if any) to the parent user agent's notice of a "pixel".
+ * For display devices, ideally this represents a physical screen pixel. For other devices or
+ * environments where physical pixel sizes are not known, then an algorithm similar to the
+ * CSS2 definition of a "pixel" can be used instead.
+ *
+ * @return An SVGMatrix object that defines the given transformation matrix.
+ */
+ SVGMatrix getScreenCTM();
+
+ /**
+ * Returns the transformation matrix from the user coordinate system on the current
+ * element (after application of the <code>transform</code> attribute, if any) to the
+ * user coordinate system on parameter element (after application of its
+ * <code>transform</code> attribute, if any).
+ *
+ * @param element The target element.
+ *
+ * @return An SVGMatrix object that defines the transformation.
+ */
+ SVGMatrix getTransformToElement(const SVGElement &element);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGLocatableImpl *handle() const { return impl; }
+
+protected:
+ SVGLocatable();
+
+private:
+ SVGLocatableImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMPathElement.cc b/ksvg/dom/SVGMPathElement.cc
new file mode 100644
index 00000000..6d7a36e4
--- /dev/null
+++ b/ksvg/dom/SVGMPathElement.cc
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMPathElement.h"
+#include "SVGMPathElementImpl.h"
+
+using namespace KSVG;
+
+SVGMPathElement::SVGMPathElement() : SVGElement(), SVGURIReference(), SVGExternalResourcesRequired()
+{
+ impl = 0;
+}
+
+SVGMPathElement::SVGMPathElement(const SVGMPathElement &other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGMPathElement &SVGMPathElement::operator =(const SVGMPathElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMPathElement::SVGMPathElement(SVGMPathElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMPathElement::~SVGMPathElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMPathElement.h b/ksvg/dom/SVGMPathElement.h
new file mode 100644
index 00000000..e972e7ca
--- /dev/null
+++ b/ksvg/dom/SVGMPathElement.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMPathElement_H
+#define SVGMPathElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGExternalResourcesRequired.h"
+
+namespace KSVG
+{
+
+class SVGMPathElementImpl;
+class SVGMPathElement : public SVGElement,
+ public SVGURIReference,
+ public SVGExternalResourcesRequired
+{
+public:
+ SVGMPathElement();
+ SVGMPathElement(const SVGMPathElement &other);
+ SVGMPathElement &operator=(const SVGMPathElement &other);
+ SVGMPathElement(SVGMPathElementImpl *other);
+ virtual ~SVGMPathElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMPathElementImpl *handle() const { return impl; }
+
+private:
+ SVGMPathElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMarkerElement.cc b/ksvg/dom/SVGMarkerElement.cc
new file mode 100644
index 00000000..7d7551da
--- /dev/null
+++ b/ksvg/dom/SVGMarkerElement.cc
@@ -0,0 +1,129 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMarkerElement.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedAngle.h"
+#include "SVGAngle.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGMarkerElement::SVGMarkerElement() : SVGElement(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGFitToViewBox()
+{
+ impl = 0;
+}
+
+SVGMarkerElement::SVGMarkerElement(const SVGMarkerElement &other) : SVGElement(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGMarkerElement &SVGMarkerElement::operator =(const SVGMarkerElement &other)
+{
+ SVGElement::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGFitToViewBox::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMarkerElement::SVGMarkerElement(SVGMarkerElementImpl *other) : SVGElement(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMarkerElement::~SVGMarkerElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGMarkerElement::refX() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->refX());
+}
+
+SVGAnimatedLength SVGMarkerElement::refY() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->refY());
+}
+
+SVGAnimatedEnumeration SVGMarkerElement::markerUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->markerUnits());
+}
+
+SVGAnimatedLength SVGMarkerElement::markerWidth() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->markerWidth());
+}
+
+SVGAnimatedLength SVGMarkerElement::markerHeight() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->markerHeight());
+}
+
+SVGAnimatedEnumeration SVGMarkerElement::orientType() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->orientType());
+}
+
+SVGAnimatedAngle SVGMarkerElement::orientAngle() const
+{
+ if(!impl) return SVGAnimatedAngle(0);
+ return SVGAnimatedAngle(impl->orientAngle());
+}
+
+void SVGMarkerElement::setOrientToAuto()
+{
+ if(impl)
+ impl->setOrientToAuto();
+}
+
+void SVGMarkerElement::setOrientToAngle(const SVGAngle &angle)
+{
+ if(impl)
+ impl->setOrientToAngle(angle.handle());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMarkerElement.h b/ksvg/dom/SVGMarkerElement.h
new file mode 100644
index 00000000..d2f54904
--- /dev/null
+++ b/ksvg/dom/SVGMarkerElement.h
@@ -0,0 +1,87 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMarkerElement_H
+#define SVGMarkerElement_H
+
+#include "SVGElement.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGFitToViewBox.h"
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_MARKERUNITS_UNKNOWN = 0,
+ SVG_MARKERUNITS_USERSPACEONUSE = 1,
+ SVG_MARKERUNITS_STROKEWIDTH = 2
+};
+
+enum
+{
+ SVG_MARKER_ORIENT_UNKNOWN = 0,
+ SVG_MARKER_ORIENT_AUTO = 1,
+ SVG_MARKER_ORIENT_ANGLE = 2
+};
+
+class SVGAnimatedLength;
+class SVGAnimatedAngle;
+class SVGAngle;
+class SVGAnimatedEnumeration;
+class SVGMarkerElementImpl;
+class SVGMarkerElement : public SVGElement,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGFitToViewBox
+{
+public:
+ SVGMarkerElement();
+ SVGMarkerElement(const SVGMarkerElement &other);
+ SVGMarkerElement &operator=(const SVGMarkerElement &other);
+ SVGMarkerElement(SVGMarkerElementImpl *other);
+ virtual ~SVGMarkerElement();
+
+ SVGAnimatedLength refX() const;
+ SVGAnimatedLength refY() const;
+ SVGAnimatedEnumeration markerUnits() const;
+ SVGAnimatedLength markerWidth() const;
+ SVGAnimatedLength markerHeight() const;
+ SVGAnimatedEnumeration orientType() const;
+ SVGAnimatedAngle orientAngle() const;
+
+ void setOrientToAuto();
+ void setOrientToAngle(const SVGAngle &angle);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMarkerElementImpl *handle() const { return impl; }
+
+private:
+ SVGMarkerElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMaskElement.cc b/ksvg/dom/SVGMaskElement.cc
new file mode 100644
index 00000000..c4513adc
--- /dev/null
+++ b/ksvg/dom/SVGMaskElement.cc
@@ -0,0 +1,109 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMaskElement.h"
+#include "SVGMaskElementImpl.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGMaskElement::SVGMaskElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGUnitTypes()
+{
+ impl = 0;
+}
+
+SVGMaskElement::SVGMaskElement(const SVGMaskElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes(), impl(0)
+{
+ (*this) = other;
+}
+
+SVGMaskElement &SVGMaskElement::operator =(const SVGMaskElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMaskElement::SVGMaskElement(SVGMaskElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGUnitTypes()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMaskElement::~SVGMaskElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedEnumeration SVGMaskElement::maskUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->maskUnits());
+}
+
+SVGAnimatedEnumeration SVGMaskElement::maskContentUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->maskContentUnits());
+}
+
+SVGAnimatedLength SVGMaskElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGMaskElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGMaskElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGMaskElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMaskElement.h b/ksvg/dom/SVGMaskElement.h
new file mode 100644
index 00000000..6a8e26a4
--- /dev/null
+++ b/ksvg/dom/SVGMaskElement.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMaskElement_H
+#define SVGMaskElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGUnitTypes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedLength;
+class SVGMaskElementImpl;
+class SVGMaskElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGUnitTypes
+{
+public:
+ SVGMaskElement();
+ SVGMaskElement(const SVGMaskElement &other);
+ SVGMaskElement &operator=(const SVGMaskElement &other);
+ SVGMaskElement(SVGMaskElementImpl *other);
+ virtual ~SVGMaskElement();
+
+ SVGAnimatedEnumeration maskUnits() const;
+ SVGAnimatedEnumeration maskContentUnits() const;
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+ SVGAnimatedLength width() const;
+ SVGAnimatedLength height() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMaskElementImpl *handle() const { return impl; }
+
+private:
+ SVGMaskElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMatrix.cc b/ksvg/dom/SVGMatrix.cc
new file mode 100644
index 00000000..30eeda56
--- /dev/null
+++ b/ksvg/dom/SVGMatrix.cc
@@ -0,0 +1,210 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMatrixImpl.h"
+#include "SVGMatrix.h"
+
+using namespace KSVG;
+
+SVGMatrix::SVGMatrix()
+{
+ impl = new SVGMatrixImpl();
+ impl->ref();
+}
+
+SVGMatrix::SVGMatrix(double a, double b, double c, double d, double e, double f)
+{
+ impl = new SVGMatrixImpl(a, b, c, d, e, f);
+ impl->ref();
+}
+
+SVGMatrix::SVGMatrix(const SVGMatrix &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGMatrix &SVGMatrix::operator=(const SVGMatrix &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMatrix::SVGMatrix(SVGMatrixImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMatrix::~SVGMatrix()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGMatrix::setA(const double &a)
+{
+ if(impl)
+ impl->setA(a);
+}
+
+double SVGMatrix::a() const
+{
+ if(!impl) return -1;
+ return impl->a();
+}
+
+void SVGMatrix::setB(const double &b)
+{
+ if(impl)
+ impl->setB(b);
+}
+
+double SVGMatrix::b() const
+{
+ if(!impl) return -1;
+ return impl->b();
+}
+
+void SVGMatrix::setC(const double &c)
+{
+ if(impl)
+ impl->setC(c);
+}
+
+double SVGMatrix::c() const
+{
+ if(!impl) return -1;
+ return impl->c();
+}
+
+void SVGMatrix::setD(const double &d)
+{
+ if(impl)
+ impl->setD(d);
+}
+
+double SVGMatrix::d() const
+{
+ if(!impl) return -1;
+ return impl->d();
+}
+
+void SVGMatrix::setE(const double &e)
+{
+ if(impl)
+ impl->setE(e);
+}
+
+double SVGMatrix::e() const
+{
+ if(!impl) return -1;
+ return impl->e();
+}
+
+void SVGMatrix::setF(const double &f)
+{
+ if(impl)
+ impl->setF(f);
+}
+
+double SVGMatrix::f() const
+{
+ if(!impl) return -1;
+ return impl->f();
+}
+
+SVGMatrix SVGMatrix::multiply(SVGMatrix &secondMatrix)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->multiply(secondMatrix.handle()));
+}
+
+SVGMatrix SVGMatrix::inverse()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->inverse());
+}
+
+SVGMatrix SVGMatrix::translate(const double &x, const double &y)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->translate(x, y));
+}
+
+SVGMatrix SVGMatrix::scale(const double &scaleFactor)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->scale(scaleFactor));
+}
+
+SVGMatrix SVGMatrix::scaleNonUniform(const double &scaleFactorX, const double &scaleFactorY)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->scaleNonUniform(scaleFactorX, scaleFactorY));
+}
+
+SVGMatrix SVGMatrix::rotate(const double &angle)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->rotate(angle));
+}
+
+SVGMatrix SVGMatrix::rotateFromVector(const double &x, const double &y)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->rotateFromVector(x, y));
+}
+
+SVGMatrix SVGMatrix::flipX()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->flipX());
+}
+
+SVGMatrix SVGMatrix::flipY()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->flipY());
+}
+
+SVGMatrix SVGMatrix::skewX(const double &angle)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->skewX(angle));
+}
+
+SVGMatrix SVGMatrix::skewY(const double &angle)
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->skewY(angle));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMatrix.h b/ksvg/dom/SVGMatrix.h
new file mode 100644
index 00000000..caf2b9a8
--- /dev/null
+++ b/ksvg/dom/SVGMatrix.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMatrix_H
+#define SVGMatrix_H
+
+namespace KSVG
+{
+
+class SVGMatrixImpl;
+class SVGMatrix
+{
+public:
+ SVGMatrix();
+ SVGMatrix(double, double, double, double, double, double);
+ SVGMatrix(const SVGMatrix &);
+ SVGMatrix &operator=(const SVGMatrix &);
+ SVGMatrix(SVGMatrixImpl *);
+ ~SVGMatrix();
+
+ void setA(const double &);
+ double a() const;
+
+ void setB(const double &);
+ double b() const;
+
+ void setC(const double &);
+ double c() const;
+
+ void setD(const double &);
+ double d() const;
+
+ void setE(const double &);
+ double e() const;
+
+ void setF(const double &);
+ double f() const;
+
+ SVGMatrix multiply(SVGMatrix &secondMatrix);
+ SVGMatrix inverse();
+ SVGMatrix translate(const double &x, const double &y);
+ SVGMatrix scale(const double &scaleFactor);
+ SVGMatrix scaleNonUniform(const double &scaleFactorX, const double &scaleFactorY);
+ SVGMatrix rotate(const double &angle);
+ SVGMatrix rotateFromVector(const double &x, const double &y);
+ SVGMatrix flipX();
+ SVGMatrix flipY();
+ SVGMatrix skewX(const double &angle);
+ SVGMatrix skewY(const double &angle);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMatrixImpl *handle() const { return impl; }
+
+private:
+ SVGMatrixImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMetadataElement.cc b/ksvg/dom/SVGMetadataElement.cc
new file mode 100644
index 00000000..e874e95c
--- /dev/null
+++ b/ksvg/dom/SVGMetadataElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMetadataElement.h"
+#include "SVGMetadataElementImpl.h"
+
+using namespace KSVG;
+
+SVGMetadataElement::SVGMetadataElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGMetadataElement::SVGMetadataElement(const SVGMetadataElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGMetadataElement &SVGMetadataElement::operator =(const SVGMetadataElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMetadataElement::SVGMetadataElement(SVGMetadataElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMetadataElement::~SVGMetadataElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMetadataElement.h b/ksvg/dom/SVGMetadataElement.h
new file mode 100644
index 00000000..703e48a6
--- /dev/null
+++ b/ksvg/dom/SVGMetadataElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMetadataElement_H
+#define SVGMetadataElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGMetadataElementImpl;
+class SVGMetadataElement : public SVGElement
+{
+public:
+ SVGMetadataElement();
+ SVGMetadataElement(const SVGMetadataElement &other);
+ SVGMetadataElement &operator=(const SVGMetadataElement &other);
+ SVGMetadataElement(SVGMetadataElementImpl *other);
+ virtual ~SVGMetadataElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMetadataElementImpl *handle() const { return impl; }
+
+private:
+ SVGMetadataElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMissingGlyphElement.cc b/ksvg/dom/SVGMissingGlyphElement.cc
new file mode 100644
index 00000000..d9bff554
--- /dev/null
+++ b/ksvg/dom/SVGMissingGlyphElement.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMissingGlyphElement.h"
+#include "SVGMissingGlyphElementImpl.h"
+
+using namespace KSVG;
+
+SVGMissingGlyphElement::SVGMissingGlyphElement() : SVGElement(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGMissingGlyphElement::SVGMissingGlyphElement(const SVGMissingGlyphElement &other) : SVGElement(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGMissingGlyphElement &SVGMissingGlyphElement::operator =(const SVGMissingGlyphElement &other)
+{
+ SVGElement::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGMissingGlyphElement::SVGMissingGlyphElement(SVGMissingGlyphElementImpl *other) : SVGElement(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGMissingGlyphElement::~SVGMissingGlyphElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGMissingGlyphElement.h b/ksvg/dom/SVGMissingGlyphElement.h
new file mode 100644
index 00000000..5b7e6f62
--- /dev/null
+++ b/ksvg/dom/SVGMissingGlyphElement.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMissingGlyphElement_H
+#define SVGMissingGlyphElement_H
+
+#include "SVGElement.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGMissingGlyphElementImpl;
+class SVGMissingGlyphElement : public SVGElement,
+ public SVGStylable
+{
+public:
+ SVGMissingGlyphElement();
+ SVGMissingGlyphElement(const SVGMissingGlyphElement &other);
+ SVGMissingGlyphElement &operator=(const SVGMissingGlyphElement &other);
+ SVGMissingGlyphElement(SVGMissingGlyphElementImpl *other);
+ virtual ~SVGMissingGlyphElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGMissingGlyphElementImpl *handle() const { return impl; }
+
+private:
+ SVGMissingGlyphElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGNumber.cc b/ksvg/dom/SVGNumber.cc
new file mode 100644
index 00000000..81208987
--- /dev/null
+++ b/ksvg/dom/SVGNumber.cc
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGNumber.h"
+#include "SVGNumberImpl.h"
+
+using namespace KSVG;
+
+SVGNumber::SVGNumber()
+{
+ impl = new SVGNumberImpl();
+ impl->ref();
+}
+
+SVGNumber::SVGNumber(const SVGNumber &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGNumber &SVGNumber::operator=(const SVGNumber &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGNumber::SVGNumber(SVGNumberImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGNumber::~SVGNumber()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGNumber::setValue(float value)
+{
+ if(impl)
+ impl->setValue(value);
+}
+
+float SVGNumber::value() const
+{
+ if(!impl) return -1;
+ return impl->value();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGNumber.h b/ksvg/dom/SVGNumber.h
new file mode 100644
index 00000000..d3efbe42
--- /dev/null
+++ b/ksvg/dom/SVGNumber.h
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGNumber_H
+#define SVGNumber_H
+
+namespace KSVG
+{
+
+class SVGNumberImpl;
+class SVGNumber
+{
+public:
+ SVGNumber();
+ SVGNumber(const SVGNumber &);
+ SVGNumber &operator=(const SVGNumber &);
+ SVGNumber(SVGNumberImpl *);
+ ~SVGNumber();
+
+ void setValue(float value);
+ float value() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGNumberImpl *handle() const { return impl; }
+
+private:
+ SVGNumberImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGNumberList.cc b/ksvg/dom/SVGNumberList.cc
new file mode 100644
index 00000000..92adec50
--- /dev/null
+++ b/ksvg/dom/SVGNumberList.cc
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGNumberList.h"
+#include "SVGNumberListImpl.h"
+#include "SVGNumber.h"
+
+using namespace KSVG;
+
+SVGNumberList::SVGNumberList()
+{
+ impl = new SVGNumberListImpl();
+ impl->ref();
+}
+
+SVGNumberList::SVGNumberList(const SVGNumberList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGNumberList &SVGNumberList::operator=(const SVGNumberList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGNumberList::SVGNumberList(SVGNumberListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGNumberList::~SVGNumberList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGNumberList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGNumberList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+SVGNumber *SVGNumberList::initialize(SVGNumber *newItem)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->initialize(newItem->handle()));
+}
+
+SVGNumber *SVGNumberList::getItem(unsigned long index)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->getItem(index));
+}
+
+SVGNumber *SVGNumberList::insertItemBefore(SVGNumber *newItem, unsigned long index)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->insertItemBefore(newItem->handle(), index));
+}
+
+SVGNumber *SVGNumberList::replaceItem(SVGNumber *newItem, unsigned long index)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->replaceItem(newItem->handle(), index));
+}
+
+SVGNumber *SVGNumberList::removeItem(unsigned long index)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->removeItem(index));
+}
+
+SVGNumber *SVGNumberList::appendItem(SVGNumber *newItem)
+{
+ if(!impl) return new SVGNumber(0);
+ return new SVGNumber(impl->appendItem(newItem->handle()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGNumberList.h b/ksvg/dom/SVGNumberList.h
new file mode 100644
index 00000000..920574d7
--- /dev/null
+++ b/ksvg/dom/SVGNumberList.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGNumberList_H
+#define SVGNumberList_H
+
+namespace KSVG
+{
+
+class SVGNumber;
+class SVGNumberListImpl;
+class SVGNumberList
+{
+public:
+ SVGNumberList();
+ SVGNumberList(const SVGNumberList &);
+ SVGNumberList &operator=(const SVGNumberList &);
+ SVGNumberList(SVGNumberListImpl *);
+ ~SVGNumberList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+ SVGNumber *initialize(SVGNumber *newItem);
+ SVGNumber *getItem(unsigned long index);
+ SVGNumber *insertItemBefore(SVGNumber *newItem, unsigned long index);
+ SVGNumber *replaceItem(SVGNumber *newItem, unsigned long index);
+ SVGNumber *removeItem(unsigned long index);
+ SVGNumber *appendItem(SVGNumber *newItem);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGNumberListImpl *handle() const { return impl; }
+
+private:
+ SVGNumberListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPaint.cc b/ksvg/dom/SVGPaint.cc
new file mode 100644
index 00000000..7e7051d5
--- /dev/null
+++ b/ksvg/dom/SVGPaint.cc
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPaint.h"
+#include "SVGPaintImpl.h"
+
+using namespace KSVG;
+
+SVGPaint::SVGPaint() : SVGColor()
+{
+ // FIXME: no icc color support...
+ impl = new SVGPaintImpl(0);
+ impl->ref();
+}
+
+SVGPaint::SVGPaint(const SVGPaint &other) : SVGColor(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGPaint &SVGPaint::operator =(const SVGPaint &other)
+{
+ SVGColor::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPaint::SVGPaint(SVGPaintImpl *other) : SVGColor(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPaint::~SVGPaint()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned short SVGPaint::paintType() const
+{
+ if(!impl) return SVG_PAINTTYPE_UNKNOWN;
+ return impl->paintType();
+}
+
+DOM::DOMString SVGPaint::uri() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->uri();
+}
+
+void SVGPaint::setUri(const DOM::DOMString &uri)
+{
+ if(impl)
+ impl->setUri(uri);
+}
+
+void SVGPaint::setPaint(unsigned short paintType, const DOM::DOMString &uri, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ if(impl)
+ impl->setPaint(paintType, uri, rgbColor, iccColor);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPaint.h b/ksvg/dom/SVGPaint.h
new file mode 100644
index 00000000..84f331fb
--- /dev/null
+++ b/ksvg/dom/SVGPaint.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPaint_H
+#define SVGPaint_H
+
+#include "SVGColor.h"
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_PAINTTYPE_UNKNOWN = 0,
+ SVG_PAINTTYPE_RGBCOLOR = 1,
+ SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
+ SVG_PAINTTYPE_NONE = 101,
+ SVG_PAINTTYPE_CURRENTCOLOR = 102,
+ SVG_PAINTTYPE_URI_NONE = 103,
+ SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
+ SVG_PAINTTYPE_URI_RGBCOLOR = 105,
+ SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
+ SVG_PAINTTYPE_URI = 107
+};
+
+class SVGPaintImpl;
+class SVGPaint : public SVGColor
+{
+public:
+ SVGPaint();
+ SVGPaint(const SVGPaint &other);
+ SVGPaint &operator=(const SVGPaint &other);
+ SVGPaint(SVGPaintImpl *other);
+ virtual ~SVGPaint();
+
+ unsigned short paintType() const;
+ DOM::DOMString uri() const;
+ void setUri(const DOM::DOMString &uri);
+ void setPaint(unsigned short paintType, const DOM::DOMString &uri, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPaintImpl *handle() const { return impl; }
+
+private:
+ SVGPaintImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathElement.cc b/ksvg/dom/SVGPathElement.cc
new file mode 100644
index 00000000..1153cf65
--- /dev/null
+++ b/ksvg/dom/SVGPathElement.cc
@@ -0,0 +1,200 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathElement.h"
+#include "SVGPathElementImpl.h"
+#include "SVGPoint.h"
+#include "SVGPathSegClosePath.h"
+#include "SVGPathSegLineto.h"
+#include "SVGPathSegLinetoHorizontal.h"
+#include "SVGPathSegLinetoVertical.h"
+#include "SVGPathSegMoveto.h"
+#include "SVGPathSegArc.h"
+#include "SVGPathSegCurvetoCubic.h"
+#include "SVGPathSegCurvetoCubicSmooth.h"
+#include "SVGPathSegCurvetoQuadratic.h"
+#include "SVGPathSegCurvetoQuadraticSmooth.h"
+
+using namespace KSVG;
+
+SVGPathElement::SVGPathElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGAnimatedPathData()
+{
+ impl = 0;
+}
+
+SVGPathElement::SVGPathElement(const SVGPathElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPathData(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGPathElement &SVGPathElement::operator=(const SVGPathElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPathElement::SVGPathElement(SVGPathElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPathData(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPathElement::~SVGPathElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+/*
+SVGAnimatedNumber SVGPathElement::pathLength() const
+{
+ return m_pathLength;
+}
+*/
+
+float SVGPathElement::getTotalLength()
+{
+ return impl->getTotalLength();
+}
+
+SVGPoint SVGPathElement::getPointAtLength(float distance)
+{
+ return SVGPoint(impl->getPointAtLength(distance));
+}
+
+unsigned long SVGPathElement::getPathSegAtLength(float distance)
+{
+ return impl->getPathSegAtLength(distance);
+}
+
+SVGPathSegClosePath SVGPathElement::createSVGPathSegClosePath()
+{
+ return impl->createSVGPathSegClosePath();
+}
+
+SVGPathSegMovetoAbs SVGPathElement::createSVGPathSegMovetoAbs(float x,float y)
+{
+ return impl->createSVGPathSegMovetoAbs(x, y);;
+}
+
+SVGPathSegMovetoRel SVGPathElement::createSVGPathSegMovetoRel(float x,float y)
+{
+ return impl->createSVGPathSegMovetoRel(x, y);
+}
+
+SVGPathSegLinetoAbs SVGPathElement::createSVGPathSegLinetoAbs(float x,float y)
+{
+ return impl->createSVGPathSegLinetoAbs(x, y);
+}
+
+SVGPathSegLinetoRel SVGPathElement::createSVGPathSegLinetoRel(float x,float y)
+{
+ return impl->createSVGPathSegLinetoRel(x, y);
+}
+
+SVGPathSegCurvetoCubicAbs SVGPathElement::createSVGPathSegCurvetoCubicAbs(float x,float y,float x1,float y1,float x2,float y2)
+{
+ return impl->createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2);
+}
+
+SVGPathSegCurvetoCubicRel SVGPathElement::createSVGPathSegCurvetoCubicRel(float x,float y,float x1,float y1,float x2,float y2)
+{
+ return impl->createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2);
+}
+
+SVGPathSegCurvetoQuadraticAbs SVGPathElement::createSVGPathSegCurvetoQuadraticAbs(float x,float y,float x1,float y1)
+{
+ return impl->createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1);
+}
+
+SVGPathSegCurvetoQuadraticRel SVGPathElement::createSVGPathSegCurvetoQuadraticRel(float x,float y,float x1,float y1)
+{
+ return impl->createSVGPathSegCurvetoQuadraticRel(x, y, x1, y1);
+}
+
+SVGPathSegArcAbs SVGPathElement::createSVGPathSegArcAbs(float x,float y,float r1,float r2,float angle,bool largeArcFlag,bool sweepFlag)
+{
+ return impl->createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag);
+}
+
+SVGPathSegArcRel SVGPathElement::createSVGPathSegArcRel(float x,float y,float r1,float r2,float angle,bool largeArcFlag,bool sweepFlag)
+{
+ return impl->createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag);
+}
+
+SVGPathSegLinetoHorizontalAbs SVGPathElement::createSVGPathSegLinetoHorizontalAbs(float x)
+{
+ return impl->createSVGPathSegLinetoHorizontalAbs(x);
+}
+
+SVGPathSegLinetoHorizontalRel SVGPathElement::createSVGPathSegLinetoHorizontalRel(float x)
+{
+ return impl->createSVGPathSegLinetoHorizontalRel(x);
+}
+
+SVGPathSegLinetoVerticalAbs SVGPathElement::createSVGPathSegLinetoVerticalAbs(float y)
+{
+ return impl->createSVGPathSegLinetoVerticalAbs(y);
+}
+
+SVGPathSegLinetoVerticalRel SVGPathElement::createSVGPathSegLinetoVerticalRel(float y)
+{
+ return impl->createSVGPathSegLinetoVerticalRel(y);
+}
+
+SVGPathSegCurvetoCubicSmoothAbs SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs(float x,float y,float x2,float y2)
+{
+ return impl->createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2);;
+}
+
+SVGPathSegCurvetoCubicSmoothRel SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel(float x,float y,float x2,float y2)
+{
+ return impl->createSVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2);
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbs SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs(float x,float y)
+{
+ return impl->createSVGPathSegCurvetoQuadraticSmoothAbs(x, y);
+}
+
+SVGPathSegCurvetoQuadraticSmoothRel SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel(float x,float y)
+{
+ return impl->createSVGPathSegCurvetoQuadraticSmoothRel(x, y);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathElement.h b/ksvg/dom/SVGPathElement.h
new file mode 100644
index 00000000..fa4cb379
--- /dev/null
+++ b/ksvg/dom/SVGPathElement.h
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathElement_H
+#define SVGPathElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGAnimatedPathData.h"
+
+namespace KSVG
+{
+
+class SVGPoint;
+class SVGPathSegClosePath;
+class SVGPathSegLinetoAbs;
+class SVGPathSegLinetoRel;
+class SVGPathSegLinetoHorizontalAbs;
+class SVGPathSegLinetoHorizontalRel;
+class SVGPathSegLinetoVerticalAbs;
+class SVGPathSegLinetoVerticalRel;
+class SVGPathSegMovetoAbs;
+class SVGPathSegMovetoRel;
+class SVGPathSegArcAbs;
+class SVGPathSegArcRel;
+class SVGPathSegCurvetoCubicAbs;
+class SVGPathSegCurvetoCubicRel;
+class SVGPathSegCurvetoCubicSmoothAbs;
+class SVGPathSegCurvetoCubicSmoothRel;
+class SVGPathSegCurvetoQuadraticAbs;
+class SVGPathSegCurvetoQuadraticRel;
+class SVGPathSegCurvetoQuadraticSmoothAbs;
+class SVGPathSegCurvetoQuadraticSmoothRel;
+class SVGPathElementImpl;
+class SVGPathElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGAnimatedPathData
+{
+public:
+ SVGPathElement();
+ SVGPathElement(const SVGPathElement &);
+ SVGPathElement &operator=(const SVGPathElement &other);
+ SVGPathElement(SVGPathElementImpl *);
+ ~SVGPathElement();
+
+ //SVGAnimatedNumber pathLength() const;
+ float getTotalLength();
+ SVGPoint getPointAtLength(float distance);
+ unsigned long getPathSegAtLength(float distance);
+
+ SVGPathSegClosePath createSVGPathSegClosePath();
+ SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x,float y);
+ SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x,float y);
+ SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(float x,float y);
+ SVGPathSegLinetoRel createSVGPathSegLinetoRel(float x,float y);
+ SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(float x,float y,float x1,float y1,float x2,float y2);
+ SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(float x,float y,float x1,float y1,float x2,float y2);
+ SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(float x,float y,float x1,float y1);
+ SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(float x,float y,float x1,float y1);
+ SVGPathSegArcAbs createSVGPathSegArcAbs(float x,float y,float r1,float r2,float angle,bool largeArcFlag,bool sweepFlag);
+ SVGPathSegArcRel createSVGPathSegArcRel(float x,float y,float r1,float r2,float angle,bool largeArcFlag,bool sweepFlag);
+ SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(float x);
+ SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(float x);
+ SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(float y);
+ SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(float y);
+ SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(float x,float y,float x2,float y2);
+ SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(float x,float y,float x2,float y2);
+ SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(float x,float y);
+ SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(float x,float y);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathElementImpl *handle() const { return impl; }
+
+private:
+ SVGPathElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSeg.cc b/ksvg/dom/SVGPathSeg.cc
new file mode 100644
index 00000000..3fc31148
--- /dev/null
+++ b/ksvg/dom/SVGPathSeg.cc
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSeg.h"
+#include "SVGPathSegImpl.h"
+
+using namespace KSVG;
+
+SVGPathSeg::SVGPathSeg()
+{
+ impl = new SVGPathSegImpl();
+}
+
+SVGPathSeg::SVGPathSeg(const SVGPathSeg &other)
+{
+ impl = other.impl;
+}
+
+SVGPathSeg &SVGPathSeg::operator=(const SVGPathSeg &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGPathSeg::SVGPathSeg(SVGPathSegImpl *other)
+{
+ impl = other;
+}
+
+SVGPathSeg::~SVGPathSeg()
+{
+ delete impl;
+}
+
+unsigned short SVGPathSeg::pathSegType() const
+{
+ if(!impl) return PATHSEG_UNKNOWN;
+ return impl->pathSegType();
+}
+
+DOM::DOMString SVGPathSeg::pathSegTypeAsLetter() const
+{
+ if(!impl) return DOM::DOMString("");
+ return impl->pathSegTypeAsLetter();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSeg.h b/ksvg/dom/SVGPathSeg.h
new file mode 100644
index 00000000..f82e3c80
--- /dev/null
+++ b/ksvg/dom/SVGPathSeg.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+#ifndef SVGPathSeg_H
+#define SVGPathSeg_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+enum
+{
+ PATHSEG_UNKNOWN = 0,
+ PATHSEG_CLOSEPATH = 1,
+ PATHSEG_MOVETO_ABS = 2,
+ PATHSEG_MOVETO_REL = 3,
+ PATHSEG_LINETO_ABS = 4,
+ PATHSEG_LINETO_REL = 5,
+ PATHSEG_CURVETO_CUBIC_ABS = 6,
+ PATHSEG_CURVETO_CUBIC_REL = 7,
+ PATHSEG_CURVETO_QUADRATIC_ABS = 8,
+ PATHSEG_CURVETO_QUADRATIC_REL = 9,
+ PATHSEG_ARC_ABS = 10,
+ PATHSEG_ARC_REL = 11,
+ PATHSEG_LINETO_HORIZONTAL_ABS = 12,
+ PATHSEG_LINETO_HORIZONTAL_REL = 13,
+ PATHSEG_LINETO_VERTICAL_ABS = 14,
+ PATHSEG_LINETO_VERTICAL_REL = 15,
+ PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16,
+ PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17,
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18,
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19
+};
+
+class SVGPathSegImpl;
+class SVGPathSeg
+{
+public:
+ SVGPathSeg();
+ SVGPathSeg(const SVGPathSeg &);
+ SVGPathSeg &operator=(const SVGPathSeg &other);
+ SVGPathSeg(SVGPathSegImpl *);
+ ~SVGPathSeg();
+
+ unsigned short pathSegType() const;
+ DOM::DOMString pathSegTypeAsLetter() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegArc.cc b/ksvg/dom/SVGPathSegArc.cc
new file mode 100644
index 00000000..078137ab
--- /dev/null
+++ b/ksvg/dom/SVGPathSegArc.cc
@@ -0,0 +1,238 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegArc.h"
+#include "SVGPathSegArcImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegArcAbs::SVGPathSegArcAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegArcAbsImpl();
+}
+
+SVGPathSegArcAbs::SVGPathSegArcAbs(const SVGPathSegArcAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegArcAbs::SVGPathSegArcAbs(SVGPathSegArcAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegArcAbs::~SVGPathSegArcAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegArcAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegArcAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegArcAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegArcAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegArcAbs::setR1(const float &r1)
+{
+ if(impl)
+ impl->setR1(r1);
+}
+
+float SVGPathSegArcAbs::r1() const
+{
+ if(!impl) return -1;
+ return impl->r1();
+}
+
+void SVGPathSegArcAbs::setR2(const float &r2)
+{
+ if(impl)
+ impl->setR2(r2);
+}
+
+float SVGPathSegArcAbs::r2() const
+{
+ if(!impl) return -1;
+ return impl->r2();
+}
+
+void SVGPathSegArcAbs::setAngle(const float &angle)
+{
+ if(impl)
+ impl->setAngle(angle);
+}
+
+float SVGPathSegArcAbs::angle() const
+{
+ if(!impl) return -1;
+ return impl->angle();
+}
+
+void SVGPathSegArcAbs::setLargeArcFlag(bool largeArcFlag)
+{
+ if(impl)
+ impl->setLargeArcFlag(largeArcFlag);
+}
+
+bool SVGPathSegArcAbs::largeArcFlag() const
+{
+ if(!impl) return false;
+ return impl->largeArcFlag();
+}
+
+void SVGPathSegArcAbs::setSweepFlag(bool sweepFlag)
+{
+ if(impl)
+ impl->setSweepFlag(sweepFlag);
+}
+
+bool SVGPathSegArcAbs::sweepFlag() const
+{
+ if(!impl) return false;
+ return impl->sweepFlag();
+}
+
+
+
+
+
+SVGPathSegArcRel::SVGPathSegArcRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegArcRelImpl();
+}
+
+SVGPathSegArcRel::SVGPathSegArcRel(const SVGPathSegArcRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegArcRel::SVGPathSegArcRel(SVGPathSegArcRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegArcRel::~SVGPathSegArcRel()
+{
+ delete impl;
+}
+
+void SVGPathSegArcRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegArcRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegArcRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegArcRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegArcRel::setR1(const float &r1)
+{
+ if(impl)
+ impl->setR1(r1);
+}
+
+float SVGPathSegArcRel::r1() const
+{
+ if(!impl) return -1;
+ return impl->r1();
+}
+
+void SVGPathSegArcRel::setR2(const float &r2)
+{
+ if(impl)
+ impl->setR2(r2);
+}
+
+float SVGPathSegArcRel::r2() const
+{
+ if(!impl) return -1;
+ return impl->r2();
+}
+
+void SVGPathSegArcRel::setAngle(const float &angle)
+{
+ if(impl)
+ impl->setAngle(angle);
+}
+
+float SVGPathSegArcRel::angle() const
+{
+ if(!impl) return -1;
+ return impl->angle();
+}
+
+void SVGPathSegArcRel::setLargeArcFlag(bool largeArcFlag)
+{
+ if(impl)
+ impl->setLargeArcFlag(largeArcFlag);
+}
+
+bool SVGPathSegArcRel::largeArcFlag() const
+{
+ if(!impl) return false;
+ return impl->largeArcFlag();
+}
+
+void SVGPathSegArcRel::setSweepFlag(bool sweepFlag)
+{
+ if(impl)
+ impl->setSweepFlag(sweepFlag);
+}
+
+bool SVGPathSegArcRel::sweepFlag() const
+{
+ if(!impl) return false;
+ return impl->sweepFlag();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegArc.h b/ksvg/dom/SVGPathSegArc.h
new file mode 100644
index 00000000..e9b83786
--- /dev/null
+++ b/ksvg/dom/SVGPathSegArc.h
@@ -0,0 +1,109 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegArc_H
+#define SVGPathSegArc_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegArcAbsImpl;
+class SVGPathSegArcAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegArcAbs();
+ SVGPathSegArcAbs(const SVGPathSegArcAbs &);
+ SVGPathSegArcAbs &operator=(const SVGPathSegArcAbs &other);
+ SVGPathSegArcAbs(SVGPathSegArcAbsImpl *);
+ ~SVGPathSegArcAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setR1(const float &);
+ float r1() const;
+
+ void setR2(const float &);
+ float r2() const;
+
+ void setAngle(const float &);
+ float angle() const;
+
+ void setLargeArcFlag(bool);
+ bool largeArcFlag() const;
+
+ void setSweepFlag(bool);
+ bool sweepFlag() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegArcAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegArcAbsImpl *impl;
+};
+
+class SVGPathSegArcRelImpl;
+class SVGPathSegArcRel : public SVGPathSeg
+{
+public:
+ SVGPathSegArcRel();
+ SVGPathSegArcRel(const SVGPathSegArcRel &);
+ SVGPathSegArcRel &operator=(const SVGPathSegArcRel &other);
+ SVGPathSegArcRel(SVGPathSegArcRelImpl *);
+ ~SVGPathSegArcRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setR1(const float &);
+ float r1() const;
+
+ void setR2(const float &);
+ float r2() const;
+
+ void setAngle(const float &);
+ float angle() const;
+
+ void setLargeArcFlag(bool);
+ bool largeArcFlag() const;
+
+ void setSweepFlag(bool);
+ bool sweepFlag() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegArcRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegArcRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegClosePath.cc b/ksvg/dom/SVGPathSegClosePath.cc
new file mode 100644
index 00000000..d9f33877
--- /dev/null
+++ b/ksvg/dom/SVGPathSegClosePath.cc
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegClosePath.h"
+#include "SVGPathSegClosePathImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegClosePath::SVGPathSegClosePath() : SVGPathSeg()
+{
+ impl = new SVGPathSegClosePathImpl();
+}
+
+SVGPathSegClosePath::SVGPathSegClosePath(const SVGPathSegClosePath &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegClosePath::SVGPathSegClosePath(SVGPathSegClosePathImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegClosePath::~SVGPathSegClosePath()
+{
+ delete impl;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegClosePath.h b/ksvg/dom/SVGPathSegClosePath.h
new file mode 100644
index 00000000..a7f32021
--- /dev/null
+++ b/ksvg/dom/SVGPathSegClosePath.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegClosePath_H
+#define SVGPathSegClosePath_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegClosePathImpl;
+class SVGPathSegClosePath : public SVGPathSeg
+{
+public:
+ SVGPathSegClosePath();
+ SVGPathSegClosePath(const SVGPathSegClosePath &);
+ SVGPathSegClosePath &operator=(const SVGPathSegClosePath &other);
+ SVGPathSegClosePath(SVGPathSegClosePathImpl *);
+ ~SVGPathSegClosePath();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegClosePathImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegClosePathImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoCubic.cc b/ksvg/dom/SVGPathSegCurvetoCubic.cc
new file mode 100644
index 00000000..bee9ce00
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoCubic.cc
@@ -0,0 +1,214 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegCurvetoCubic.h"
+#include "SVGPathSegCurvetoCubicImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoCubicAbsImpl();
+}
+
+SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs(const SVGPathSegCurvetoCubicAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs(SVGPathSegCurvetoCubicAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoCubicAbs::~SVGPathSegCurvetoCubicAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoCubicAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoCubicAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoCubicAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoCubicAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoCubicAbs::setX1(const float &x1)
+{
+ if(impl)
+ impl->setX1(x1);
+}
+
+float SVGPathSegCurvetoCubicAbs::x1() const
+{
+ if(!impl) return -1;
+ return impl->x1();
+}
+
+void SVGPathSegCurvetoCubicAbs::setY1(const float &y1)
+{
+ if(impl)
+ impl->setY1(y1);
+}
+
+float SVGPathSegCurvetoCubicAbs::y1() const
+{
+ if(!impl) return -1;
+ return impl->y1();
+}
+
+void SVGPathSegCurvetoCubicAbs::setX2(const float &x2)
+{
+ if(impl)
+ impl->setX2(x2);
+}
+
+float SVGPathSegCurvetoCubicAbs::x2() const
+{
+ if(!impl) return -1;
+ return impl->x2();
+}
+
+void SVGPathSegCurvetoCubicAbs::setY2(const float &y2)
+{
+ if(impl)
+ impl->setY2(y2);
+}
+
+float SVGPathSegCurvetoCubicAbs::y2() const
+{
+ if(!impl) return -1;
+ return impl->y2();
+}
+
+
+
+
+
+SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoCubicRelImpl();
+}
+
+SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel(const SVGPathSegCurvetoCubicRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel(SVGPathSegCurvetoCubicRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoCubicRel::~SVGPathSegCurvetoCubicRel()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoCubicRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoCubicRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoCubicRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoCubicRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoCubicRel::setX1(const float &x1)
+{
+ if(impl)
+ impl->setX1(x1);
+}
+
+float SVGPathSegCurvetoCubicRel::x1() const
+{
+ if(!impl) return -1;
+ return impl->x1();
+}
+
+void SVGPathSegCurvetoCubicRel::setY1(const float &y1)
+{
+ if(impl)
+ impl->setY1(y1);
+}
+
+float SVGPathSegCurvetoCubicRel::y1() const
+{
+ if(!impl) return -1;
+ return impl->y1();
+}
+
+void SVGPathSegCurvetoCubicRel::setX2(const float &x2)
+{
+ if(impl)
+ impl->setX2(x2);
+}
+
+float SVGPathSegCurvetoCubicRel::x2() const
+{
+ if(!impl) return -1;
+ return impl->x2();
+}
+
+void SVGPathSegCurvetoCubicRel::setY2(const float &y2)
+{
+ if(impl)
+ impl->setY2(y2);
+}
+
+float SVGPathSegCurvetoCubicRel::y2() const
+{
+ if(!impl) return -1;
+ return impl->y2();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoCubic.h b/ksvg/dom/SVGPathSegCurvetoCubic.h
new file mode 100644
index 00000000..99fde23e
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoCubic.h
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoCubic_H
+#define SVGPathSegCurvetoCubic_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoCubicAbsImpl;
+class SVGPathSegCurvetoCubicAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoCubicAbs();
+ SVGPathSegCurvetoCubicAbs(const SVGPathSegCurvetoCubicAbs &);
+ SVGPathSegCurvetoCubicAbs &operator=(const SVGPathSegCurvetoCubicAbs &other);
+ SVGPathSegCurvetoCubicAbs(SVGPathSegCurvetoCubicAbsImpl *);
+ ~SVGPathSegCurvetoCubicAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX1(const float &);
+ float x1() const;
+
+ void setY1(const float &);
+ float y1() const;
+
+ void setX2(const float &);
+ float x2() const;
+
+ void setY2(const float &);
+ float y2() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoCubicAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoCubicAbsImpl *impl;
+};
+
+class SVGPathSegCurvetoCubicRelImpl;
+class SVGPathSegCurvetoCubicRel : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoCubicRel();
+ SVGPathSegCurvetoCubicRel(const SVGPathSegCurvetoCubicRel &);
+ SVGPathSegCurvetoCubicRel &operator=(const SVGPathSegCurvetoCubicRel &other);
+ SVGPathSegCurvetoCubicRel(SVGPathSegCurvetoCubicRelImpl *);
+ ~SVGPathSegCurvetoCubicRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX1(const float &);
+ float x1() const;
+
+ void setY1(const float &);
+ float y1() const;
+
+ void setX2(const float &);
+ float x2() const;
+
+ void setY2(const float &);
+ float y2() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoCubicRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoCubicRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoCubicSmooth.cc b/ksvg/dom/SVGPathSegCurvetoCubicSmooth.cc
new file mode 100644
index 00000000..5bb9df25
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoCubicSmooth.cc
@@ -0,0 +1,166 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegCurvetoCubicSmooth.h"
+#include "SVGPathSegCurvetoCubicSmoothImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoCubicSmoothAbsImpl();
+}
+
+SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs(const SVGPathSegCurvetoCubicSmoothAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs(SVGPathSegCurvetoCubicSmoothAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoCubicSmoothAbs::~SVGPathSegCurvetoCubicSmoothAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoCubicSmoothAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoCubicSmoothAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoCubicSmoothAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoCubicSmoothAbs::setX2(const float &x2)
+{
+ if(impl)
+ impl->setX2(x2);
+}
+
+float SVGPathSegCurvetoCubicSmoothAbs::x2() const
+{
+ if(!impl) return -1;
+ return impl->x2();
+}
+
+void SVGPathSegCurvetoCubicSmoothAbs::setY2(const float &y2)
+{
+ if(impl)
+ impl->setY2(y2);
+}
+
+float SVGPathSegCurvetoCubicSmoothAbs::y2() const
+{
+ if(!impl) return -1;
+ return impl->y2();
+}
+
+
+
+
+
+SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoCubicSmoothRelImpl();
+}
+
+SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel(const SVGPathSegCurvetoCubicSmoothRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel(SVGPathSegCurvetoCubicSmoothRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoCubicSmoothRel::~SVGPathSegCurvetoCubicSmoothRel()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoCubicSmoothRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoCubicSmoothRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoCubicSmoothRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoCubicSmoothRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoCubicSmoothRel::setX2(const float &x2)
+{
+ if(impl)
+ impl->setX2(x2);
+}
+
+float SVGPathSegCurvetoCubicSmoothRel::x2() const
+{
+ if(!impl) return -1;
+ return impl->x2();
+}
+
+void SVGPathSegCurvetoCubicSmoothRel::setY2(const float &y2)
+{
+ if(impl)
+ impl->setY2(y2);
+}
+
+float SVGPathSegCurvetoCubicSmoothRel::y2() const
+{
+ if(!impl) return -1;
+ return impl->y2();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoCubicSmooth.h b/ksvg/dom/SVGPathSegCurvetoCubicSmooth.h
new file mode 100644
index 00000000..444e54f0
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoCubicSmooth.h
@@ -0,0 +1,91 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoCubicSmooth_H
+#define SVGPathSegCurvetoCubicSmooth_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoCubicSmoothAbsImpl;
+class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoCubicSmoothAbs();
+ SVGPathSegCurvetoCubicSmoothAbs(const SVGPathSegCurvetoCubicSmoothAbs &);
+ SVGPathSegCurvetoCubicSmoothAbs &operator=(const SVGPathSegCurvetoCubicSmoothAbs &other);
+ SVGPathSegCurvetoCubicSmoothAbs(SVGPathSegCurvetoCubicSmoothAbsImpl *);
+ ~SVGPathSegCurvetoCubicSmoothAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX2(const float &);
+ float x2() const;
+
+ void setY2(const float &);
+ float y2() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoCubicSmoothAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoCubicSmoothAbsImpl *impl;
+};
+
+class SVGPathSegCurvetoCubicSmoothRelImpl;
+class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoCubicSmoothRel();
+ SVGPathSegCurvetoCubicSmoothRel(const SVGPathSegCurvetoCubicSmoothRel &);
+ SVGPathSegCurvetoCubicSmoothRel &operator=(const SVGPathSegCurvetoCubicSmoothRel &other);
+ SVGPathSegCurvetoCubicSmoothRel(SVGPathSegCurvetoCubicSmoothRelImpl *);
+ ~SVGPathSegCurvetoCubicSmoothRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX2(const float &);
+ float x2() const;
+
+ void setY2(const float &);
+ float y2() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoCubicSmoothRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoCubicSmoothRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoQuadratic.cc b/ksvg/dom/SVGPathSegCurvetoQuadratic.cc
new file mode 100644
index 00000000..7792db31
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoQuadratic.cc
@@ -0,0 +1,166 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegCurvetoQuadratic.h"
+#include "SVGPathSegCurvetoQuadraticImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoQuadraticAbsImpl();
+}
+
+SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs(const SVGPathSegCurvetoQuadraticAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs(SVGPathSegCurvetoQuadraticAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoQuadraticAbs::~SVGPathSegCurvetoQuadraticAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoQuadraticAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoQuadraticAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoQuadraticAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoQuadraticAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoQuadraticAbs::setX1(const float &x1)
+{
+ if(impl)
+ impl->setX1(x1);
+}
+
+float SVGPathSegCurvetoQuadraticAbs::x1() const
+{
+ if(!impl) return -1;
+ return impl->x1();
+}
+
+void SVGPathSegCurvetoQuadraticAbs::setY1(const float &y1)
+{
+ if(impl)
+ impl->setY1(y1);
+}
+
+float SVGPathSegCurvetoQuadraticAbs::y1() const
+{
+ if(!impl) return -1;
+ return impl->y1();
+}
+
+
+
+
+
+SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoQuadraticRelImpl();
+}
+
+SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel(const SVGPathSegCurvetoQuadraticRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel(SVGPathSegCurvetoQuadraticRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoQuadraticRel::~SVGPathSegCurvetoQuadraticRel()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoQuadraticRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoQuadraticRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoQuadraticRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoQuadraticRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGPathSegCurvetoQuadraticRel::setX1(const float &x1)
+{
+ if(impl)
+ impl->setX1(x1);
+}
+
+float SVGPathSegCurvetoQuadraticRel::x1() const
+{
+ if(!impl) return -1;
+ return impl->x1();
+}
+
+void SVGPathSegCurvetoQuadraticRel::setY1(const float &y1)
+{
+ if(impl)
+ impl->setY1(y1);
+}
+
+float SVGPathSegCurvetoQuadraticRel::y1() const
+{
+ if(!impl) return -1;
+ return impl->y1();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoQuadratic.h b/ksvg/dom/SVGPathSegCurvetoQuadratic.h
new file mode 100644
index 00000000..68bb3364
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoQuadratic.h
@@ -0,0 +1,91 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoQuadratic_H
+#define SVGPathSegCurvetoQuadratic_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoQuadraticAbsImpl;
+class SVGPathSegCurvetoQuadraticAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoQuadraticAbs();
+ SVGPathSegCurvetoQuadraticAbs(const SVGPathSegCurvetoQuadraticAbs &);
+ SVGPathSegCurvetoQuadraticAbs &operator=(const SVGPathSegCurvetoQuadraticAbs &other);
+ SVGPathSegCurvetoQuadraticAbs(SVGPathSegCurvetoQuadraticAbsImpl *);
+ ~SVGPathSegCurvetoQuadraticAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX1(const float &);
+ float x1() const;
+
+ void setY1(const float &);
+ float y1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoQuadraticAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoQuadraticAbsImpl *impl;
+};
+
+class SVGPathSegCurvetoQuadraticRelImpl;
+class SVGPathSegCurvetoQuadraticRel : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoQuadraticRel();
+ SVGPathSegCurvetoQuadraticRel(const SVGPathSegCurvetoQuadraticRel &);
+ SVGPathSegCurvetoQuadraticRel &operator=(const SVGPathSegCurvetoQuadraticRel &other);
+ SVGPathSegCurvetoQuadraticRel(SVGPathSegCurvetoQuadraticRelImpl *);
+ ~SVGPathSegCurvetoQuadraticRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ void setX1(const float &);
+ float x1() const;
+
+ void setY1(const float &);
+ float y1() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoQuadraticRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoQuadraticRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.cc b/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.cc
new file mode 100644
index 00000000..35a841c8
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.cc
@@ -0,0 +1,118 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegCurvetoQuadraticSmooth.h"
+#include "SVGPathSegCurvetoQuadraticSmoothImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoQuadraticSmoothAbsImpl();
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs(const SVGPathSegCurvetoQuadraticSmoothAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs(SVGPathSegCurvetoQuadraticSmoothAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbs::~SVGPathSegCurvetoQuadraticSmoothAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoQuadraticSmoothAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoQuadraticSmoothAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+
+
+
+
+SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegCurvetoQuadraticSmoothRelImpl();
+}
+
+SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel(const SVGPathSegCurvetoQuadraticSmoothRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel(SVGPathSegCurvetoQuadraticSmoothRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegCurvetoQuadraticSmoothRel::~SVGPathSegCurvetoQuadraticSmoothRel()
+{
+ delete impl;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegCurvetoQuadraticSmoothRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegCurvetoQuadraticSmoothRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.h b/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.h
new file mode 100644
index 00000000..e5a2782f
--- /dev/null
+++ b/ksvg/dom/SVGPathSegCurvetoQuadraticSmooth.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoQuadraticSmooth_H
+#define SVGPathSegCurvetoQuadraticSmooth_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoQuadraticSmoothAbsImpl;
+class SVGPathSegCurvetoQuadraticSmoothAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoQuadraticSmoothAbs();
+ SVGPathSegCurvetoQuadraticSmoothAbs(const SVGPathSegCurvetoQuadraticSmoothAbs &);
+ SVGPathSegCurvetoQuadraticSmoothAbs &operator=(const SVGPathSegCurvetoQuadraticSmoothAbs &other);
+ SVGPathSegCurvetoQuadraticSmoothAbs(SVGPathSegCurvetoQuadraticSmoothAbsImpl *);
+ ~SVGPathSegCurvetoQuadraticSmoothAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl *impl;
+};
+
+class SVGPathSegCurvetoQuadraticSmoothRelImpl;
+class SVGPathSegCurvetoQuadraticSmoothRel : public SVGPathSeg
+{
+public:
+ SVGPathSegCurvetoQuadraticSmoothRel();
+ SVGPathSegCurvetoQuadraticSmoothRel(const SVGPathSegCurvetoQuadraticSmoothRel &);
+ SVGPathSegCurvetoQuadraticSmoothRel &operator=(const SVGPathSegCurvetoQuadraticSmoothRel &other);
+ SVGPathSegCurvetoQuadraticSmoothRel(SVGPathSegCurvetoQuadraticSmoothRelImpl *);
+ ~SVGPathSegCurvetoQuadraticSmoothRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegCurvetoQuadraticSmoothRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegCurvetoQuadraticSmoothRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLineto.cc b/ksvg/dom/SVGPathSegLineto.cc
new file mode 100644
index 00000000..faabb04e
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLineto.cc
@@ -0,0 +1,118 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegLineto.h"
+#include "SVGPathSegLinetoImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegLinetoAbs::SVGPathSegLinetoAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoAbsImpl();
+}
+
+SVGPathSegLinetoAbs::SVGPathSegLinetoAbs(const SVGPathSegLinetoAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoAbs::SVGPathSegLinetoAbs(SVGPathSegLinetoAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoAbs::~SVGPathSegLinetoAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegLinetoAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegLinetoAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegLinetoAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+
+
+
+
+SVGPathSegLinetoRel::SVGPathSegLinetoRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoRelImpl();
+}
+
+SVGPathSegLinetoRel::SVGPathSegLinetoRel(const SVGPathSegLinetoRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoRel::SVGPathSegLinetoRel(SVGPathSegLinetoRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoRel::~SVGPathSegLinetoRel()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegLinetoRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegLinetoRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegLinetoRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLineto.h b/ksvg/dom/SVGPathSegLineto.h
new file mode 100644
index 00000000..df1b9862
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLineto.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLineto_H
+#define SVGPathSegLineto_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoAbsImpl;
+class SVGPathSegLinetoAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoAbs();
+ SVGPathSegLinetoAbs(const SVGPathSegLinetoAbs &);
+ SVGPathSegLinetoAbs &operator=(const SVGPathSegLinetoAbs &other);
+ SVGPathSegLinetoAbs(SVGPathSegLinetoAbsImpl *);
+ ~SVGPathSegLinetoAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoAbsImpl *impl;
+};
+
+class SVGPathSegLinetoRelImpl;
+class SVGPathSegLinetoRel : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoRel();
+ SVGPathSegLinetoRel(const SVGPathSegLinetoRel &);
+ SVGPathSegLinetoRel &operator=(const SVGPathSegLinetoRel &other);
+ SVGPathSegLinetoRel(SVGPathSegLinetoRelImpl *);
+ ~SVGPathSegLinetoRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLinetoHorizontal.cc b/ksvg/dom/SVGPathSegLinetoHorizontal.cc
new file mode 100644
index 00000000..22af4e40
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLinetoHorizontal.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegLinetoHorizontal.h"
+#include "SVGPathSegLinetoHorizontalImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoHorizontalAbsImpl();
+}
+
+SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs(const SVGPathSegLinetoHorizontalAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs(SVGPathSegLinetoHorizontalAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoHorizontalAbs::~SVGPathSegLinetoHorizontalAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoHorizontalAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegLinetoHorizontalAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+
+
+
+
+SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoHorizontalRelImpl();
+}
+
+SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel(const SVGPathSegLinetoHorizontalRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel(SVGPathSegLinetoHorizontalRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoHorizontalRel::~SVGPathSegLinetoHorizontalRel()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoHorizontalRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegLinetoHorizontalRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLinetoHorizontal.h b/ksvg/dom/SVGPathSegLinetoHorizontal.h
new file mode 100644
index 00000000..51edd6ff
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLinetoHorizontal.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLinetoHorizontal_H
+#define SVGPathSegLinetoHorizontal_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoHorizontalAbsImpl;
+class SVGPathSegLinetoHorizontalAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoHorizontalAbs();
+ SVGPathSegLinetoHorizontalAbs(const SVGPathSegLinetoHorizontalAbs &);
+ SVGPathSegLinetoHorizontalAbs &operator=(const SVGPathSegLinetoHorizontalAbs &other);
+ SVGPathSegLinetoHorizontalAbs(SVGPathSegLinetoHorizontalAbsImpl *);
+ ~SVGPathSegLinetoHorizontalAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoHorizontalAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoHorizontalAbsImpl *impl;
+};
+
+class SVGPathSegLinetoHorizontalRelImpl;
+class SVGPathSegLinetoHorizontalRel : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoHorizontalRel();
+ SVGPathSegLinetoHorizontalRel(const SVGPathSegLinetoHorizontalRel &);
+ SVGPathSegLinetoHorizontalRel &operator=(const SVGPathSegLinetoHorizontalRel &other);
+ SVGPathSegLinetoHorizontalRel(SVGPathSegLinetoHorizontalRelImpl *);
+ ~SVGPathSegLinetoHorizontalRel();
+
+ void setX(const float &);
+ float x() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoHorizontalRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoHorizontalRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLinetoVertical.cc b/ksvg/dom/SVGPathSegLinetoVertical.cc
new file mode 100644
index 00000000..86e0c33e
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLinetoVertical.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegLinetoVertical.h"
+#include "SVGPathSegLinetoVerticalImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoVerticalAbsImpl();
+}
+
+SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs(const SVGPathSegLinetoVerticalAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs(SVGPathSegLinetoVerticalAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoVerticalAbs::~SVGPathSegLinetoVerticalAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoVerticalAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegLinetoVerticalAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+
+
+
+
+SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegLinetoVerticalRelImpl();
+}
+
+SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel(const SVGPathSegLinetoVerticalRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel(SVGPathSegLinetoVerticalRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegLinetoVerticalRel::~SVGPathSegLinetoVerticalRel()
+{
+ delete impl;
+}
+
+void SVGPathSegLinetoVerticalRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegLinetoVerticalRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegLinetoVertical.h b/ksvg/dom/SVGPathSegLinetoVertical.h
new file mode 100644
index 00000000..05e516a7
--- /dev/null
+++ b/ksvg/dom/SVGPathSegLinetoVertical.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLinetoVertical_H
+#define SVGPathSegLinetoVertical_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoVerticalAbsImpl;
+class SVGPathSegLinetoVerticalAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoVerticalAbs();
+ SVGPathSegLinetoVerticalAbs(const SVGPathSegLinetoVerticalAbs &);
+ SVGPathSegLinetoVerticalAbs &operator=(const SVGPathSegLinetoVerticalAbs &other);
+ SVGPathSegLinetoVerticalAbs(SVGPathSegLinetoVerticalAbsImpl *);
+ ~SVGPathSegLinetoVerticalAbs();
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoVerticalAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoVerticalAbsImpl *impl;
+};
+
+class SVGPathSegLinetoVerticalRelImpl;
+class SVGPathSegLinetoVerticalRel : public SVGPathSeg
+{
+public:
+ SVGPathSegLinetoVerticalRel();
+ SVGPathSegLinetoVerticalRel(const SVGPathSegLinetoVerticalRel &);
+ SVGPathSegLinetoVerticalRel &operator=(const SVGPathSegLinetoVerticalRel &other);
+ SVGPathSegLinetoVerticalRel(SVGPathSegLinetoVerticalRelImpl *);
+ ~SVGPathSegLinetoVerticalRel();
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegLinetoVerticalRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegLinetoVerticalRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegList.cc b/ksvg/dom/SVGPathSegList.cc
new file mode 100644
index 00000000..e653adc6
--- /dev/null
+++ b/ksvg/dom/SVGPathSegList.cc
@@ -0,0 +1,114 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegList.h"
+#include "SVGPathSegListImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegList::SVGPathSegList()
+{
+ impl = new SVGPathSegListImpl();
+ impl->ref();
+}
+
+SVGPathSegList::SVGPathSegList(const SVGPathSegList &other)
+{
+ (*this) = other;
+}
+
+SVGPathSegList &SVGPathSegList::operator=(const SVGPathSegList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPathSegList::SVGPathSegList(SVGPathSegListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPathSegList::~SVGPathSegList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGPathSegList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGPathSegList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+SVGPathSeg *SVGPathSegList::initialize(SVGPathSeg *newItem)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->initialize(newItem->handle()));
+}
+
+SVGPathSeg *SVGPathSegList::getItem(unsigned long index)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->getItem(index));
+}
+
+SVGPathSeg *SVGPathSegList::insertItemBefore(SVGPathSeg *newItem, unsigned long index)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->insertItemBefore(newItem->handle(), index));
+}
+
+SVGPathSeg *SVGPathSegList::replaceItem(SVGPathSeg *newItem, unsigned long index)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->replaceItem(newItem->handle(), index));
+}
+
+SVGPathSeg *SVGPathSegList::removeItem(unsigned long index)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->removeItem(index));
+}
+
+SVGPathSeg *SVGPathSegList::appendItem(SVGPathSeg *newItem)
+{
+ if(!impl) return new SVGPathSeg(0);
+ return new SVGPathSeg(impl->appendItem(newItem->handle()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegList.h b/ksvg/dom/SVGPathSegList.h
new file mode 100644
index 00000000..b9feca72
--- /dev/null
+++ b/ksvg/dom/SVGPathSegList.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegList_H
+#define SVGPathSegList_H
+
+namespace KSVG
+{
+
+class SVGPathSeg;
+class SVGPathSegListImpl;
+class SVGPathSegList
+{
+public:
+ SVGPathSegList();
+ SVGPathSegList(const SVGPathSegList &);
+ SVGPathSegList &operator=(const SVGPathSegList &other);
+ SVGPathSegList(SVGPathSegListImpl *);
+ ~SVGPathSegList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+
+ SVGPathSeg *initialize(SVGPathSeg *newItem);
+ SVGPathSeg *getItem(unsigned long index);
+ SVGPathSeg *insertItemBefore(SVGPathSeg *newItem, unsigned long index);
+ SVGPathSeg *replaceItem(SVGPathSeg *newItem, unsigned long index);
+ SVGPathSeg *removeItem(unsigned long index);
+ SVGPathSeg *appendItem(SVGPathSeg *newItem);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegListImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegMoveto.cc b/ksvg/dom/SVGPathSegMoveto.cc
new file mode 100644
index 00000000..c5a1dac0
--- /dev/null
+++ b/ksvg/dom/SVGPathSegMoveto.cc
@@ -0,0 +1,118 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegMoveto.h"
+#include "SVGPathSegMovetoImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegMovetoAbs::SVGPathSegMovetoAbs() : SVGPathSeg()
+{
+ impl = new SVGPathSegMovetoAbsImpl();
+}
+
+SVGPathSegMovetoAbs::SVGPathSegMovetoAbs(const SVGPathSegMovetoAbs &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegMovetoAbs::SVGPathSegMovetoAbs(SVGPathSegMovetoAbsImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegMovetoAbs::~SVGPathSegMovetoAbs()
+{
+ delete impl;
+}
+
+void SVGPathSegMovetoAbs::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegMovetoAbs::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegMovetoAbs::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegMovetoAbs::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+
+
+
+
+SVGPathSegMovetoRel::SVGPathSegMovetoRel() : SVGPathSeg()
+{
+ impl = new SVGPathSegMovetoRelImpl();
+}
+
+SVGPathSegMovetoRel::SVGPathSegMovetoRel(const SVGPathSegMovetoRel &other) : SVGPathSeg(other)
+{
+ impl = other.impl;
+}
+
+SVGPathSegMovetoRel::SVGPathSegMovetoRel(SVGPathSegMovetoRelImpl *other) : SVGPathSeg(other)
+{
+ impl = other;
+}
+
+SVGPathSegMovetoRel::~SVGPathSegMovetoRel()
+{
+ delete impl;
+}
+
+void SVGPathSegMovetoRel::setX(const float &x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPathSegMovetoRel::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPathSegMovetoRel::setY(const float &y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPathSegMovetoRel::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPathSegMoveto.h b/ksvg/dom/SVGPathSegMoveto.h
new file mode 100644
index 00000000..874443c3
--- /dev/null
+++ b/ksvg/dom/SVGPathSegMoveto.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegMoveto_H
+#define SVGPathSegMoveto_H
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathSegMovetoAbsImpl;
+class SVGPathSegMovetoAbs : public SVGPathSeg
+{
+public:
+ SVGPathSegMovetoAbs();
+ SVGPathSegMovetoAbs(const SVGPathSegMovetoAbs &);
+ SVGPathSegMovetoAbs &operator=(const SVGPathSegMovetoAbs &other);
+ SVGPathSegMovetoAbs(SVGPathSegMovetoAbsImpl *);
+ ~SVGPathSegMovetoAbs();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegMovetoAbsImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegMovetoAbsImpl *impl;
+};
+
+class SVGPathSegMovetoRelImpl;
+class SVGPathSegMovetoRel : public SVGPathSeg
+{
+public:
+ SVGPathSegMovetoRel();
+ SVGPathSegMovetoRel(const SVGPathSegMovetoRel &);
+ SVGPathSegMovetoRel &operator=(const SVGPathSegMovetoRel &other);
+ SVGPathSegMovetoRel(SVGPathSegMovetoRelImpl *);
+ ~SVGPathSegMovetoRel();
+
+ void setX(const float &);
+ float x() const;
+
+ void setY(const float &);
+ float y() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPathSegMovetoRelImpl *handle() const { return impl; }
+
+private:
+ SVGPathSegMovetoRelImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPatternElement.cc b/ksvg/dom/SVGPatternElement.cc
new file mode 100644
index 00000000..fc387a97
--- /dev/null
+++ b/ksvg/dom/SVGPatternElement.cc
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPatternElement.h"
+#include "SVGPatternElementImpl.h"
+#include "SVGAnimatedTransformList.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedEnumeration.h"
+
+using namespace KSVG;
+
+SVGPatternElement::SVGPatternElement() : SVGElement(), SVGURIReference(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGFitToViewBox(), SVGUnitTypes()
+{
+ impl = 0;
+}
+
+SVGPatternElement::SVGPatternElement(const SVGPatternElement &other) : SVGElement(other), SVGURIReference(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other), SVGUnitTypes(), impl(0)
+{
+ (*this) = other;
+}
+
+SVGPatternElement &SVGPatternElement::operator =(const SVGPatternElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGFitToViewBox::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPatternElement::SVGPatternElement(SVGPatternElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other), SVGUnitTypes()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPatternElement::~SVGPatternElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedEnumeration SVGPatternElement::patternUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->patternUnits());
+}
+
+SVGAnimatedEnumeration SVGPatternElement::patternContentUnits() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->patternContentUnits());
+}
+
+SVGAnimatedTransformList SVGPatternElement::patternTransform() const
+{
+ if(!impl) return SVGAnimatedTransformList(0);
+ return SVGAnimatedTransformList(impl->patternTransform());
+}
+
+SVGAnimatedLength SVGPatternElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGPatternElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGPatternElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGPatternElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPatternElement.h b/ksvg/dom/SVGPatternElement.h
new file mode 100644
index 00000000..9caf5c14
--- /dev/null
+++ b/ksvg/dom/SVGPatternElement.h
@@ -0,0 +1,188 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGPatternElement_H
+#define SVGPatternElement_H
+
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGFitToViewBox.h"
+#include "SVGUnitTypes.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumeration;
+class SVGAnimatedTransformList;
+class SVGAnimatedLength;
+class SVGPatternElementImpl;
+
+/**
+ * A pattern is used to fill or stroke an object using a pre-defined graphic object which can be
+ * replicated ("tiled") at fixed intervals in x and y to cover the areas to be painted.
+ *
+ * Patterns are defined using a 'pattern' element and then referenced by properties 'fill' and 'stroke'
+ * on a given graphics element to indicate that the given element shall be filled or stroked with the
+ * referenced pattern.
+ */
+class SVGPatternElement : public SVGElement,
+ public SVGURIReference,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGFitToViewBox,
+ public SVGUnitTypes
+{
+public:
+ SVGPatternElement();
+ SVGPatternElement(const SVGPatternElement &other);
+ SVGPatternElement &operator=(const SVGPatternElement &other);
+ SVGPatternElement(SVGPatternElementImpl *other);
+ virtual ~SVGPatternElement();
+
+ /**
+ * Defines the coordinate system for attributes <code>x</code>, <code>y</code>, <code>width</code>, <code>height</code>.
+ * If patternUnits="userSpaceOnUse", <code>x</code>, <code>y</code>, <code>width</code>, <code>height</code> represent
+ * values in the coordinate system that results from taking the current user coordinate system in place at the time when
+ * the 'pattern' element is referenced (i.e., the user coordinate system for the element referencing the 'pattern' element
+ * via a 'fill' or 'stroke' property) and then applying the transform specified by attribute patternTransform.
+ * If patternUnits="objectBoundingBox", the user coordinate system for attributes <code>x</code>, <code>y</code>, <code>width</code>,
+ * <code>height</code> is established using the bounding box of the element to which the pattern is applied and then applying
+ * the transform specified by attribute <code>patternTransform</code>.
+ * If attribute <code>patternUnits</code> is not specified, then the effect is as if a value of objectBoundingBox were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The current target coordinate system mode.
+ */
+ SVGAnimatedEnumeration patternUnits() const;
+
+ /**
+ * Defines the coordinate system for the contents of the 'pattern'. Note that this attribute has no effect
+ * if attribute <code>viewBox</code> is specified.
+ * If patternContentUnits="userSpaceOnUse", the user coordinate system for the contents of the 'pattern' element
+ * is the coordinate system that results from taking the current user coordinate system in place at the time
+ * when the 'pattern' element is referenced (i.e., the user coordinate system for the element referencing the
+ * 'pattern' element via a 'fill' or 'stroke' property) and then applying the transform specified by attribute
+ * <code>patternTransform</code>.
+ * If patternContentUnits="objectBoundingBox", the user coordinate system for the contents of the 'pattern' element
+ * is established using the bounding box of the element to which the pattern is applied and then applying the
+ * transform specified by attribute <code>patternTransform</code>.
+ * If attribute <code>patternContentUnits</code> is not specified, then the effect is as if a value of
+ * userSpaceOnUse were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The current content coordinate system mode.
+ */
+ SVGAnimatedEnumeration patternContentUnits() const;
+
+ /**
+ * Contains the definition of an optional additional transformation from the pattern coordinate
+ * system onto the target coordinate system (i.e., userSpaceOnUse or objectBoundingBox).
+ * This allows for things such as skewing the pattern tiles. This additional transformation
+ * matrix is post-multiplied to (i.e., inserted to the right of) any previously defined
+ * transformations, including the implicit transformation necessary to convert from object
+ * bounding box units to user space.
+ * If attribute <code>patternTransform</code> is not specified, then the effect is as if an identity transform
+ * were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The transformation list that is applied to the pattern tile.
+ */
+ SVGAnimatedTransformList patternTransform() const;
+
+ /**
+ * The attributes <code>x</code>, <code>y</code>, <code>width</code>, <code>height</code>
+ * indicate how the pattern tiles are placed and spaced.
+ * These attributes represent coordinates and values in the coordinate space specified by
+ * the combination of attributes <code>patternUnits</code> and <code>patternTransform</code>.
+ * If the attribute is not specified, the effect is as if a value of zero were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the pattern tile.
+ */
+ SVGAnimatedLength x() const;
+
+ /**
+ * @see x
+ * If the attribute is not specified, the effect is as if a value of zero were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the pattern tile.
+ */
+ SVGAnimatedLength y() const;
+
+ /**
+ * @see x
+ * A negative value is an error. A value of zero disables rendering of
+ * the element (i.e., no paint is applied).
+ *
+ * If the attribute is not specified, the effect is as if a value of zero were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The width of the pattern tile.
+ */
+ SVGAnimatedLength width() const;
+
+ /**
+ * @see x
+ * A negative value is an error. A value of zero disables rendering of
+ * the element (i.e., no paint is applied).
+ *
+ * If the attribute is not specified, the effect is as if a value of zero were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The height coordinate of the pattern tile.
+ */
+ SVGAnimatedLength height() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPatternElementImpl *handle() const { return impl; }
+
+private:
+ SVGPatternElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPoint.cc b/ksvg/dom/SVGPoint.cc
new file mode 100644
index 00000000..ac194e7e
--- /dev/null
+++ b/ksvg/dom/SVGPoint.cc
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPoint.h"
+#include "SVGMatrix.h"
+#include "SVGPointImpl.h"
+
+using namespace KSVG;
+
+SVGPoint::SVGPoint()
+{
+ impl = new SVGPointImpl();
+ impl->ref();
+}
+
+SVGPoint::SVGPoint(const SVGPoint &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGPoint &SVGPoint::operator=(const SVGPoint &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPoint::SVGPoint(SVGPointImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPoint::~SVGPoint()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGPoint::setX(float x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGPoint::x()
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGPoint::setY(float y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGPoint::y()
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+SVGPoint SVGPoint::matrixTransform(SVGMatrix &matrix)
+{
+ if(!impl) return SVGPoint(0);
+ return SVGPoint(impl->matrixTransform(*matrix.handle()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPoint.h b/ksvg/dom/SVGPoint.h
new file mode 100644
index 00000000..84b38e86
--- /dev/null
+++ b/ksvg/dom/SVGPoint.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPoint_H
+#define SVGPoint_H
+
+namespace KSVG
+{
+
+class SVGMatrix;
+class SVGPointImpl;
+class SVGPoint
+{
+public:
+ SVGPoint();
+ SVGPoint(const SVGPoint &);
+ SVGPoint &operator=(const SVGPoint &);
+ SVGPoint(SVGPointImpl *);
+ ~SVGPoint();
+
+ void setX(float x);
+ float x();
+
+ void setY(float y);
+ float y();
+
+ SVGPoint matrixTransform(SVGMatrix &matrix);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPointImpl *handle() const { return impl; }
+
+private:
+ SVGPointImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPointList.cc b/ksvg/dom/SVGPointList.cc
new file mode 100644
index 00000000..963b1c60
--- /dev/null
+++ b/ksvg/dom/SVGPointList.cc
@@ -0,0 +1,114 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPoint.h"
+#include "SVGPointImpl.h"
+#include "SVGPointList.h"
+#include "SVGPointListImpl.h"
+
+using namespace KSVG;
+
+SVGPointList::SVGPointList()
+{
+ impl = new SVGPointListImpl();
+ impl->ref();
+}
+
+SVGPointList::SVGPointList(const SVGPointList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGPointList &SVGPointList::operator=(const SVGPointList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPointList::SVGPointList(SVGPointListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPointList::~SVGPointList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGPointList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGPointList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+SVGPoint *SVGPointList::initialize(SVGPoint *newItem)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->initialize(newItem->handle()));
+}
+
+SVGPoint *SVGPointList::getItem(unsigned long index)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->getItem(index));
+}
+
+SVGPoint *SVGPointList::insertItemBefore(SVGPoint *newItem, unsigned long index)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->insertItemBefore(newItem->handle(), index));
+}
+
+SVGPoint *SVGPointList::replaceItem(SVGPoint *newItem, unsigned long index)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->replaceItem(newItem->handle(), index));
+}
+
+SVGPoint *SVGPointList::removeItem(unsigned long index)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->removeItem(index));
+}
+
+SVGPoint *SVGPointList::appendItem(SVGPoint *newItem)
+{
+ if(!impl) return new SVGPoint(0);
+ return new SVGPoint(impl->appendItem(newItem->handle()));
+}
diff --git a/ksvg/dom/SVGPointList.h b/ksvg/dom/SVGPointList.h
new file mode 100644
index 00000000..cfdec4c5
--- /dev/null
+++ b/ksvg/dom/SVGPointList.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPointList_H
+#define SVGPointList_H
+
+namespace KSVG
+{
+
+class SVGPoint;
+class SVGPointListImpl;
+class SVGPointList
+{
+public:
+ SVGPointList();
+ SVGPointList(const SVGPointList &);
+ SVGPointList &operator=(const SVGPointList &);
+ SVGPointList(SVGPointListImpl *);
+ ~SVGPointList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+
+ SVGPoint *initialize(SVGPoint *newItem);
+ SVGPoint *getItem(unsigned long index);
+ SVGPoint *insertItemBefore(SVGPoint *newItem, unsigned long index);
+ SVGPoint *replaceItem(SVGPoint *newItem, unsigned long index);
+ SVGPoint *removeItem(unsigned long index);
+ SVGPoint *appendItem(SVGPoint *newItem);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPointListImpl *handle() const { return impl; }
+
+private:
+ SVGPointListImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGPolygonElement.cc b/ksvg/dom/SVGPolygonElement.cc
new file mode 100644
index 00000000..043c19df
--- /dev/null
+++ b/ksvg/dom/SVGPolygonElement.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGPolygonElement.h"
+#include "SVGPolygonElementImpl.h"
+#include "SVGPointList.h"
+
+using namespace KSVG;
+
+SVGPolygonElement::SVGPolygonElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGAnimatedPoints()
+{
+ impl = 0;
+}
+
+SVGPolygonElement::SVGPolygonElement(const SVGPolygonElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPoints(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGPolygonElement &SVGPolygonElement::operator=(const SVGPolygonElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+ SVGAnimatedPoints::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+ return *this;
+}
+
+SVGPolygonElement::SVGPolygonElement(SVGPolygonElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPoints(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPolygonElement::~SVGPolygonElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGPointList SVGPolygonElement::points()
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->points());
+}
+
+SVGPointList SVGPolygonElement::animatedPoints()
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->animatedPoints());
+}
diff --git a/ksvg/dom/SVGPolygonElement.h b/ksvg/dom/SVGPolygonElement.h
new file mode 100644
index 00000000..526e9815
--- /dev/null
+++ b/ksvg/dom/SVGPolygonElement.h
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGPolygonElement_H
+#define SVGPolygonElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGAnimatedPoints.h"
+
+namespace KSVG
+{
+
+class SVGPointList;
+class SVGPolygonElementImpl;
+
+/**
+ * The <code>polygon</code> element defines a closed shape consisting
+ * of connected straight line segments.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.7 The
+ * 'polygon' element</a>.
+ */
+class SVGPolygonElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGAnimatedPoints
+{
+public:
+ SVGPolygonElement();
+ SVGPolygonElement(const SVGPolygonElement &);
+ SVGPolygonElement &operator=(const SVGPolygonElement &);
+ SVGPolygonElement(SVGPolygonElementImpl *);
+ ~SVGPolygonElement();
+
+ /**
+ * Provides access to the base (i.e., static) contents of the
+ * points attribute.
+ *
+ * @return A static list of the polygons points
+ */
+ SVGPointList points();
+
+ /**
+ * Provides access to the current animated contents of the points
+ * attribute.
+ * If the given attribute or property is being animated, contains
+ * the current animated value of the attribute or property.
+ * If the given attribute or property is not currently being
+ * animated, contains the same value as <code>points</code>'.
+ *
+ * This attribute is animatable.
+ *
+ * @return A list of the polygons points
+ */
+ SVGPointList animatedPoints();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPolygonElementImpl *handle() const { return impl; }
+
+private:
+ SVGPolygonElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPolylineElement.cc b/ksvg/dom/SVGPolylineElement.cc
new file mode 100644
index 00000000..789c5847
--- /dev/null
+++ b/ksvg/dom/SVGPolylineElement.cc
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGPolylineElement.h"
+#include "SVGPolylineElementImpl.h"
+#include "SVGPointList.h"
+
+using namespace KSVG;
+
+SVGPolylineElement::SVGPolylineElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGAnimatedPoints()
+{
+ impl = 0;
+}
+
+SVGPolylineElement::SVGPolylineElement(const SVGPolylineElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPoints(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGPolylineElement &SVGPolylineElement::operator=(const SVGPolylineElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+ SVGAnimatedPoints::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGPolylineElement::SVGPolylineElement(SVGPolylineElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGAnimatedPoints(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGPolylineElement::~SVGPolylineElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGPointList SVGPolylineElement::points()
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->points());
+}
+
+SVGPointList SVGPolylineElement::animatedPoints()
+{
+ if(!impl) return SVGPointList(0);
+ return SVGPointList(impl->animatedPoints());
+}
diff --git a/ksvg/dom/SVGPolylineElement.h b/ksvg/dom/SVGPolylineElement.h
new file mode 100644
index 00000000..35e948f7
--- /dev/null
+++ b/ksvg/dom/SVGPolylineElement.h
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGPolylineElement_H
+#define SVGPolylineElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGAnimatedPoints.h"
+
+namespace KSVG
+{
+
+/**
+ * The <code>polyline</code> element defines a set of connected
+ * straight line segments. Typically, <code>polyline</code> elements
+ * define open shapes.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.6 The
+ * 'polyline' element</a>.
+ */
+class SVGPointList;
+class SVGPolylineElementImpl;
+class SVGPolylineElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGAnimatedPoints
+{
+public:
+ SVGPolylineElement();
+ SVGPolylineElement(const SVGPolylineElement &);
+ SVGPolylineElement &operator=(const SVGPolylineElement &);
+ SVGPolylineElement(SVGPolylineElementImpl *);
+ ~SVGPolylineElement();
+
+ /**
+ * Provides access to the base (i.e., static) contents of the
+ * points attribute.
+ *
+ * @return A static list of the polygons points
+ */
+ SVGPointList points();
+
+ /**
+ * Provides access to the current animated contents of the points
+ * attribute.
+ * If the given attribute or property is being animated, contains
+ * the current animated value of the attribute or property.
+ * If the given attribute or property is not currently being
+ * animated, contains the same value as <code>points</code>'.
+ *
+ * This attribute is animatable.
+ *
+ * @return A list of the polygons points
+ */
+ SVGPointList animatedPoints();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPolylineElementImpl *handle() const { return impl; }
+
+private:
+ SVGPolylineElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPreserveAspectRatio.cc b/ksvg/dom/SVGPreserveAspectRatio.cc
new file mode 100644
index 00000000..f86ca1b4
--- /dev/null
+++ b/ksvg/dom/SVGPreserveAspectRatio.cc
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPreserveAspectRatio.h"
+#include "SVGPreserveAspectRatioImpl.h"
+
+using namespace KSVG;
+
+SVGPreserveAspectRatio::SVGPreserveAspectRatio()
+{
+ impl = new SVGPreserveAspectRatioImpl();
+}
+
+SVGPreserveAspectRatio::SVGPreserveAspectRatio(const SVGPreserveAspectRatio &other)
+{
+ impl = other.impl;
+}
+
+SVGPreserveAspectRatio &SVGPreserveAspectRatio::operator=(const SVGPreserveAspectRatio &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGPreserveAspectRatio::SVGPreserveAspectRatio(SVGPreserveAspectRatioImpl *other)
+{
+ impl = other;
+}
+
+SVGPreserveAspectRatio::~SVGPreserveAspectRatio()
+{
+ delete impl;
+}
+
+void SVGPreserveAspectRatio::setAlign(unsigned short align)
+{
+ if(impl)
+ impl->setAlign(align);
+}
+
+unsigned short SVGPreserveAspectRatio::align() const
+{
+ if(!impl) return SVG_PRESERVEASPECTRATIO_UNKNOWN;
+ return impl->align();
+}
+
+void SVGPreserveAspectRatio::setMeetOrSlice(unsigned short meetOrSlice)
+{
+ if(impl)
+ impl->setMeetOrSlice(meetOrSlice);
+}
+
+unsigned short SVGPreserveAspectRatio::meetOrSlice() const
+{
+ if(!impl) return SVG_MEETORSLICE_UNKNOWN;
+ return impl->meetOrSlice();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGPreserveAspectRatio.h b/ksvg/dom/SVGPreserveAspectRatio.h
new file mode 100644
index 00000000..3c1a4823
--- /dev/null
+++ b/ksvg/dom/SVGPreserveAspectRatio.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPreserveAspectRatio_H
+#define SVGPreserveAspectRatio_H
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
+ SVG_PRESERVEASPECTRATIO_NONE = 1,
+ SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
+ SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
+ SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
+ SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
+ SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
+ SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
+ SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
+ SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
+};
+
+enum
+{
+ SVG_MEETORSLICE_UNKNOWN = 0,
+ SVG_MEETORSLICE_MEET = 1,
+ SVG_MEETORSLICE_SLICE = 2
+};
+
+class SVGPreserveAspectRatioImpl;
+class SVGPreserveAspectRatio
+{
+public:
+ SVGPreserveAspectRatio();
+ SVGPreserveAspectRatio(const SVGPreserveAspectRatio &);
+ SVGPreserveAspectRatio &operator=(const SVGPreserveAspectRatio &other);
+ SVGPreserveAspectRatio(SVGPreserveAspectRatioImpl *);
+ ~SVGPreserveAspectRatio();
+
+ void setAlign(unsigned short);
+ unsigned short align() const;
+
+ void setMeetOrSlice(unsigned short);
+ unsigned short meetOrSlice() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGPreserveAspectRatioImpl *handle() const { return impl; }
+
+protected:
+ SVGPreserveAspectRatioImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRadialGradientElement.cc b/ksvg/dom/SVGRadialGradientElement.cc
new file mode 100644
index 00000000..02f3d5f2
--- /dev/null
+++ b/ksvg/dom/SVGRadialGradientElement.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGRadialGradientElement.h"
+#include "SVGRadialGradientElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGRadialGradientElement::SVGRadialGradientElement() : SVGGradientElement()
+{
+ impl = 0;
+}
+
+SVGRadialGradientElement::SVGRadialGradientElement(const SVGRadialGradientElement &other) : SVGGradientElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGRadialGradientElement &SVGRadialGradientElement::operator =(const SVGRadialGradientElement &other)
+{
+ SVGGradientElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGRadialGradientElement::SVGRadialGradientElement(SVGRadialGradientElementImpl *other) : SVGGradientElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGRadialGradientElement::~SVGRadialGradientElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGRadialGradientElement::cx() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cx());
+}
+
+SVGAnimatedLength SVGRadialGradientElement::cy() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->cy());
+}
+
+SVGAnimatedLength SVGRadialGradientElement::r() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->r());
+}
+
+SVGAnimatedLength SVGRadialGradientElement::fx() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->fx());
+}
+
+SVGAnimatedLength SVGRadialGradientElement::fy() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->fy());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRadialGradientElement.h b/ksvg/dom/SVGRadialGradientElement.h
new file mode 100644
index 00000000..c60a00ed
--- /dev/null
+++ b/ksvg/dom/SVGRadialGradientElement.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGRadialGradientElement_H
+#define SVGRadialGradientElement_H
+
+#include "SVGGradientElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGRadialGradientElementImpl;
+class SVGRadialGradientElement : public SVGGradientElement
+{
+public:
+ SVGRadialGradientElement();
+ SVGRadialGradientElement(const SVGRadialGradientElement &other);
+ SVGRadialGradientElement &operator=(const SVGRadialGradientElement &other);
+ SVGRadialGradientElement(SVGRadialGradientElementImpl *other);
+ virtual ~SVGRadialGradientElement();
+
+ SVGAnimatedLength cx() const;
+ SVGAnimatedLength cy() const;
+ SVGAnimatedLength r() const;
+ SVGAnimatedLength fx() const;
+ SVGAnimatedLength fy() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGRadialGradientElementImpl *handle() const { return impl; }
+
+private:
+ SVGRadialGradientElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRect.cc b/ksvg/dom/SVGRect.cc
new file mode 100644
index 00000000..39ba48a4
--- /dev/null
+++ b/ksvg/dom/SVGRect.cc
@@ -0,0 +1,114 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGRect.h"
+#include "SVGRectImpl.h"
+
+using namespace KSVG;
+
+SVGRect::SVGRect()
+{
+ impl = new SVGRectImpl();
+ impl->ref();
+}
+
+SVGRect::SVGRect(const SVGRect &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGRect &SVGRect::operator=(const SVGRect &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGRect::SVGRect(SVGRectImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGRect::~SVGRect()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGRect::setX(float x)
+{
+ if(impl)
+ impl->setX(x);
+}
+
+float SVGRect::x() const
+{
+ if(!impl) return -1;
+ return impl->x();
+}
+
+void SVGRect::setY(float y)
+{
+ if(impl)
+ impl->setY(y);
+}
+
+float SVGRect::y() const
+{
+ if(!impl) return -1;
+ return impl->y();
+}
+
+void SVGRect::setWidth(float width)
+{
+ if(impl)
+ impl->setWidth(width);
+}
+
+float SVGRect::width() const
+{
+ if(!impl) return -1;
+ return impl->width();
+}
+
+void SVGRect::setHeight(float height)
+{
+ if(impl)
+ impl->setHeight(height);
+}
+
+float SVGRect::height() const
+{
+ if(!impl) return -1;
+ return impl->height();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRect.h b/ksvg/dom/SVGRect.h
new file mode 100644
index 00000000..e9be6849
--- /dev/null
+++ b/ksvg/dom/SVGRect.h
@@ -0,0 +1,87 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGRect_H
+#define SVGRect_H
+
+namespace KSVG
+{
+
+/**
+ * Rectangles are defined as consisting of a (x,y) coordinate pair
+ * identifying a minimum X value, a minimum Y value, and a width and
+ * height, which are usually constrained to be non-negative.
+ */
+class SVGRectImpl;
+class SVGRect
+{
+public:
+ SVGRect();
+ SVGRect(const SVGRect &);
+ SVGRect &operator=(const SVGRect &);
+ SVGRect(SVGRectImpl *);
+ ~SVGRect();
+
+ /**
+ * Corresponds to attribute <code>x</code> on the given element.
+ */
+ void setX(float x);
+ float x() const;
+
+ /**
+ * Corresponds to attribute <code>y</code> on the given element.
+ */
+ void setY(float y);
+ float y() const;
+
+ /**
+ * Corresponds to attribute <code>width</code> on the given element.
+ */
+ void setWidth(float width);
+ float width() const;
+
+ /**
+ * Corresponds to attribute <code>height</code> on the given element.
+ */
+ void setHeight(float height);
+ float height() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGRectImpl *handle() const { return impl; }
+
+private:
+ SVGRectImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRectElement.cc b/ksvg/dom/SVGRectElement.cc
new file mode 100644
index 00000000..ef4038d4
--- /dev/null
+++ b/ksvg/dom/SVGRectElement.cc
@@ -0,0 +1,109 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGRectElement.h"
+#include "SVGRectElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGRectElement::SVGRectElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGRectElement::SVGRectElement(const SVGRectElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGRectElement &SVGRectElement::operator=(const SVGRectElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGRectElement::SVGRectElement(SVGRectElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGRectElement::~SVGRectElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGRectElement::x()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGRectElement::y()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGRectElement::width()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGRectElement::height()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+SVGAnimatedLength SVGRectElement::rx()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->rx());
+}
+
+SVGAnimatedLength SVGRectElement::ry()
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->ry());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRectElement.h b/ksvg/dom/SVGRectElement.h
new file mode 100644
index 00000000..2a77420d
--- /dev/null
+++ b/ksvg/dom/SVGRectElement.h
@@ -0,0 +1,173 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+#ifndef SVGRectElement_H
+#define SVGRectElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGRectElementImpl;
+
+/**
+ * The <code> rect </code> element defines a rectangle which is
+ * axis-aligned with the current <a href =
+ * "http://www.w3.org/TR/SVG/intro.html#TermUserCoordinateSystem">
+ * user coordinate</a> system.
+ * Rounded rectangles can be achieved by setting appropriate values
+ * for attributes <code> x </code> and <code> y</code>.
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/shapes.html#RectElement"> 9.2 The
+ * 'rect' element</a>.
+ */
+class SVGRectElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGRectElement();
+ SVGRectElement(const SVGRectElement &);
+ SVGRectElement &operator=(const SVGRectElement &other);
+ SVGRectElement(SVGRectElementImpl *);
+ ~SVGRectElement();
+
+ /**
+ * The x-axis coordinate of the side of the rectangle which has
+ * the smaller x-axis coordinate value in the current user
+ * coordinate system.
+ * If the attribute is not specified, the effect is as if a value
+ * of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the rectangle.
+ */
+ SVGAnimatedLength x();
+
+ /**
+ * The y-axis coordinate of the side of the rectangle which has
+ * the smaller y-axis coordinate value in the current user
+ * coordinate system. If the attribute is not specified, the
+ * effect is as if a value of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the rectangle.
+ */
+ SVGAnimatedLength y();
+
+ /**
+ * The width of the rectangle. A negative value is an error (see
+ * <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">
+ * Error processing</a>).
+ * A value of zero disables rendering of the element.
+ *
+ * This attribute is animatable.
+ *
+ * @return The width of the rectangle.
+ */
+ SVGAnimatedLength width();
+
+ /**
+ * The heigth of the rectangle. A negative value is an error (see
+ * <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">
+ * Error processing</a>). A value of zero disables rendering of
+ * the element.
+ *
+ * This attribute is animatable.
+ *
+ * @return The height of the rectangle
+ */
+ SVGAnimatedLength height();
+
+ /**
+ * For rounded rectangles, the x-axis radius of the ellipse used
+ * to round off the corners of the rectangle. A negative value is
+ * an error (see <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error
+ * processing</a>).
+ *
+ * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">
+ * 9.2 The 'rect' element </a> for info about what happens if the
+ * attribute is not specified.
+ *
+ * This attribute is animatable
+ *
+ * @return The x-axis radius of the ellipse used to round off the
+ * corners of the rectangle.
+ */
+ SVGAnimatedLength rx();
+
+ /**
+ * For rounded rectangles, the y-axis radius of the ellipse used
+ * to round off the corners of the rectangle. A negative value is
+ * an error (see <a href =
+ * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">Error
+ * processing</a>).
+ *
+ * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">
+ * 9.2 The 'rect' element </a> for info about what happens if the
+ * attribute is not specified.
+ *
+ * This attribute is animatable
+ *
+ * @return The y-axis radius of the ellipse used to round off the
+ * corners of the rectangle.
+ */
+ SVGAnimatedLength ry();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGRectElementImpl *handle() const { return impl; }
+
+private:
+ SVGRectElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGRenderingIntent.h b/ksvg/dom/SVGRenderingIntent.h
new file mode 100644
index 00000000..5293f92b
--- /dev/null
+++ b/ksvg/dom/SVGRenderingIntent.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGRenderingIntent_H
+#define SVGRenderingIntent_H
+
+namespace KSVG
+{
+
+enum
+{
+ RENDERING_INTENT_UNKNOWN = 0,
+ RENDERING_INTENT_AUTO = 1,
+ RENDERING_INTENT_PERCEPTUAL = 2,
+ RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,
+ RENDERING_INTENT_SATURATION = 4,
+ RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSVGElement.cc b/ksvg/dom/SVGSVGElement.cc
new file mode 100644
index 00000000..204de90c
--- /dev/null
+++ b/ksvg/dom/SVGSVGElement.cc
@@ -0,0 +1,337 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGRect.h"
+#include "SVGSVGElement.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedLength.h"
+#include "SVGPoint.h"
+#include "SVGNumber.h"
+#include "SVGAngle.h"
+#include "SVGMatrix.h"
+#include "SVGLength.h"
+#include "SVGRect.h"
+#include "SVGTransform.h"
+#include "SVGViewSpec.h"
+#include <kdebug.h>
+
+using namespace KSVG;
+
+SVGSVGElement::SVGSVGElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGLocatable(), SVGFitToViewBox(), SVGZoomAndPan()
+{
+ impl = 0;
+}
+
+SVGSVGElement::SVGSVGElement(const SVGSVGElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGLocatable(other), SVGFitToViewBox(other), SVGZoomAndPan(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGSVGElement &SVGSVGElement::operator=(const SVGSVGElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGLocatable::operator=(other);
+ SVGFitToViewBox::operator=(other);
+ SVGZoomAndPan::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGSVGElement::SVGSVGElement(SVGSVGElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGLocatable(other), SVGFitToViewBox(other), SVGZoomAndPan(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGSVGElement::~SVGSVGElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGSVGElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGSafeCreator<SVGAnimatedLength, SVGAnimatedLengthImpl>::create(impl->x());
+}
+
+SVGAnimatedLength SVGSVGElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGSafeCreator<SVGAnimatedLength, SVGAnimatedLengthImpl>::create(impl->y());
+}
+
+SVGAnimatedLength SVGSVGElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGSafeCreator<SVGAnimatedLength, SVGAnimatedLengthImpl>::create(impl->width());
+}
+
+SVGAnimatedLength SVGSVGElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGSafeCreator<SVGAnimatedLength, SVGAnimatedLengthImpl>::create(impl->height());
+}
+
+void SVGSVGElement::setContentScriptType(const DOM::DOMString &contentScriptType)
+{
+ if(impl)
+ setContentScriptType(contentScriptType);
+}
+
+DOM::DOMString SVGSVGElement::contentScriptType() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->contentScriptType();
+}
+
+void SVGSVGElement::setContentStyleType(const DOM::DOMString &contentStyleType)
+{
+ if(impl)
+ setContentStyleType(contentStyleType);
+}
+
+DOM::DOMString SVGSVGElement::contentStyleType() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->contentStyleType();
+}
+
+SVGRect SVGSVGElement::viewport() const
+{
+ if(!impl) return SVGRect(0);
+ return SVGRect(impl->viewport());
+}
+
+float SVGSVGElement::pixelUnitToMillimeterX() const
+{
+ if(!impl) return -1;
+ return impl->pixelUnitToMillimeterX();
+}
+
+float SVGSVGElement::pixelUnitToMillimeterY() const
+{
+ if(!impl) return -1;
+ return impl->pixelUnitToMillimeterY();
+}
+
+float SVGSVGElement::screenPixelToMillimeterX() const
+{
+ if(!impl) return -1;
+ return impl->screenPixelToMillimeterX();
+}
+
+float SVGSVGElement::screenPixelToMillimeterY() const
+{
+ if(!impl) return -1;
+ return impl->screenPixelToMillimeterY();
+}
+
+void SVGSVGElement::setUseCurrentView(bool useCurrentView)
+{
+ if(impl)
+ impl->setUseCurrentView(useCurrentView);
+}
+
+bool SVGSVGElement::useCurrentView() const
+{
+ if(!impl) return false;
+ return impl->useCurrentView();
+}
+
+SVGViewSpec SVGSVGElement::currentView() const
+{
+ if(!impl) return SVGViewSpec(0);
+ return impl->currentView();
+}
+
+void SVGSVGElement::setCurrentScale(float currentScale)
+{
+ if(impl)
+ impl->setCurrentScale(currentScale);
+}
+
+float SVGSVGElement::currentScale() const
+{
+ if(!impl) return -1;
+ return impl->currentScale();
+}
+
+SVGPoint SVGSVGElement::currentTranslate() const
+{
+ if(!impl) return SVGPoint(0);
+ return SVGSafeCreator<SVGPoint, SVGPointImpl>::create(impl->currentTranslate());
+}
+
+unsigned long SVGSVGElement::suspendRedraw(unsigned long time)
+{
+ if(!impl) return 0;
+ return impl->suspendRedraw(time);
+}
+
+void SVGSVGElement::unsuspendRedraw(unsigned long id)
+{
+ if(impl)
+ impl->unsuspendRedraw(id);
+}
+
+void SVGSVGElement::unsuspendRedrawAll()
+{
+ if(impl)
+ impl->unsuspendRedrawAll();
+}
+
+void SVGSVGElement::forceRedraw()
+{
+ if(impl)
+ impl->forceRedraw();
+}
+
+void SVGSVGElement::pauseAnimations()
+{
+ if(impl)
+ impl->pauseAnimations();
+}
+
+void SVGSVGElement::unpauseAnimations()
+{
+ if(impl)
+ impl->unpauseAnimations();
+}
+
+bool SVGSVGElement::animationsPaused()
+{
+ if(!impl) return false;
+ return impl->animationsPaused();
+}
+
+float SVGSVGElement::getCurrentTime()
+{
+ if(!impl) return -1;
+ return impl->getCurrentTime();
+}
+
+void SVGSVGElement::setCurrentTime(float time)
+{
+ if(impl)
+ impl->setCurrentTime(time);
+}
+
+DOM::NodeList SVGSVGElement::getIntersectionList(const SVGRect &rect,const SVGElement &referenceElement)
+{
+ if(!impl) return DOM::NodeList();
+ return impl->getIntersectionList(rect.handle(), referenceElement.handle());
+}
+
+DOM::NodeList SVGSVGElement::getEnclosureList(const SVGRect &rect,const SVGElement &referenceElement)
+{
+ if(!impl) return DOM::NodeList();
+ return impl->getEnclosureList(rect.handle(), referenceElement.handle());
+}
+
+bool SVGSVGElement::checkIntersection(const SVGElement &element,const SVGRect &rect)
+{
+ if(!impl) return false;
+ return impl->checkIntersection(element.handle(), rect.handle());
+}
+
+bool SVGSVGElement::checkEnclosure(const SVGElement &element,const SVGRect &rect)
+{
+ if(!impl) return false;
+ return impl->checkEnclosure(element.handle(), rect.handle());
+}
+
+void SVGSVGElement::deSelectAll()
+{
+ if(impl)
+ impl->deSelectAll();
+}
+
+SVGNumber SVGSVGElement::createSVGNumber()
+{
+ if(!impl) return SVGNumber(0);
+ return SVGSafeCreator<SVGNumber, SVGNumberImpl>::create(impl->createSVGNumber());
+}
+
+SVGLength SVGSVGElement::createSVGLength()
+{
+ if(!impl) return SVGLength(0);
+ return SVGSafeCreator<SVGLength, SVGLengthImpl>::create(impl->createSVGLength());
+}
+
+SVGAngle SVGSVGElement::createSVGAngle()
+{
+ if(!impl) return SVGAngle(0);
+ return SVGSafeCreator<SVGAngle, SVGAngleImpl>::create(impl->createSVGAngle());
+}
+
+SVGPoint SVGSVGElement::createSVGPoint()
+{
+ if(!impl) return SVGPoint(0);
+ return SVGSafeCreator<SVGPoint, SVGPointImpl>::create(impl->createSVGPoint());
+}
+
+SVGMatrix SVGSVGElement::createSVGMatrix()
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGSafeCreator<SVGMatrix, SVGMatrixImpl>::create(impl->createSVGMatrix());
+}
+
+SVGRect SVGSVGElement::createSVGRect()
+{
+ if(!impl) return SVGRect(0);
+ return SVGSafeCreator<SVGRect, SVGRectImpl>::create(impl->createSVGRect());
+}
+
+SVGTransform SVGSVGElement::createSVGTransform()
+{
+ if(!impl) return SVGTransform(0);
+ return SVGSafeCreator<SVGTransform, SVGTransformImpl>::create(impl->createSVGTransform());
+}
+
+SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const SVGMatrix &matrix)
+{
+ if(!impl) return SVGTransform(0);
+ return SVGSafeCreator<SVGTransform, SVGTransformImpl>::create(impl->createSVGTransformFromMatrix(matrix.handle()));
+}
+
+SVGElement SVGSVGElement::getElementById(const DOM::DOMString &elementId)
+{
+ if(!impl) return SVGElement(0);
+ return SVGSafeCreator<SVGElement, SVGElementImpl>::create(impl->getElementById(elementId));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSVGElement.h b/ksvg/dom/SVGSVGElement.h
new file mode 100644
index 00000000..59621e2e
--- /dev/null
+++ b/ksvg/dom/SVGSVGElement.h
@@ -0,0 +1,581 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGSVGElement_H
+#define SVGSVGElement_H
+
+#include <dom/dom_string.h>
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGLocatable.h"
+#include "SVGFitToViewBox.h"
+#include "SVGZoomAndPan.h"
+
+namespace KSVG
+{
+class SVGAnimatedLength;
+class SVGPoint;
+class SVGNumber;
+class SVGAngle;
+class SVGMatrix;
+class SVGLength;
+class SVGRect;
+class SVGTransform;
+class SVGViewSpec;
+class SVGSVGElementImpl;
+
+/**
+ * A key interface definition is the SVGSVGElement interface, which is the
+ * interface that corresponds to the 'svg' element. This interface contains
+ * various miscellaneous commonly-used utility methods, such as matrix
+ * operations and the ability to control the time of redraw on visual
+ * rendering devices. SVGSVGElement extends ViewCSS and DocumentCSS to provide
+ * access to the computed values of properties and the override style sheet
+ * as described in DOM2.
+ *
+ * For more information :
+ * <a href="http://www.w3.org/TR/SVG/struct.html#NewDocument">
+ * the 'svg' element</a>
+ */
+class SVGSVGElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGLocatable,
+ public SVGFitToViewBox,
+ public SVGZoomAndPan
+ //public events::EventTarget,
+ //public events::DocumentEvent,
+ //public css::ViewCSS,
+ //public css::DocumentCSS
+{
+public:
+ SVGSVGElement();
+ SVGSVGElement(const SVGSVGElement &);
+ SVGSVGElement &operator=(const SVGSVGElement &other);
+ SVGSVGElement(SVGSVGElementImpl *);
+ virtual ~SVGSVGElement();
+
+ /**
+ * (Has no meaning or effect on outermost 'svg' elements.)
+ * The x-axis coordinate of one corner of the rectangular region into which an
+ * embedded 'svg' element is placed. If the attribute is not specified, the
+ * effect is as if a value of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The x-axis coordinate of the viewport of the 'svg' element.
+ */
+ SVGAnimatedLength x() const;
+
+ /**
+ * (Has no meaning or effect on outermost 'svg' elements.)
+ * The x-axis coordinate of one corner of the rectangular region into which an
+ * embedded 'svg' element is placed. If the attribute is not specified, the
+ * effect is as if a value of "0" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The y-axis coordinate of the viewport of the 'svg' element.
+ */
+ SVGAnimatedLength y() const;
+
+ /**
+ * For outermost 'svg' elements, the intrinsic width of the SVG document
+ * fragment. For embedded 'svg' elements, the width of the rectangular
+ * region into which the 'svg' element is placed.
+ * A negative value is an error (see <a
+ * href="http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error
+ * processing </a>).
+ * A value of zero disables rendering of the element. If the attribute is not
+ * specified, the effect is as if a value of "100%" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The width of the viewport of the 'svg' element.
+ */
+ SVGAnimatedLength width() const;
+
+ /**
+ * For outermost 'svg' elements, the intrinsic height of the SVG document
+ * fragment. For embedded 'svg' elements, the height of the rectangular region
+ * into which the 'svg' element is placed.
+ * A negative value is an error (see <a
+ * href="http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error
+ * processing </a>).
+ * A value of zero disables rendering of the element. If the attribute is not
+ * specified, the effect is as if a value of "100%" were specified.
+ *
+ * This attribute is animatable.
+ *
+ * @return The height of the viewport of the 'svg' element.
+ */
+ SVGAnimatedLength height() const;
+
+ /**
+ * The <code> contentScriptType </code> attribute identifies the default
+ * scripting language for the given document. This attribute sets the scripting
+ * language used to process the value strings in event attributes. The value
+ * content-type specifies a media type, per <a
+ * href="http://www.ietf.org/rfc/rfc2045.txt"> [RFC2045]</a>. The default value
+ * is "text/ecmascript".
+ *
+ * This attribute is not animatable.
+ *
+ * @exception
+ * NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a
+ * readonly attribute.
+ */
+ void setContentScriptType(const DOM::DOMString &);
+
+ /**
+ * @return The value of the <code>contentScript</code> attribute on the given
+ * 'svg' element.
+ */
+ DOM::DOMString contentScriptType() const;
+
+ /**
+ * Identifies the default style sheet language for the given document. This
+ * attribute sets the style sheet language for the style attributes that are
+ * available on many elements. The value of the attribute consists of a media
+ * type, per <a href="http://www.ietf.org/rfc/rfc2045.txt">[RFC2045]</a>.
+ * The default value is "text/css".
+ */
+ void setContentStyleType(const DOM::DOMString &);
+
+ /**
+ * @return The value of the <code>contentStyle</code> attribute on the given
+ * 'svg' element.
+ */
+ DOM::DOMString contentStyleType() const;
+
+ /**
+ * The position and size of the viewport (implicit or explicit) that
+ * corresponds to this 'svg' element. When the user agent is actually
+ * rendering the content, then the position and size values represent the
+ * actual values when rendering. The position and size values are unitless
+ * values in the coordinate system of the parent element. If no parent element
+ * exists (i.e., 'svg' element represents the root of the document tree), if
+ * this SVG document is embedded as part of another document (e.g., via the
+ * HTML 'object' element), then the position and size are unitless values in
+ * the coordinate system of the parent document. (If the parent uses CSS or
+ * XSL layout, then unitless values represent pixel units for the current CSS
+ * or XSL viewport, as described in the CSS2 specification.) If the parent
+ * element does not have a coordinate system, then the user agent should
+ * provide reasonable default values for this attribute.
+ *
+ * @return The viewport represented by a <code>SVGRect</rect>.
+ */
+ SVGRect viewport() const;
+
+ /**
+ * Size of a pixel units (as defined by CSS2) along the x-axis of the viewport,
+ * which represents a unit somewhere in the range of 70dpi to 120dpi, and, on
+ * systems that support this, might actually match the characteristics of the
+ * target medium. On systems where it is impossible to know the size of a
+ * pixel, a suitable default pixel size is provided.
+ *
+ * @return Corresponding size of a pixel unit along the x-axis of the viewport.
+ */
+ float pixelUnitToMillimeterX() const;
+
+ /**
+ * @return Corresponding size of a pixel unit along the y-axis of the viewport.
+ */
+ float pixelUnitToMillimeterY() const;
+
+ /**
+ * User interface (UI) events in DOM Level 2 indicate the screen positions at
+ * which the given UI event occurred. When the user agent actually knows the
+ * physical size of a "screen unit", this attribute will express that
+ * information; otherwise, user agents will provide a suitable default value
+ * such as .28mm.
+ *
+ * @return Corresponding size of a screen pixel along the x-axis of the
+ * viewport.
+ */
+ float screenPixelToMillimeterX() const;
+
+ /**
+ * @return Corresponding size of a screen pixel along the y-axis of the
+ * viewport.
+ */
+ float screenPixelToMillimeterY() const;
+
+ /**
+ * The initial view (i.e., before magnification and panning) of the current
+ * innermost SVG document fragment can be either the "standard" view (i.e.,
+ * based on attributes on the 'svg' element such as fitBoxToViewport) or to a
+ * "custom" view (i.e., a hyperlink into a particular 'view' or other element -
+ * see <a href="http://www.w3.org/TR/SVG/linking.html#LinksIntoSVG"> Linking
+ * into SVG content: URI fragments and SVG views)</a>. If the initial view
+ * is the "standard" view, then this attribute is false. If the initial
+ * view is a "custom" view, then this attribute is true.
+ *
+ * @exception DOMException
+ * NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a
+ * readonly attribute.
+ */
+ void setUseCurrentView(bool);
+
+ /**
+ * @return Indicated whether the view is "custom" or not.
+ */
+ bool useCurrentView() const;
+
+ /**
+ * The definition of the initial view (i.e., before magnification and panning)
+ * of the current innermost SVG document fragment. The meaning depends on the
+ * situation:
+ *
+ * If the initial view was a "standard" view, then:
+ *
+ * the values for <code>viewBox</code>, <code>preserveAspectRatio</code> and
+ * <code>zoomAndPan</code> within <code>currentView</code> will match the
+ * values for the corresponding DOM attributes that are on SVGSVGElement
+ * directly.
+ * the values for <code>transform</code> and <code>viewTarget</code> within
+ * <code>currentView</code> will be null.
+ *
+ * If the initial view was a link into a 'view' element, then:
+ *
+ * the values for <code>viewBox</code>, <code>preserveAspectRatio</code> and
+ * <code>zoomAndPan</code> within <code>currentView</code> will correspond to
+ * the corresponding attributes for the given 'view' element.
+ * the values for <code>transform</code> and <code>viewTarget</code> within
+ * <code>currentView </code>will be null
+ *
+ * If the initial view was a link into another element (i.e., other than a
+ *'view'), then:
+ *
+ * the values for <code>viewBox</code>, <code>preserveAspectRatio</code> and
+ * <code>zoomAndPan</code> within <code>currentView</code> will match the
+ * values for the corresponding DOM attributes that are on SVGSVGElement
+ * directly for the closest ancestor 'svg' element.
+ * the values for transform within <code>currentView</code> will be null.
+ * the <code>viewTarget</code> within <code>currentView</code> will represent
+ * the target of the link.
+ *
+ * If the initial view was a link into the SVG document fragment using an SVG
+ * view specification fragment identifier (i.e., #svgView(...)), then:
+ *
+ * the values for <code>viewBox</code>, <code>preserveAspectRatio</code>,
+ * <code>zoomAndPan</code>, <code>transform</code> and <code>viewTarget</code>
+ * within <code>currentView</code> will correspond to the values from the SVG
+ * view specification fragment identifier
+ *
+ * The object itself and its contents are both readonly.
+ */
+ SVGViewSpec currentView() const;
+
+ /**
+ * The currentScale attribute indicates the current scale factor relative to
+ * the initial view to take into account user magnification and panning
+ * operations, as described under
+ * <a href="http://www.w3.org/TR/SVG/interact.html#ZoomAndPanAttribute">
+ * Magnification and panning</a>. DOM attributes currentScale and
+ * currentTranslate are equivalent to the 2x3 matrix [a b c d e f] =
+ * [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y].
+ * If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the effect
+ * is as if an extra transformation were placed at the outermost level on the
+ * SVG document fragment (i.e., outside the outermost 'svg' element).
+ *
+ * @exception DOMException
+ * NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to change the value of a
+ * readonly attribute.
+ *
+ * @param The new value of the currentScale attribute.
+ */
+ void setCurrentScale(float);
+
+ /**
+ * @return The <code> currentScale </code> attribute value as described above.
+ */
+ float currentScale() const;
+
+ /**
+ * The corresponding translation factor that takes into account user
+ * "magnification".
+ *
+ * @return The translation factor represented by an <code> SVGPoint </code>.
+ */
+ SVGPoint currentTranslate() const;
+
+ /**
+ * Takes a time-out value which indicates that redraw shall not occur until:
+ *
+ * (a) the corresponding unsuspendRedraw(suspend_handle_id) call has been made
+ * (b) an unsuspendRedrawAll() call has been made
+ * (c) its timer has timed out.
+ *
+ * In environments that do not support interactivity (e.g., print media), then
+ * redraw shall not be suspended suspend_handle_id =
+ * suspendRedraw(max_wait_milliseconds) and unsuspendRedraw(suspend_handle_id)
+ * must be packaged as balanced pairs. When you want to suspend redraw actions
+ * as a collection of SVG DOM changes occur, then precede the changes to the
+ * SVG DOM with a method call similar to suspend_handle_id =
+ * suspendRedraw(max_wait_milliseconds) and follow the changes with a method
+ * call similar to unsuspendRedraw(suspend_handle_id). Note that multiple
+ * suspendRedraw calls can be used at once and that each such method call is
+ * treated independently of the other suspendRedraw method calls.
+ *
+ * @param max_wait_milliseconds The amount of time in milliseconds to hold off
+ * before redrawing the device.Values greater than 60 seconds will be
+ * truncated down to 60 seconds.
+ *
+ * @return A number which acts as a unique identifier for the given
+ * suspendRedraw() call. This value must be passed as the parameter to the
+ * corresponding unsuspendRedraw() method call.
+ */
+ unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
+
+ /**
+ * Cancels a specified suspendRedraw() by providing a unique suspend_handle_id.
+ *
+ * @param suspend_handle_id A number which acts as a unique identifier for the
+ * desired suspendRedraw() call. The number supplied must be a value returned
+ * from a previous call to suspendRedraw().
+ */
+ void unsuspendRedraw(unsigned long suspend_handle_id);
+
+ /**
+ * Cancels all currently active suspendRedraw() method calls. This method is
+ * most useful at the very end of a set of SVG DOM calls to ensure that all
+ * pending suspendRedraw() method calls have been cancelled.
+ */
+ void unsuspendRedrawAll();
+
+ /**
+ * In rendering environments supporting interactivity, forces the user agent to
+ * immediately redraw all regions of the viewport that require updating.
+ */
+ void forceRedraw();
+
+ /**
+ * Suspends (i.e., pauses) all currently running animations that are defined
+ * within the SVG document fragment corresponding to this 'svg' element,
+ * causing the animation clock corresponding to this document fragment to stand
+ * still until it is paused.
+ */
+ void pauseAnimations();
+
+ /**
+ * Unsuspends (i.e., pauses) currently running animations that are defined
+ * within the SVG document fragment, causing the animation clock to continue
+ * from the time it was suspended.
+ */
+ void unpauseAnimations();
+
+ /**
+ * Returns true if this SVG Document fragment is in a paused state.
+ *
+ * @return Boolean indicating whether this SVG document fragment is in a paused
+ * state.
+ */
+ bool animationsPaused();
+
+ /**
+ * Returns the current time in seconds relative to the start time for the
+ * current SVG document fragment.
+ *
+ * @return The current time in seconds.
+ */
+ float getCurrentTime();
+
+ /**
+ * Adjusts the clock for this SVG document fragment, establishing a new current
+ * time.
+ *
+ * @param seconds The new current time in seconds relative to the start time
+ * for the current SVG document fragment.
+ */
+ void setCurrentTime(float seconds);
+
+ /**
+ * Returns the list of graphics elements whose rendered content intersects the
+ * supplied rectangle, honoring the 'pointer-events' property value on each
+ * candidate graphics element.
+ *
+ * @param rect The test rectangle. The values are in the initial coordinate
+ * system for the current 'svg' element.
+ * @param referenceElement If not null, then only return elements whose drawing
+ * order has them below the given reference element.
+ *
+ * @return A list of Elements whose content is intersects the supplied
+ * rectangle.
+ */
+ DOM::NodeList getIntersectionList(const SVGRect &rect, const SVGElement
+ &referenceElement);
+
+ /**
+ * Returns the list of graphics elements whose rendered content is entirely
+ * contained within the supplied rectangle, honoring the 'pointer-events'
+ * property value on each candidate graphics element.
+ *
+ * @param rect The test rectangle. The values are in the initial coordinate
+ * system for the current 'svg' element.
+ * @param referenceElement If not null, then only return elements whose drawing
+ * order has them below the given reference element.
+ *
+ * @return A list of Elements whose content is enclosed by the supplied
+ * rectangle.
+ */
+ DOM::NodeList getEnclosureList(const SVGRect &rect, const SVGElement
+ &referenceElement);
+
+ /**
+ * Returns true if the rendered content of the given element intersects the
+ * supplied rectangle, honoring the 'pointer-events' property value on each
+ * candidate graphics element.
+ *
+ * @param element The element on which to perform the given test.
+ * @param rect The test rectangle. The values are in the initial coordinate
+ * system for the current 'svg' element.
+ *
+ * @return True or false, depending on whether the given element intersects the
+ * supplied rectangle.
+ */
+ bool checkIntersection(const SVGElement &element, const SVGRect &rect);
+
+ /**
+ * Returns true if the rendered content of the given element is entirely
+ * contained within the supplied rectangle, honoring the 'pointer-events'
+ * property value on each candidate graphics element.
+ *
+ * @param element The element on which to perform the given test.
+ * @param rect The test rectangle. The values are in the initial coordinate
+ * system for the current 'svg' element.
+ *
+ * @return True or false, depending on whether the given element is enclosed by
+ * the supplied rectangle.
+ */
+ bool checkEnclosure(const SVGElement &element, const SVGRect &rect);
+
+ /**
+ * Unselects any selected objects, including any selections of text
+ * strings and type-in bars.
+ */
+ void deSelectAll();
+
+ /**
+ * Creates an <code> SVGNumber </code> object outside of any document trees.
+ * The object is initialized to a value of zero.
+ *
+ * @return An <code> SVGNumber </code> object.
+ */
+ SVGNumber createSVGNumber();
+
+ /**
+ * Creates an <code> SVGLength </code> object outside of any document trees.
+ * The object is initialized to a value of zero user units.
+ *
+ * @return An <code> SVGLength </code> object.
+ */
+ SVGLength createSVGLength();
+
+ /**
+ * Creates an <code> SVGAngle </code> object outside of any document trees.
+ * The object is initialized to a value of zero degreesunitless).
+ *
+ * @return An <code> SVGAngle </code> object.
+ */
+ SVGAngle createSVGAngle();
+
+ /**
+ * Creates an <code> SVGPoint </code> object outside of any document trees.
+ * The object is initialized to the point (0,0) in the user coordinate system.
+ *
+ * @return An <code> SVGPoint </code> object.
+ */
+ SVGPoint createSVGPoint();
+
+ /**
+ * Creates an <code> SVGMatrix </code> object outside of any document trees.
+ * The object is initialized to a value of the identity matrix.
+ *
+ * @return An <code> SVGMatrix </code> object.
+ */
+ SVGMatrix createSVGMatrix();
+
+ /**
+ * Creates an <code> SVGRect </code> object outside of any document trees.
+ * The object is initialized such that all values are set to 0 user units.
+ *
+ * @return An <code> SVGRect </code> object.
+ */
+ SVGRect createSVGRect();
+
+ /**
+ * Creates an <code> SVGTransform </code> object outside of any document trees.
+ * The object is initialized to an identity matrix transform
+ * (SVG_TRANSFORM_MATRIX).
+ *
+ * @return An <code> SVGTransform </code> object.
+ */
+ SVGTransform createSVGTransform();
+
+ /**
+ * Creates an <code> SVGTransform </code> object outside of any document trees.
+ * The object is initialized to the given matrix transform (i.e.,
+ * SVG_TRANSFORM_MATRIX).
+ *
+ * @return An <code> SVGTransform </code> object.
+ */
+ SVGTransform createSVGTransformFromMatrix(const SVGMatrix &matrix);
+
+ /**
+ * Searches this SVG document fragment (i.e., the search is restricted to a
+ * subset of the document tree) for an <code> Element </code> whose id is given
+ * by elementId. If an <code> Element </code> is found, that <code> Element
+ * </code> is returned. If no such element exists, returns null. Behavior
+ * is not defined if more than one element has this id.
+ *
+ * @param elementId The unique id value for an element.
+ *
+ * @return The matching element.
+ */
+ SVGElement getElementById(const DOM::DOMString &elementId);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGSVGElementImpl *handle() const { return impl; }
+
+private:
+ SVGSVGElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGScriptElement.cc b/ksvg/dom/SVGScriptElement.cc
new file mode 100644
index 00000000..f599a273
--- /dev/null
+++ b/ksvg/dom/SVGScriptElement.cc
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGScriptElement.h"
+#include "SVGScriptElementImpl.h"
+
+using namespace KSVG;
+
+SVGScriptElement::SVGScriptElement() : SVGElement(), SVGURIReference(), SVGExternalResourcesRequired()
+{
+ impl = 0;
+}
+
+SVGScriptElement::SVGScriptElement(const SVGScriptElement &other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGScriptElement &SVGScriptElement::operator =(const SVGScriptElement &other)
+{
+ SVGElement::operator=(other);
+ SVGURIReference::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGScriptElement::SVGScriptElement(SVGScriptElementImpl *other) : SVGElement(other), SVGURIReference(other), SVGExternalResourcesRequired(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGScriptElement::~SVGScriptElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGScriptElement::setType(const DOM::DOMString &type)
+{
+ if(impl)
+ impl->setType(type);
+}
+
+DOM::DOMString SVGScriptElement::type() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->type();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGScriptElement.h b/ksvg/dom/SVGScriptElement.h
new file mode 100644
index 00000000..aae1d79b
--- /dev/null
+++ b/ksvg/dom/SVGScriptElement.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGScriptElement_H
+#define SVGScriptElement_H
+
+#include <dom/dom_string.h>
+#include "SVGElement.h"
+#include "SVGURIReference.h"
+#include "SVGExternalResourcesRequired.h"
+
+namespace KSVG
+{
+
+class SVGScriptElementImpl;
+class SVGScriptElement : public SVGElement,
+ public SVGURIReference,
+ public SVGExternalResourcesRequired
+{
+public:
+ SVGScriptElement();
+ SVGScriptElement(const SVGScriptElement &other);
+ SVGScriptElement &operator=(const SVGScriptElement &other);
+ SVGScriptElement(SVGScriptElementImpl *other);
+ virtual ~SVGScriptElement();
+
+ void setType(const DOM::DOMString &type);
+ DOM::DOMString type() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGScriptElementImpl *handle() const { return impl; }
+
+private:
+ SVGScriptElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSetElement.cc b/ksvg/dom/SVGSetElement.cc
new file mode 100644
index 00000000..7a47c993
--- /dev/null
+++ b/ksvg/dom/SVGSetElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSetElement.h"
+#include "SVGSetElementImpl.h"
+
+using namespace KSVG;
+
+SVGSetElement::SVGSetElement() : SVGAnimationElement()
+{
+ impl = 0;
+}
+
+SVGSetElement::SVGSetElement(const SVGSetElement &other) : SVGAnimationElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGSetElement &SVGSetElement::operator =(const SVGSetElement &other)
+{
+ SVGAnimationElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGSetElement::SVGSetElement(SVGSetElementImpl *other) : SVGAnimationElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGSetElement::~SVGSetElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSetElement.h b/ksvg/dom/SVGSetElement.h
new file mode 100644
index 00000000..f65a8704
--- /dev/null
+++ b/ksvg/dom/SVGSetElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSetElement_H
+#define SVGSetElement_H
+
+#include "SVGAnimationElement.h"
+
+namespace KSVG
+{
+
+class SVGSetElementImpl;
+class SVGSetElement : public SVGAnimationElement
+{
+public:
+ SVGSetElement();
+ SVGSetElement(const SVGSetElement &other);
+ SVGSetElement &operator=(const SVGSetElement &other);
+ SVGSetElement(SVGSetElementImpl *other);
+ virtual ~SVGSetElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGSetElementImpl *handle() const { return impl; }
+
+private:
+ SVGSetElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStopElement.cc b/ksvg/dom/SVGStopElement.cc
new file mode 100644
index 00000000..a9db9a56
--- /dev/null
+++ b/ksvg/dom/SVGStopElement.cc
@@ -0,0 +1,75 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGStopElement.h"
+#include "SVGStopElementImpl.h"
+#include "SVGAnimatedNumber.h"
+
+using namespace KSVG;
+
+SVGStopElement::SVGStopElement() : SVGElement(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGStopElement::SVGStopElement(const SVGStopElement &other) : SVGElement(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGStopElement &SVGStopElement::operator =(const SVGStopElement &other)
+{
+ SVGElement::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGStopElement::SVGStopElement(SVGStopElementImpl *other) : SVGElement(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGStopElement::~SVGStopElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedNumber SVGStopElement::offset() const
+{
+ if(!impl) return SVGAnimatedNumber(0);
+ return SVGAnimatedNumber(impl->offset());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStopElement.h b/ksvg/dom/SVGStopElement.h
new file mode 100644
index 00000000..3002e0cf
--- /dev/null
+++ b/ksvg/dom/SVGStopElement.h
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGStopElement_H
+#define SVGStopElement_H
+
+#include "SVGElement.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumber;
+class SVGStopElementImpl;
+
+/**
+ * The ramp of colors to use on a gradient is defined by the 'stop' elements that
+ * are child elements to either the 'linearGradient' element or the 'radialGradient' element.
+ */
+class SVGStopElement : public SVGElement,
+ public SVGStylable
+{
+public:
+ SVGStopElement();
+ SVGStopElement(const SVGStopElement &other);
+ SVGStopElement &operator=(const SVGStopElement &other);
+ SVGStopElement(SVGStopElementImpl *other);
+ virtual ~SVGStopElement();
+
+ /**
+ * The <code>offset</code> attribute is either a <number> (usually ranging from 0 to 1)
+ * or a <percentage> (usually ranging from 0% to 100%) which indicates where the gradient
+ * stop is placed. For linear gradients, the offset attribute represents a location along
+ * the gradient vector. For radial gradients, it represents a percentage distance from
+ * (fx,fy) to the edge of the outermost/largest circle.
+ *
+ * This attribute is animatable.
+ *
+ * @return The offset where this gradient stop is placed.
+ */
+ SVGAnimatedNumber offset() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGStopElementImpl *handle() const { return impl; }
+
+private:
+ SVGStopElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStringList.cc b/ksvg/dom/SVGStringList.cc
new file mode 100644
index 00000000..c7700e06
--- /dev/null
+++ b/ksvg/dom/SVGStringList.cc
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <dom/dom_string.h>
+#include "SVGStringList.h"
+#include "SVGStringListImpl.h"
+
+using namespace KSVG;
+
+SVGStringList::SVGStringList()
+{
+ impl = new SVGStringListImpl();
+ impl->ref();
+}
+
+SVGStringList::SVGStringList(const SVGStringList &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGStringList &SVGStringList::operator=(const SVGStringList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGStringList::SVGStringList(SVGStringListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGStringList::~SVGStringList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGStringList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGStringList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+DOM::DOMString *SVGStringList::initialize(DOM::DOMString *newItem)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->initialize(new SharedString(newItem));
+}
+
+DOM::DOMString *SVGStringList::getItem(unsigned long index)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->getItem(index);
+}
+
+DOM::DOMString *SVGStringList::insertItemBefore(DOM::DOMString *newItem, unsigned long index)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->insertItemBefore(new SharedString(newItem), index);
+}
+
+DOM::DOMString *SVGStringList::replaceItem(DOM::DOMString *newItem, unsigned long index)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->replaceItem(new SharedString(newItem), index);
+}
+
+DOM::DOMString *SVGStringList::removeItem(unsigned long index)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->removeItem(index);
+}
+
+DOM::DOMString *SVGStringList::appendItem(DOM::DOMString *newItem)
+{
+ if(!impl) return new DOM::DOMString();
+ return impl->appendItem(new SharedString(newItem));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStringList.h b/ksvg/dom/SVGStringList.h
new file mode 100644
index 00000000..477273a6
--- /dev/null
+++ b/ksvg/dom/SVGStringList.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStringList_H
+#define SVGStringList_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGStringListImpl;
+class SVGStringList
+{
+public:
+ SVGStringList();
+ SVGStringList(const SVGStringList &);
+ SVGStringList &operator=(const SVGStringList &);
+ SVGStringList(SVGStringListImpl *);
+ ~SVGStringList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+
+ DOM::DOMString *initialize(DOM::DOMString *newItem);
+ DOM::DOMString *getItem(unsigned long index);
+ DOM::DOMString *insertItemBefore(DOM::DOMString *newItem, unsigned long index);
+ DOM::DOMString *replaceItem(DOM::DOMString *newItem, unsigned long index);
+ DOM::DOMString *removeItem(unsigned long index);
+ DOM::DOMString *appendItem(DOM::DOMString *newItem);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGStringListImpl *handle() const { return impl; }
+
+private:
+ SVGStringListImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStylable.cc b/ksvg/dom/SVGStylable.cc
new file mode 100644
index 00000000..14136d7d
--- /dev/null
+++ b/ksvg/dom/SVGStylable.cc
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGStylable.h"
+#include "SVGStylableImpl.h"
+#include <kdebug.h>
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGStylable::SVGStylable()
+{
+ impl = 0;
+}
+
+SVGStylable::SVGStylable(const SVGStylable &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGStylable &SVGStylable::operator=(const SVGStylable &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGStylable::SVGStylable(SVGStylableImpl *other)
+{
+ impl = other;
+}
+
+SVGStylable::~SVGStylable()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+/*
+SVGAnimatedString SVGStylable::className() const
+{
+ return impl->className();
+}
+
+css::CSSStyleDeclaration SVGStylable::style() const
+{
+ return impl->style();
+}
+
+css::CSSValue SVGStylable::getPresentationAttribute(const DOMString &name)
+{
+ return impl->getPresentationAttribute(name);
+}
+*/
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStylable.h b/ksvg/dom/SVGStylable.h
new file mode 100644
index 00000000..2fb3cf11
--- /dev/null
+++ b/ksvg/dom/SVGStylable.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStylable_H
+#define SVGStylable_H
+
+namespace KSVG
+{
+
+class SVGStylableImpl;
+class SVGStylable
+{
+public:
+ SVGStylable(const SVGStylable &other);
+ SVGStylable &operator=(const SVGStylable &other);
+ SVGStylable(SVGStylableImpl *other);
+ ~SVGStylable();
+
+ // TODO : stylesheet support
+ //SVGAnimatedString className() const;
+ //css::CSSStyleDeclaration style() const;
+ //css::CSSValue getPresentationAttribute(const DOMString &name);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGStylableImpl *handle() const { return impl; }
+
+protected:
+ SVGStylable();
+
+private:
+ SVGStylableImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
+
diff --git a/ksvg/dom/SVGStyleElement.cc b/ksvg/dom/SVGStyleElement.cc
new file mode 100644
index 00000000..8cf02024
--- /dev/null
+++ b/ksvg/dom/SVGStyleElement.cc
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGStyleElement.h"
+#include "SVGStyleElementImpl.h"
+
+using namespace KSVG;
+
+SVGStyleElement::SVGStyleElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGStyleElement::SVGStyleElement(const SVGStyleElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGStyleElement &SVGStyleElement::operator =(const SVGStyleElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGStyleElement::SVGStyleElement(SVGStyleElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGStyleElement::~SVGStyleElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+void SVGStyleElement::setXmlspace(const DOM::DOMString &xmlspace)
+{
+ if(impl)
+ impl->setXmlspace(xmlspace);
+}
+
+DOM::DOMString SVGStyleElement::xmlspace() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->xmlspace();
+}
+
+void SVGStyleElement::setType(const DOM::DOMString &type)
+{
+ if(impl)
+ impl->setType(type);
+}
+
+DOM::DOMString SVGStyleElement::type() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->type();
+}
+
+void SVGStyleElement::setMedia(const DOM::DOMString &media)
+{
+ if(impl)
+ impl->setMedia(media);
+}
+
+DOM::DOMString SVGStyleElement::media() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->media();
+}
+
+void SVGStyleElement::setTitle(const DOM::DOMString &title)
+{
+ if(impl)
+ impl->setTitle(title);
+}
+
+DOM::DOMString SVGStyleElement::title() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->title();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGStyleElement.h b/ksvg/dom/SVGStyleElement.h
new file mode 100644
index 00000000..2a1c63b8
--- /dev/null
+++ b/ksvg/dom/SVGStyleElement.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStyleElement_H
+#define SVGStyleElement_H
+
+#include <dom/dom_string.h>
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGStyleElementImpl;
+class SVGStyleElement : public SVGElement
+{
+public:
+ SVGStyleElement();
+ SVGStyleElement(const SVGStyleElement &other);
+ SVGStyleElement &operator=(const SVGStyleElement &other);
+ SVGStyleElement(SVGStyleElementImpl *other);
+ virtual ~SVGStyleElement();
+
+ void setXmlspace(const DOM::DOMString &xmlspace);
+ DOM::DOMString xmlspace() const;
+
+ void setType(const DOM::DOMString &type);
+ DOM::DOMString type() const;
+
+ void setMedia(const DOM::DOMString &media);
+ DOM::DOMString media() const;
+
+ void setTitle(const DOM::DOMString &title);
+ DOM::DOMString title() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGStyleElementImpl *handle() const { return impl; }
+
+private:
+ SVGStyleElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSwitchElement.cc b/ksvg/dom/SVGSwitchElement.cc
new file mode 100644
index 00000000..2c4a8701
--- /dev/null
+++ b/ksvg/dom/SVGSwitchElement.cc
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSwitchElement.h"
+#include "SVGSwitchElementImpl.h"
+
+using namespace KSVG;
+
+SVGSwitchElement::SVGSwitchElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGSwitchElement::SVGSwitchElement(const SVGSwitchElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGSwitchElement &SVGSwitchElement::operator =(const SVGSwitchElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGSwitchElement::SVGSwitchElement(SVGSwitchElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGSwitchElement::~SVGSwitchElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSwitchElement.h b/ksvg/dom/SVGSwitchElement.h
new file mode 100644
index 00000000..a4f8819d
--- /dev/null
+++ b/ksvg/dom/SVGSwitchElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSwitchElement_H
+#define SVGSwitchElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGSwitchElementImpl;
+class SVGSwitchElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable
+{
+public:
+ SVGSwitchElement();
+ SVGSwitchElement(const SVGSwitchElement &other);
+ SVGSwitchElement &operator=(const SVGSwitchElement &other);
+ SVGSwitchElement(SVGSwitchElementImpl *other);
+ virtual ~SVGSwitchElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGSwitchElementImpl *handle() const { return impl; }
+
+private:
+ SVGSwitchElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSymbolElement.cc b/ksvg/dom/SVGSymbolElement.cc
new file mode 100644
index 00000000..d83947a5
--- /dev/null
+++ b/ksvg/dom/SVGSymbolElement.cc
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSymbolElement.h"
+#include "SVGSymbolElementImpl.h"
+
+using namespace KSVG;
+
+SVGSymbolElement::SVGSymbolElement() : SVGElement(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGFitToViewBox()
+{
+ impl = 0;
+}
+
+SVGSymbolElement::SVGSymbolElement(const SVGSymbolElement &other) : SVGElement(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGSymbolElement &SVGSymbolElement::operator =(const SVGSymbolElement &other)
+{
+ SVGElement::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGFitToViewBox::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGSymbolElement::SVGSymbolElement(SVGSymbolElementImpl *other) : SVGElement(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGFitToViewBox(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGSymbolElement::~SVGSymbolElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGSymbolElement.h b/ksvg/dom/SVGSymbolElement.h
new file mode 100644
index 00000000..8d02987e
--- /dev/null
+++ b/ksvg/dom/SVGSymbolElement.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSymbolElement_H
+#define SVGSymbolElement_H
+
+#include "SVGElement.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGFitToViewBox.h"
+
+namespace KSVG
+{
+
+class SVGSymbolElementImpl;
+class SVGSymbolElement : public SVGElement,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGFitToViewBox
+{
+public:
+ SVGSymbolElement();
+ SVGSymbolElement(const SVGSymbolElement &other);
+ SVGSymbolElement &operator=(const SVGSymbolElement &other);
+ SVGSymbolElement(SVGSymbolElementImpl *other);
+ virtual ~SVGSymbolElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGSymbolElementImpl *handle() const { return impl; }
+
+private:
+ SVGSymbolElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTRefElement.cc b/ksvg/dom/SVGTRefElement.cc
new file mode 100644
index 00000000..4faa18ec
--- /dev/null
+++ b/ksvg/dom/SVGTRefElement.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTRefElement.h"
+#include "SVGTRefElementImpl.h"
+
+using namespace KSVG;
+
+SVGTRefElement::SVGTRefElement() : SVGTextPositioningElement(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGTRefElement::SVGTRefElement(const SVGTRefElement &other) : SVGTextPositioningElement(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGTRefElement &SVGTRefElement::operator =(const SVGTRefElement &other)
+{
+ SVGTextPositioningElement::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTRefElement::SVGTRefElement(SVGTRefElementImpl *other) : SVGTextPositioningElement(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTRefElement::~SVGTRefElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTRefElement.h b/ksvg/dom/SVGTRefElement.h
new file mode 100644
index 00000000..5585f1d7
--- /dev/null
+++ b/ksvg/dom/SVGTRefElement.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTRefElement_H
+#define SVGTRefElement_H
+
+#include "SVGTextPositioningElement.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+class SVGTRefElementImpl;
+class SVGTRefElement : public SVGTextPositioningElement,
+ public SVGURIReference
+{
+public:
+ SVGTRefElement();
+ SVGTRefElement(const SVGTRefElement &other);
+ SVGTRefElement &operator=(const SVGTRefElement &other);
+ SVGTRefElement(SVGTRefElementImpl *other);
+ virtual ~SVGTRefElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTRefElementImpl *handle() const { return impl; }
+
+private:
+ SVGTRefElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTSpanElement.cc b/ksvg/dom/SVGTSpanElement.cc
new file mode 100644
index 00000000..fc43309c
--- /dev/null
+++ b/ksvg/dom/SVGTSpanElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTSpanElement.h"
+#include "SVGTSpanElementImpl.h"
+
+using namespace KSVG;
+
+SVGTSpanElement::SVGTSpanElement() : SVGTextPositioningElement()
+{
+ impl = 0;
+}
+
+SVGTSpanElement::SVGTSpanElement(const SVGTSpanElement &other) : SVGTextPositioningElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGTSpanElement &SVGTSpanElement::operator =(const SVGTSpanElement &other)
+{
+ SVGTextPositioningElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTSpanElement::SVGTSpanElement(SVGTSpanElementImpl *other) : SVGTextPositioningElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTSpanElement::~SVGTSpanElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTSpanElement.h b/ksvg/dom/SVGTSpanElement.h
new file mode 100644
index 00000000..8fac655b
--- /dev/null
+++ b/ksvg/dom/SVGTSpanElement.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+*/
+
+#ifndef SVGTSpanElement_H
+#define SVGTSpanElement_H
+
+#include "SVGTextPositioningElement.h"
+
+namespace KSVG
+{
+
+class SVGTSpanElementImpl;
+
+/**
+ * Within a <code>text</code> element, text and font properties and the current
+ * text position can be adjusted with absolute or relative coordinate values by
+ * including a <code>tspan</code> element.
+ *
+ * For more information :
+ * <a href="http://www.w3.org/TR/SVG/text.html#TSpanElement">
+ * 10.5 the 'tspan' element</a>
+ */
+class SVGTSpanElement : public SVGTextPositioningElement
+{
+public:
+ SVGTSpanElement();
+ SVGTSpanElement(const SVGTSpanElement &other);
+ SVGTSpanElement &operator=(const SVGTSpanElement &other);
+ SVGTSpanElement(SVGTSpanElementImpl *other);
+ virtual ~SVGTSpanElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTSpanElementImpl *handle() const { return impl; }
+
+private:
+ SVGTSpanElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTests.cc b/ksvg/dom/SVGTests.cc
new file mode 100644
index 00000000..9c3063b1
--- /dev/null
+++ b/ksvg/dom/SVGTests.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTests.h"
+#include "SVGTestsImpl.h"
+#include "SVGStringList.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGTests::SVGTests()
+{
+ impl = 0;
+}
+
+SVGTests::SVGTests(const SVGTests &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGTests &SVGTests::operator=(const SVGTests &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGTests::SVGTests(SVGTestsImpl *other)
+{
+ impl = other;
+}
+
+SVGTests::~SVGTests()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+SVGStringList SVGTests::requiredFeatures() const
+{
+ if(!impl) return SVGStringList(0);
+ return SVGStringList(impl->requiredFeatures());
+}
+
+SVGStringList SVGTests::requiredExtensions() const
+{
+ if(!impl) return SVGStringList(0);
+ return SVGStringList(impl->requiredExtensions());
+}
+
+SVGStringList SVGTests::systemLanguage() const
+{
+ if(!impl) return SVGStringList(0);
+ return SVGStringList(impl->systemLanguage());
+}
+
+bool SVGTests::hasExtension(const DOM::DOMString &extension)
+{
+ if(!impl) return false;
+ return impl->hasExtension(extension);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTests.h b/ksvg/dom/SVGTests.h
new file mode 100644
index 00000000..729b0efc
--- /dev/null
+++ b/ksvg/dom/SVGTests.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTests_H
+#define SVGTests_H
+
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGStringList;
+class SVGTestsImpl;
+class SVGTests
+{
+public:
+ SVGTests(const SVGTests &other);
+ SVGTests &operator=(const SVGTests &other);
+ SVGTests(SVGTestsImpl *other);
+ ~SVGTests();
+
+ SVGStringList requiredFeatures() const;
+ SVGStringList requiredExtensions() const;
+ SVGStringList systemLanguage() const;
+
+ bool hasExtension(const DOM::DOMString &extension);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTestsImpl *handle() const { return impl; }
+
+protected:
+ SVGTests();
+
+private:
+ SVGTestsImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTextContentElement.cc b/ksvg/dom/SVGTextContentElement.cc
new file mode 100644
index 00000000..f40d23b6
--- /dev/null
+++ b/ksvg/dom/SVGTextContentElement.cc
@@ -0,0 +1,120 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTextContentElement.h"
+#include "SVGTextContentElementImpl.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGTextContentElement::SVGTextContentElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable()
+{
+ impl = new SVGTextContentElementImpl(0);
+}
+
+SVGTextContentElement::SVGTextContentElement(const SVGTextContentElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other)
+{
+ impl = other.impl;
+}
+
+SVGTextContentElement &SVGTextContentElement::operator=(const SVGTextContentElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGTextContentElement::SVGTextContentElement(SVGTextContentElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other)
+{
+ impl = other;
+}
+
+SVGTextContentElement::~SVGTextContentElement()
+{
+}
+
+
+SVGAnimatedLength SVGTextContentElement::textLength() const
+{
+ return impl->textLength();
+}
+
+SVGAnimatedEnumeration SVGTextContentElement::lengthAdjust() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->lengthAdjust());
+}
+
+long SVGTextContentElement::getNumberOfChars()
+{
+ return impl->getNumberOfChars();
+}
+
+float SVGTextContentElement::getComputedTextLength()
+{
+ return impl->getComputedTextLength();
+}
+/*
+float SVGTextContentElement::getSubStringLength(const unsigned long &charnum, const unsigned long &nchars)
+{
+ return impl->getSubStringLength(charnum, nchars);
+}
+
+SVGPoint SVGTextContentElement::getStartPositionOfChar(const unsigned long &charnum)
+{
+ return impl->getStartPositionOfChar(charnum);
+}
+
+SVGPoint SVGTextContentElement::getEndPositionOfChar(const unsigned long &charnum)
+{
+ return impl->getEndPositionOfChar(charnum);
+}
+
+SVGRect SVGTextContentElement::getExtentOfChar(const unsigned long &charnum)
+{
+ return impl->getExtentOfChar(charnum);
+}
+
+float SVGTextContentElement::getRotationOfChar(const unsigned long &charnum)
+{
+ return impl->getRotationOfChar(charnum);
+}
+
+long SVGTextContentElement::getCharNumAtPosition(const SVGPoint &point)
+{
+ return impl->getCharNumAtPosition(point);
+}
+
+void SVGTextContentElement::selectSubString(const unsigned long &charnum, const unsigned long &nchars)
+{
+ return impl->selectSubString(charnum, nchars);
+}
+*/
diff --git a/ksvg/dom/SVGTextContentElement.h b/ksvg/dom/SVGTextContentElement.h
new file mode 100644
index 00000000..2f943c06
--- /dev/null
+++ b/ksvg/dom/SVGTextContentElement.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextContentElement_H
+#define SVGTextContentElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+enum
+{
+ LENGTHADJUST_UNKNOWN = 0,
+ LENGTHADJUST_SPACING = 1,
+ LENGTHADJUST_SPACINGANDGLYPHS = 2
+};
+
+class SVGAnimatedLength;
+class SVGAnimatedEnumeration;
+class SVGTextContentElementImpl;
+class SVGTextContentElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable
+{
+public:
+ SVGTextContentElement(const SVGTextContentElement &);
+ SVGTextContentElement &operator=(const SVGTextContentElement &other);
+ SVGTextContentElement(SVGTextContentElementImpl *);
+ ~SVGTextContentElement();
+
+ SVGAnimatedLength textLength() const;
+ SVGAnimatedEnumeration lengthAdjust() const;
+ long getNumberOfChars();
+ float getComputedTextLength();
+// float getSubStringLength(const unsigned long &charnum, const unsigned long &nchars);
+// SVGPoint getStartPositionOfChar(const unsigned long &charnum);
+// SVGPoint getEndPositionOfChar(const unsigned long &charnum);
+// SVGRect getExtentOfChar(const unsigned long &charnum);
+// float getRotationOfChar(const unsigned long &charnum);
+// long getCharNumAtPosition(const SVGPoint &point);
+// void selectSubString(const unsigned long &charnum, const unsigned long &nchars);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTextContentElementImpl *handle() const { return impl; }
+
+protected:
+ SVGTextContentElement();
+
+private:
+ SVGTextContentElementImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGTextElement.cc b/ksvg/dom/SVGTextElement.cc
new file mode 100644
index 00000000..b80a148a
--- /dev/null
+++ b/ksvg/dom/SVGTextElement.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGTextElement.h"
+#include "SVGTextElementImpl.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGTextElement::SVGTextElement() : SVGTextPositioningElement(), SVGTransformable()
+{
+ impl = 0;
+}
+
+SVGTextElement::SVGTextElement(const SVGTextElement &other) : SVGTextPositioningElement(other), SVGTransformable(other)
+{
+ (*this) = other;
+}
+
+SVGTextElement &SVGTextElement::operator =(const SVGTextElement &other)
+{
+ SVGTextPositioningElement::operator=(other);
+ SVGTransformable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTextElement::SVGTextElement(SVGTextElementImpl *other) : SVGTextPositioningElement(other), SVGTransformable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTextElement::~SVGTextElement()
+{
+ if(impl)
+ impl->deref();
+}
diff --git a/ksvg/dom/SVGTextElement.h b/ksvg/dom/SVGTextElement.h
new file mode 100644
index 00000000..0bf459fe
--- /dev/null
+++ b/ksvg/dom/SVGTextElement.h
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ This file includes excerpts from the Scalable Vector Graphics
+ (SVG) 1.0 Specification (Proposed Recommendation)
+ http://www.w3.org/TR/SVG
+
+ Copyright © 2001 World Wide Web Consortium, (Massachusetts
+ Institute of Technology, Institut National de Recherche en
+ Informatique et en Automatique, Keio University).
+ All Rights Reserved.
+
+ $Id$
+ */
+
+
+#ifndef SVGTextElement_H
+#define SVGTextElement_H
+
+#include "SVGTextPositioningElement.h"
+#include "SVGTransformable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGTextElementImpl;
+
+/**
+ * @short The <code>text</code> element defines a graphics element
+ * consisting of text.
+ *
+ * The XML character data within the <code>text</code> element, along
+ * with relevant attributes and properties and character-to-glyph
+ * mapping tables within the font itself, define the glyphs to be
+ * rendered. (See <a
+ * href="http://www.w3.org/TR/SVG/text.html#CharactersAndGlyphs"> Characters
+ * and their corresponding glyphs </a>.) The attributes and properties on the
+ * 'text' element indicate such things as the writing direction, font
+ * specification and painting attributes which describe how exactly to render
+ * the characters. Since <code>text</code> elements are rendered using the
+ * same rendering methods as other graphics elements, all of the same
+ * coordinate system transformations, painting, clipping and masking
+ * features that apply to shapes such as paths and rectangles also
+ * apply to <code>text</code> elements.
+ *
+ * It is possible to apply a gradient, pattern, clipping path, mask or
+ * filter to text.When one of these facilities is applied to text and
+ * keyword objectBoundingBox is used to specify a graphical effect
+ * relative to the "object bounding box", then the object bounding box
+ * units are computed relative to the entire 'text' element in all
+ * cases, even when different effects are applied to different 'tspan'
+ * elements within the same 'text' element.
+ *
+
+ * The <code>text</code> element renders its first glyph (after <a
+ * href = "http://www.w3.org/TR/SVG/text.html#RelationshipWithBiDirectionality"
+ * >bidirectionality</a> reordering) at the initial current text
+ * position, which is established by the <code>x</code> and
+ * <code>y</code> attributes on the <code>text</code> element (with
+ * possible adjustments due to the value of the @ref text-anchor
+ * property, the presence of a @ref textPath element containing the
+ * first character, and/or an <code>x</code>, <code>y</code>,
+ * <code>dx</code> or <code>dy</code> attributes on a @ref tspan, @ref
+ * tref or @ref altGlyph element which contains the first character).
+ * After the glyph(s) corresponding to the given character is(are)
+ * rendered, the current text position is updated for the next
+ * character. In the simplest case, the new current text position is
+ * the previous current text position plus the glyphs' advance value
+ * (horizontal or vertical).
+ *
+ * @see SVGShape
+ * @see SVGTextPositioningElement
+ *
+ * For more info look here : <a href =
+ * "http://www.w3.org/TR/SVG/text.html#TextElement"> 10.4 The
+ * 'text' element</a>.
+ */
+class SVGTextElement : public SVGTextPositioningElement,
+ public SVGTransformable
+{
+public:
+ SVGTextElement();
+ SVGTextElement(const SVGTextElement &);
+ SVGTextElement &operator=(const SVGTextElement &other);
+ SVGTextElement(SVGTextElementImpl *);
+ ~SVGTextElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTextElementImpl *handle() const { return impl; }
+
+private:
+ SVGTextElementImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGTextPathElement.cc b/ksvg/dom/SVGTextPathElement.cc
new file mode 100644
index 00000000..1cb6b833
--- /dev/null
+++ b/ksvg/dom/SVGTextPathElement.cc
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTextPathElement.h"
+#include "SVGTextPathElementImpl.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGTextPathElement::SVGTextPathElement() : SVGTextContentElement(), SVGURIReference()
+{
+ impl = new SVGTextPathElementImpl(0);
+ impl->ref();
+}
+
+SVGTextPathElement::SVGTextPathElement(const SVGTextPathElement &other) : SVGTextContentElement(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGTextPathElement &SVGTextPathElement::operator =(const SVGTextPathElement &other)
+{
+ SVGTextContentElement::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTextPathElement::SVGTextPathElement(SVGTextPathElementImpl *other) : SVGTextContentElement(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTextPathElement::~SVGTextPathElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGTextPathElement::startOffset() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->startOffset());
+}
+
+SVGAnimatedEnumeration SVGTextPathElement::method() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->method());
+}
+
+SVGAnimatedEnumeration SVGTextPathElement::spacing() const
+{
+ if(!impl) return SVGAnimatedEnumeration(0);
+ return SVGAnimatedEnumeration(impl->spacing());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTextPathElement.h b/ksvg/dom/SVGTextPathElement.h
new file mode 100644
index 00000000..69c7fe79
--- /dev/null
+++ b/ksvg/dom/SVGTextPathElement.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextPathElement_H
+#define SVGTextPathElement_H
+
+#include "SVGTextContentElement.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+enum
+{
+ TEXTPATH_METHODTYPE_UNKNOWN = 0,
+ TEXTPATH_METHODTYPE_ALIGN = 1,
+ TEXTPATH_METHODTYPE_STRETCH = 2
+};
+
+enum
+{
+ TEXTPATH_SPACINGTYPE_UNKNOWN = 0,
+ TEXTPATH_SPACINGTYPE_AUTO = 1,
+ TEXTPATH_SPACINGTYPE_EXACT = 2
+};
+
+class SVGTextPathElementImpl;
+class SVGTextPathElement : public SVGTextContentElement,
+ public SVGURIReference
+{
+public:
+ SVGTextPathElement();
+ SVGTextPathElement(const SVGTextPathElement &other);
+ SVGTextPathElement &operator=(const SVGTextPathElement &other);
+ SVGTextPathElement(SVGTextPathElementImpl *other);
+ virtual ~SVGTextPathElement();
+
+ SVGAnimatedLength startOffset() const;
+ SVGAnimatedEnumeration method() const;
+ SVGAnimatedEnumeration spacing() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTextPathElementImpl *handle() const { return impl; }
+
+private:
+ SVGTextPathElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTextPositioningElement.cc b/ksvg/dom/SVGTextPositioningElement.cc
new file mode 100644
index 00000000..6ce7d346
--- /dev/null
+++ b/ksvg/dom/SVGTextPositioningElement.cc
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGTextPositioningElement.h"
+#include "SVGTextPositioningElementImpl.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedNumberList.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedLengthList.h"
+
+using namespace KSVG;
+
+SVGTextPositioningElement::SVGTextPositioningElement() : SVGTextContentElement()
+{
+ impl = new SVGTextPositioningElementImpl(0);
+}
+
+SVGTextPositioningElement::SVGTextPositioningElement(const SVGTextPositioningElement &other) : SVGTextContentElement(other)
+{
+ impl = other.impl;
+}
+
+SVGTextPositioningElement &SVGTextPositioningElement::operator=(const SVGTextPositioningElement &other)
+{
+ SVGTextContentElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+SVGTextPositioningElement::SVGTextPositioningElement(SVGTextPositioningElementImpl *other) : SVGTextContentElement(other)
+{
+ impl = other;
+}
+
+SVGTextPositioningElement::~SVGTextPositioningElement()
+{
+}
+
+SVGAnimatedLengthList SVGTextPositioningElement::x()
+{
+ return SVGAnimatedLengthList(impl->x());
+}
+
+SVGAnimatedLengthList SVGTextPositioningElement::y()
+{
+ return SVGAnimatedLengthList(impl->y());
+}
+
+SVGAnimatedLengthList SVGTextPositioningElement::dx()
+{
+ return SVGAnimatedLengthList(impl->dx());
+}
+
+SVGAnimatedLengthList SVGTextPositioningElement::dy()
+{
+ return SVGAnimatedLengthList(impl->dy());
+}
+
+SVGAnimatedNumberList SVGTextPositioningElement::rotate()
+{
+ return SVGAnimatedNumberList(impl->rotate());
+}
diff --git a/ksvg/dom/SVGTextPositioningElement.h b/ksvg/dom/SVGTextPositioningElement.h
new file mode 100644
index 00000000..f02950ca
--- /dev/null
+++ b/ksvg/dom/SVGTextPositioningElement.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextPositioningElement_H
+#define SVGTextPositioningElement_H
+
+#include "SVGTextContentElement.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGAnimatedLengthList;
+class SVGAnimatedNumber;
+class SVGAnimatedNumberList;
+class SVGTextPositioningElementImpl;
+class SVGTextPositioningElement : public SVGTextContentElement
+{
+public:
+ SVGTextPositioningElement(const SVGTextPositioningElement &);
+ SVGTextPositioningElement &operator=(const SVGTextPositioningElement &other);
+ SVGTextPositioningElement(SVGTextPositioningElementImpl *);
+ ~SVGTextPositioningElement();
+
+ SVGAnimatedLengthList x();
+ SVGAnimatedLengthList y();
+ SVGAnimatedLengthList dx();
+ SVGAnimatedLengthList dy();
+ SVGAnimatedNumberList rotate();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTextPositioningElementImpl *handle() const { return impl; }
+
+protected:
+ SVGTextPositioningElement();
+
+private:
+ SVGTextPositioningElementImpl *impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/dom/SVGTitleElement.cc b/ksvg/dom/SVGTitleElement.cc
new file mode 100644
index 00000000..f319c126
--- /dev/null
+++ b/ksvg/dom/SVGTitleElement.cc
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTitleElement.h"
+#include "SVGTitleElementImpl.h"
+
+using namespace KSVG;
+
+SVGTitleElement::SVGTitleElement() : SVGElement(), SVGLangSpace(), SVGStylable()
+{
+ impl = 0;
+}
+
+SVGTitleElement::SVGTitleElement(const SVGTitleElement &other) : SVGElement(other), SVGLangSpace(other), SVGStylable(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGTitleElement &SVGTitleElement::operator =(const SVGTitleElement &other)
+{
+ SVGElement::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGStylable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTitleElement::SVGTitleElement(SVGTitleElementImpl *other) : SVGElement(other), SVGLangSpace(other), SVGStylable(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTitleElement::~SVGTitleElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTitleElement.h b/ksvg/dom/SVGTitleElement.h
new file mode 100644
index 00000000..95f26272
--- /dev/null
+++ b/ksvg/dom/SVGTitleElement.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTitleElement_H
+#define SVGTitleElement_H
+
+#include "SVGElement.h"
+#include "SVGLangSpace.h"
+#include "SVGStylable.h"
+
+namespace KSVG
+{
+
+class SVGTitleElementImpl;
+class SVGTitleElement : public SVGElement,
+ public SVGLangSpace,
+ public SVGStylable
+{
+public:
+ SVGTitleElement();
+ SVGTitleElement(const SVGTitleElement &other);
+ SVGTitleElement &operator=(const SVGTitleElement &other);
+ SVGTitleElement(SVGTitleElementImpl *other);
+ virtual ~SVGTitleElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTitleElementImpl *handle() const { return impl; }
+
+private:
+ SVGTitleElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTransform.cc b/ksvg/dom/SVGTransform.cc
new file mode 100644
index 00000000..df660678
--- /dev/null
+++ b/ksvg/dom/SVGTransform.cc
@@ -0,0 +1,119 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTransformImpl.h"
+#include "SVGTransform.h"
+#include "SVGMatrix.h"
+
+using namespace KSVG;
+
+SVGTransform::SVGTransform()
+{
+ impl = new SVGTransformImpl();
+ impl->ref();
+}
+
+SVGTransform::SVGTransform(const SVGTransform &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGTransform &SVGTransform::operator=(const SVGTransform &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTransform::SVGTransform(SVGTransformImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTransform::~SVGTransform()
+{
+}
+
+unsigned short SVGTransform::type() const
+{
+ if(!impl) return SVG_TRANSFORM_UNKNOWN;
+ return impl->type();
+}
+
+SVGMatrix SVGTransform::matrix() const
+{
+ if(!impl) return SVGMatrix(0);
+ return SVGMatrix(impl->matrix());
+}
+
+double SVGTransform::angle() const
+{
+ if(!impl) return -1;
+ return impl->angle();
+}
+
+void SVGTransform::setMatrix(SVGMatrix matrix)
+{
+ if(impl)
+ impl->setMatrix(matrix.handle());
+}
+
+void SVGTransform::setTranslate(double tx, double ty)
+{
+ if(impl)
+ impl->setTranslate(tx, ty);
+}
+
+void SVGTransform::setScale(double sx, double sy)
+{
+ if(impl)
+ impl->setScale(sx, sy);
+}
+
+void SVGTransform::setRotate(double angle, double cx, double cy)
+{
+ if(impl)
+ impl->setRotate(angle, cx, cy);
+}
+
+void SVGTransform::setSkewX(double angle)
+{
+ if(impl)
+ impl->setSkewX(angle);
+}
+
+void SVGTransform::setSkewY(double angle)
+{
+ if(impl)
+ impl->setSkewY(angle);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTransform.h b/ksvg/dom/SVGTransform.h
new file mode 100644
index 00000000..b7ca927f
--- /dev/null
+++ b/ksvg/dom/SVGTransform.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransform_H
+#define SVGTransform_H
+
+namespace KSVG
+{
+
+enum
+{
+ SVG_TRANSFORM_UNKNOWN = 0,
+ SVG_TRANSFORM_MATRIX = 1,
+ SVG_TRANSFORM_TRANSLATE = 2,
+ SVG_TRANSFORM_SCALE = 3,
+ SVG_TRANSFORM_ROTATE = 4,
+ SVG_TRANSFORM_SKEWX = 5,
+ SVG_TRANSFORM_SKEWY = 6
+};
+
+class SVGMatrix;
+class SVGTransformImpl;
+class SVGTransform
+{
+public:
+ SVGTransform();
+ SVGTransform(const SVGTransform &);
+ SVGTransform &operator=(const SVGTransform &);
+ SVGTransform(SVGTransformImpl *);
+ ~SVGTransform();
+
+ unsigned short type() const;
+ SVGMatrix matrix() const;
+ double angle() const;
+
+ void setMatrix(SVGMatrix);
+ void setTranslate(double, double);
+ void setScale(double, double);
+ void setRotate(double, double, double);
+ void setSkewX(double);
+ void setSkewY(double);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTransformImpl *handle() const { return impl; }
+
+private:
+ SVGTransformImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTransformList.cc b/ksvg/dom/SVGTransformList.cc
new file mode 100644
index 00000000..541db510
--- /dev/null
+++ b/ksvg/dom/SVGTransformList.cc
@@ -0,0 +1,129 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTransformList.h"
+#include "SVGTransformListImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGMatrix.h"
+#include "SVGTransform.h"
+
+using namespace KSVG;
+
+SVGTransformList::SVGTransformList()
+{
+ impl = new SVGTransformListImpl();
+ impl->ref();
+}
+
+SVGTransformList::SVGTransformList(const SVGTransformList &other)
+{
+ (*this) = other;
+}
+
+SVGTransformList &SVGTransformList::operator=(const SVGTransformList &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGTransformList::SVGTransformList(SVGTransformListImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGTransformList::~SVGTransformList()
+{
+ if(impl)
+ impl->deref();
+}
+
+unsigned long SVGTransformList::numberOfItems() const
+{
+ if(!impl) return 0;
+ return impl->numberOfItems();
+}
+
+void SVGTransformList::clear()
+{
+ if(impl)
+ impl->clear();
+}
+
+SVGTransform *SVGTransformList::initialize(SVGTransform *newItem)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->initialize(newItem->handle()));
+}
+
+SVGTransform *SVGTransformList::getItem(unsigned long index)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->getItem(index));
+}
+
+SVGTransform *SVGTransformList::insertItemBefore(SVGTransform *newItem, unsigned long index)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->insertItemBefore(newItem->handle(), index));
+}
+
+SVGTransform *SVGTransformList::replaceItem(SVGTransform *newItem, unsigned long index)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->replaceItem(newItem->handle(), index));
+}
+
+SVGTransform *SVGTransformList::removeItem(unsigned long index)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->removeItem(index));
+}
+
+SVGTransform *SVGTransformList::appendItem(SVGTransform *newItem)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(impl->appendItem(newItem->handle()));
+}
+
+SVGTransform *SVGTransformList::createSVGTransformFromMatrix(SVGMatrix &matrix)
+{
+ if(!impl) return new SVGTransform(0);
+ return new SVGTransform(SVGSVGElementImpl::createSVGTransformFromMatrix(matrix.handle()));
+}
+
+SVGTransform *SVGTransformList::consolidate()
+{
+ if(!impl || impl->numberOfItems()==0) return 0;
+ return new SVGTransform(impl->consolidate());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTransformList.h b/ksvg/dom/SVGTransformList.h
new file mode 100644
index 00000000..8d448718
--- /dev/null
+++ b/ksvg/dom/SVGTransformList.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransformList_H
+#define SVGTransformList_H
+
+namespace KSVG
+{
+
+class SVGMatrix;
+class SVGTransform;
+class SVGTransformListImpl;
+class SVGTransformList
+{
+public:
+ SVGTransformList();
+ SVGTransformList(const SVGTransformList &);
+ SVGTransformList &operator=(const SVGTransformList &);
+ SVGTransformList(SVGTransformListImpl *);
+ ~SVGTransformList();
+
+ unsigned long numberOfItems() const;
+ void clear();
+
+ SVGTransform *initialize(SVGTransform *newItem);
+ SVGTransform *getItem(unsigned long index);
+ SVGTransform *insertItemBefore(SVGTransform *newItem, unsigned long index);
+ SVGTransform *replaceItem(SVGTransform *newItem, unsigned long index);
+ SVGTransform *removeItem(unsigned long index);
+ SVGTransform *appendItem(SVGTransform *newItem);
+
+ SVGTransform *createSVGTransformFromMatrix(SVGMatrix &matrix);
+ SVGTransform *consolidate();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTransformListImpl *handle() const { return impl; }
+
+private:
+ SVGTransformListImpl *impl;
+};
+
+}
+
+#endif
+// vim:ts=4:noet
+
diff --git a/ksvg/dom/SVGTransformable.cc b/ksvg/dom/SVGTransformable.cc
new file mode 100644
index 00000000..64530d39
--- /dev/null
+++ b/ksvg/dom/SVGTransformable.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGTransformable.h"
+#include "SVGTransformableImpl.h"
+#include "SVGAnimatedTransformList.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGTransformable::SVGTransformable() : SVGLocatable()
+{
+ impl = 0;
+}
+
+SVGTransformable::SVGTransformable(const SVGTransformable &other) : SVGLocatable(other)
+{
+ (*this) = other;
+}
+
+SVGTransformable &SVGTransformable::operator=(const SVGTransformable &other)
+{
+ SVGLocatable::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGTransformable::SVGTransformable(SVGTransformableImpl *other) : SVGLocatable(other)
+{
+ impl = other;
+}
+
+SVGTransformable::~SVGTransformable()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+SVGAnimatedTransformList SVGTransformable::transform()
+{
+ if(!impl) return SVGAnimatedTransformList(0);
+ return SVGAnimatedTransformList(impl->transform());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGTransformable.h b/ksvg/dom/SVGTransformable.h
new file mode 100644
index 00000000..54bf0a40
--- /dev/null
+++ b/ksvg/dom/SVGTransformable.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransformable_H
+#define SVGTransformable_H
+
+#include "SVGLocatable.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedTransformList;
+class SVGTransformableImpl;
+class SVGTransformable : public SVGLocatable
+{
+public:
+ SVGTransformable(const SVGTransformable &other);
+ SVGTransformable &operator=(const SVGTransformable &other);
+ SVGTransformable(SVGTransformableImpl *other);
+ virtual ~SVGTransformable();
+
+ SVGAnimatedTransformList transform();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGTransformableImpl *handle() const { return impl; }
+
+protected:
+ SVGTransformable();
+
+private:
+ SVGTransformableImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGURIReference.cc b/ksvg/dom/SVGURIReference.cc
new file mode 100644
index 00000000..e872e9d6
--- /dev/null
+++ b/ksvg/dom/SVGURIReference.cc
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGURIReference.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGAnimatedString.h"
+
+using namespace KSVG;
+
+SVGURIReference::SVGURIReference()
+{
+ impl = new SVGURIReferenceImpl();
+}
+
+SVGURIReference::SVGURIReference(const SVGURIReference &other)
+{
+ impl = other.impl;
+}
+
+SVGURIReference &SVGURIReference::operator=(const SVGURIReference &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ delete impl;
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGURIReference::SVGURIReference(SVGURIReferenceImpl *other)
+{
+ impl = other;
+}
+
+SVGURIReference::~SVGURIReference()
+{
+}
+
+SVGAnimatedString SVGURIReference::href() const
+{
+ if(!impl) return SVGAnimatedString(0);
+ return SVGAnimatedString(impl->href());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGURIReference.h b/ksvg/dom/SVGURIReference.h
new file mode 100644
index 00000000..571cd2b2
--- /dev/null
+++ b/ksvg/dom/SVGURIReference.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGURIReference_H
+#define SVGURIReference_H
+
+namespace KSVG
+{
+
+class SVGAnimatedString;
+class SVGURIReferenceImpl;
+class SVGURIReference
+{
+public:
+ SVGURIReference(const SVGURIReference &other);
+ SVGURIReference &operator=(const SVGURIReference &other);
+ SVGURIReference(SVGURIReferenceImpl *other);
+ virtual ~SVGURIReference();
+
+ SVGAnimatedString href() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGURIReferenceImpl *handle() const { return impl; }
+
+protected:
+ SVGURIReference();
+
+private:
+ SVGURIReferenceImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGUnitTypes.h b/ksvg/dom/SVGUnitTypes.h
new file mode 100644
index 00000000..76079af2
--- /dev/null
+++ b/ksvg/dom/SVGUnitTypes.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGUnitTypes_H
+#define SVGUnitTypes_H
+
+namespace KSVG
+{
+
+struct SVGUnitTypes
+{
+ enum
+ {
+ SVG_UNIT_TYPE_UNKNOWN = 0,
+ SVG_UNIT_TYPE_USERSPACEONUSE = 1,
+ SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2
+ };
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGUseElement.cc b/ksvg/dom/SVGUseElement.cc
new file mode 100644
index 00000000..8cd8ef26
--- /dev/null
+++ b/ksvg/dom/SVGUseElement.cc
@@ -0,0 +1,111 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGUseElement.h"
+#include "SVGUseElementImpl.h"
+#include "SVGElementInstance.h"
+#include "SVGAnimatedLength.h"
+
+using namespace KSVG;
+
+SVGUseElement::SVGUseElement() : SVGElement(), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired(), SVGStylable(), SVGTransformable(), SVGURIReference()
+{
+ impl = 0;
+}
+
+SVGUseElement::SVGUseElement(const SVGUseElement &other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGUseElement &SVGUseElement::operator =(const SVGUseElement &other)
+{
+ SVGElement::operator=(other);
+ SVGTests::operator=(other);
+ SVGLangSpace::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGStylable::operator=(other);
+ SVGTransformable::operator=(other);
+ SVGURIReference::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGUseElement::SVGUseElement(SVGUseElementImpl *other) : SVGElement(other), SVGTests(other), SVGLangSpace(other), SVGExternalResourcesRequired(other), SVGStylable(other), SVGTransformable(other), SVGURIReference(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGUseElement::~SVGUseElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGAnimatedLength SVGUseElement::x() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->x());
+}
+
+SVGAnimatedLength SVGUseElement::y() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->y());
+}
+
+SVGAnimatedLength SVGUseElement::width() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->width());
+}
+
+SVGAnimatedLength SVGUseElement::height() const
+{
+ if(!impl) return SVGAnimatedLength(0);
+ return SVGAnimatedLength(impl->height());
+}
+
+SVGElementInstance SVGUseElement::instanceRoot() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return impl->instanceRoot();
+}
+
+SVGElementInstance SVGUseElement::animatedInstanceRoot() const
+{
+ if(!impl) return SVGElementInstance(0);
+ return impl->animatedInstanceRoot();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGUseElement.h b/ksvg/dom/SVGUseElement.h
new file mode 100644
index 00000000..fb494abb
--- /dev/null
+++ b/ksvg/dom/SVGUseElement.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGUseElement_H
+#define SVGUseElement_H
+
+#include "SVGElement.h"
+#include "SVGTests.h"
+#include "SVGLangSpace.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGStylable.h"
+#include "SVGTransformable.h"
+#include "SVGURIReference.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLength;
+class SVGElementInstance;
+class SVGUseElementImpl;
+class SVGUseElement : public SVGElement,
+ public SVGTests,
+ public SVGLangSpace,
+ public SVGExternalResourcesRequired,
+ public SVGStylable,
+ public SVGTransformable,
+ public SVGURIReference
+{
+public:
+ SVGUseElement();
+ SVGUseElement(const SVGUseElement &other);
+ SVGUseElement &operator=(const SVGUseElement &other);
+ SVGUseElement(SVGUseElementImpl *other);
+ virtual ~SVGUseElement();
+
+ SVGAnimatedLength x() const;
+ SVGAnimatedLength y() const;
+ SVGAnimatedLength width() const;
+ SVGAnimatedLength height() const;
+ SVGElementInstance instanceRoot() const;
+ SVGElementInstance animatedInstanceRoot() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGUseElementImpl *handle() const { return impl; }
+
+private:
+ SVGUseElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGVKernElement.cc b/ksvg/dom/SVGVKernElement.cc
new file mode 100644
index 00000000..ad6dbee5
--- /dev/null
+++ b/ksvg/dom/SVGVKernElement.cc
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGVKernElement.h"
+#include "SVGVKernElementImpl.h"
+
+using namespace KSVG;
+
+SVGVKernElement::SVGVKernElement() : SVGElement()
+{
+ impl = 0;
+}
+
+SVGVKernElement::SVGVKernElement(const SVGVKernElement &other) : SVGElement(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGVKernElement &SVGVKernElement::operator =(const SVGVKernElement &other)
+{
+ SVGElement::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGVKernElement::SVGVKernElement(SVGVKernElementImpl *other) : SVGElement(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGVKernElement::~SVGVKernElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGVKernElement.h b/ksvg/dom/SVGVKernElement.h
new file mode 100644
index 00000000..6649ab1a
--- /dev/null
+++ b/ksvg/dom/SVGVKernElement.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGVKernElement_H
+#define SVGVKernElement_H
+
+#include "SVGElement.h"
+
+namespace KSVG
+{
+
+class SVGVKernElementImpl;
+class SVGVKernElement : public SVGElement
+{
+public:
+ SVGVKernElement();
+ SVGVKernElement(const SVGVKernElement &other);
+ SVGVKernElement &operator=(const SVGVKernElement &other);
+ SVGVKernElement(SVGVKernElementImpl *other);
+ virtual ~SVGVKernElement();
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGVKernElementImpl *handle() const { return impl; }
+
+private:
+ SVGVKernElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGViewElement.cc b/ksvg/dom/SVGViewElement.cc
new file mode 100644
index 00000000..040d6966
--- /dev/null
+++ b/ksvg/dom/SVGViewElement.cc
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGViewElement.h"
+#include "SVGViewElementImpl.h"
+#include "SVGStringList.h"
+
+using namespace KSVG;
+
+SVGViewElement::SVGViewElement() : SVGElement(), SVGExternalResourcesRequired(), SVGFitToViewBox(), SVGZoomAndPan()
+{
+ impl = 0;
+}
+
+SVGViewElement::SVGViewElement(const SVGViewElement &other) : SVGElement(other), SVGExternalResourcesRequired(other), SVGFitToViewBox(other), SVGZoomAndPan(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGViewElement &SVGViewElement::operator =(const SVGViewElement &other)
+{
+ SVGElement::operator=(other);
+ SVGExternalResourcesRequired::operator=(other);
+ SVGFitToViewBox::operator=(other);
+ SVGZoomAndPan::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGViewElement::SVGViewElement(SVGViewElementImpl *other) : SVGElement(other), SVGExternalResourcesRequired(other), SVGFitToViewBox(other), SVGZoomAndPan(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGViewElement::~SVGViewElement()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGStringList SVGViewElement::viewTarget() const
+{
+ if(!impl) return SVGStringList(0);
+ return SVGStringList(impl->viewTarget());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGViewElement.h b/ksvg/dom/SVGViewElement.h
new file mode 100644
index 00000000..fccedbc8
--- /dev/null
+++ b/ksvg/dom/SVGViewElement.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGViewElement_H
+#define SVGViewElement_H
+
+#include "SVGElement.h"
+#include "SVGExternalResourcesRequired.h"
+#include "SVGFitToViewBox.h"
+#include "SVGZoomAndPan.h"
+
+namespace KSVG
+{
+
+class SVGStringList;
+class SVGViewElementImpl;
+class SVGViewElement : public SVGElement,
+ public SVGExternalResourcesRequired,
+ public SVGFitToViewBox,
+ public SVGZoomAndPan
+{
+public:
+ SVGViewElement();
+ SVGViewElement(const SVGViewElement &other);
+ SVGViewElement &operator=(const SVGViewElement &other);
+ SVGViewElement(SVGViewElementImpl *other);
+ virtual ~SVGViewElement();
+
+ SVGStringList viewTarget() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGViewElementImpl *handle() const { return impl; }
+
+private:
+ SVGViewElementImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGViewSpec.cc b/ksvg/dom/SVGViewSpec.cc
new file mode 100644
index 00000000..a01f7b86
--- /dev/null
+++ b/ksvg/dom/SVGViewSpec.cc
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGViewSpec.h"
+#include "SVGViewSpecImpl.h"
+#include "SVGElement.h"
+#include "SVGTransformList.h"
+
+using namespace KSVG;
+
+SVGViewSpec::SVGViewSpec() : SVGZoomAndPan(), SVGFitToViewBox()
+{
+ impl = new SVGViewSpecImpl();
+ impl->ref();
+}
+
+SVGViewSpec::SVGViewSpec(const SVGViewSpec &other) : SVGZoomAndPan(other), SVGFitToViewBox(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGViewSpec &SVGViewSpec::operator =(const SVGViewSpec &other)
+{
+ SVGZoomAndPan::operator=(other);
+ SVGFitToViewBox::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGViewSpec::SVGViewSpec(SVGViewSpecImpl *other) : SVGZoomAndPan(other), SVGFitToViewBox(other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGViewSpec::~SVGViewSpec()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGTransformList SVGViewSpec::transform() const
+{
+ if(!impl) return SVGTransformList(0);
+ return SVGTransformList(impl->transform());
+}
+
+SVGElement SVGViewSpec::viewTarget() const
+{
+ if(!impl) return SVGElement(0);
+ return SVGElement(impl->viewTarget());
+}
+
+DOM::DOMString SVGViewSpec::viewBoxString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->viewBoxString();
+}
+
+DOM::DOMString SVGViewSpec::preserveAspectRatioString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->preserveAspectRatioString();
+}
+
+DOM::DOMString SVGViewSpec::transformString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->transformString();
+}
+
+DOM::DOMString SVGViewSpec::viewTargetString() const
+{
+ if(!impl) return DOM::DOMString();
+ return impl->viewTargetString();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGViewSpec.h b/ksvg/dom/SVGViewSpec.h
new file mode 100644
index 00000000..c1c7ef8e
--- /dev/null
+++ b/ksvg/dom/SVGViewSpec.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGViewSpec_H
+#define SVGViewSpec_H
+
+#include "SVGZoomAndPan.h"
+#include "SVGFitToViewBox.h"
+#include <dom/dom_string.h>
+
+namespace KSVG
+{
+
+class SVGTransformList;
+class SVGElement;
+class SVGViewSpecImpl;
+class SVGViewSpec : public SVGZoomAndPan,
+ public SVGFitToViewBox
+{
+public:
+ SVGViewSpec();
+ SVGViewSpec(const SVGViewSpec &other);
+ SVGViewSpec &operator=(const SVGViewSpec &other);
+ SVGViewSpec(SVGViewSpecImpl *other);
+ virtual ~SVGViewSpec();
+
+ SVGTransformList transform() const;
+ SVGElement viewTarget() const;
+
+ DOM::DOMString viewBoxString() const;
+ DOM::DOMString preserveAspectRatioString() const;
+ DOM::DOMString transformString() const;
+ DOM::DOMString viewTargetString() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGViewSpecImpl *handle() const { return impl; }
+
+private:
+ SVGViewSpecImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGWindow.cc b/ksvg/dom/SVGWindow.cc
new file mode 100644
index 00000000..9f0fedaf
--- /dev/null
+++ b/ksvg/dom/SVGWindow.cc
@@ -0,0 +1,175 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGWindow.h"
+#include "SVGWindowImpl.h"
+#include "SVGDocument.h"
+
+using namespace KSVG;
+
+SVGWindow::SVGWindow()
+{
+ impl = new SVGWindowImpl();
+ impl->ref();
+}
+
+SVGWindow::SVGWindow(const SVGWindow &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGWindow &SVGWindow::operator =(const SVGWindow &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGWindow::SVGWindow(SVGWindowImpl *other)
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGWindow::~SVGWindow()
+{
+ if(impl)
+ impl->deref();
+}
+
+/*StyleSheet SVGWindow::defaultStyleSheet() const
+{
+ if(!impl) return ; // FIXME
+ return impl->defaultStyleSheet();
+}*/
+
+SVGDocument SVGWindow::document() const
+{
+ if(!impl) return SVGDocument(0); // FIXME
+ return impl->document();
+}
+
+DOM::Event SVGWindow::evt() const
+{
+ if(!impl) return DOM::Event(); // FIXME
+ return impl->evt();
+}
+
+long SVGWindow::innerHeight() const
+{
+ if(!impl) return 0; // FIXME
+ return impl->innerHeight();
+}
+
+long SVGWindow::innerWidth() const
+{
+ if(!impl) return 0; // FIXME
+ return impl->innerWidth();
+}
+
+void SVGWindow::setSrc(const DOM::DOMString &src)
+{
+ if(impl)
+ impl->setSrc(src);
+}
+
+DOM::DOMString SVGWindow::src() const
+{
+ if(!impl) return DOM::DOMString(); // FIXME
+ return impl->src();
+}
+
+void SVGWindow::clearInterval(long interval)
+{
+ if(impl)
+ impl->clearInterval(interval);
+}
+
+void SVGWindow::clearTimeout(long timeout)
+{
+ if(impl)
+ impl->clearTimeout(timeout);
+}
+
+void SVGWindow::getURL(const DOM::DOMString &uri, const DOM::EventListener &callback)
+{
+ if(impl)
+ impl->getURL(uri, callback);
+}
+
+/*DocumentFragment SVGWindow::parseXML(const DOM::DOMString &source, const Document &document)
+{
+ if(!impl) return ; // FIXME
+ return impl->parseXML(source, document);
+}*/
+
+void SVGWindow::postURL(const DOM::DOMString &uri, const DOM::DOMString &data, const DOM::EventListener &callback, const DOM::DOMString &mimeType, const DOM::DOMString &contentEncoding)
+{
+ if(impl)
+ impl->postURL(uri, data, callback, mimeType, contentEncoding);
+}
+
+DOM::DOMString SVGWindow::printNode(const DOM::Node &node)
+{
+ if(!impl) return DOM::DOMString(); // FIXME
+ return impl->printNode(node);
+}
+
+long SVGWindow::setInterval(const DOM::DOMString &code, const long &delay)
+{
+ if(!impl) return 0; // FIXME
+ return impl->setInterval(code, delay);
+}
+
+long SVGWindow::setTimeout(const DOM::DOMString &code, const long &delay)
+{
+ if(!impl) return 0; // FIXME
+ return impl->setTimeout(code, delay);
+}
+
+void SVGWindow::alert(const DOM::DOMString &message)
+{
+ if(impl)
+ impl->alert(message);
+}
+
+bool SVGWindow::confirm(const DOM::DOMString &message)
+{
+ if(!impl) return false; // FIXME
+ return impl->confirm(message);
+}
+
+DOM::DOMString SVGWindow::prompt(const DOM::DOMString &message, const DOM::DOMString &_default)
+{
+ if(!impl) return DOM::DOMString(); // FIXME
+ return impl->prompt(message, _default);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGWindow.h b/ksvg/dom/SVGWindow.h
new file mode 100644
index 00000000..2389286f
--- /dev/null
+++ b/ksvg/dom/SVGWindow.h
@@ -0,0 +1,127 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGWindow_H
+#define SVGWindow_H
+
+#include <dom/dom_string.h>
+#include <dom/dom_node.h>
+#include <dom/dom2_events.h>
+
+namespace KSVG
+{
+
+class SVGDocument;
+class SVGWindowImpl;
+
+class SVGWindow
+{
+public:
+ SVGWindow();
+ SVGWindow(const SVGWindow &other);
+ SVGWindow &operator=(const SVGWindow &other);
+ SVGWindow(SVGWindowImpl *other);
+ virtual ~SVGWindow();
+
+ //StyleSheet defaultStyleSheet() const;
+ SVGDocument document() const;
+ DOM::Event evt() const;
+
+ /**
+ * @return Viewport height in pixels.
+ */
+ long innerHeight() const;
+
+ /**
+ * @return Viewport width in pixels.
+ */
+ long innerWidth() const;
+
+ void setSrc(const DOM::DOMString &src);
+
+ /**
+ * @return The URI of the current document.
+ */
+ DOM::DOMString src() const;
+
+ void clearInterval(long interval);
+ void clearTimeout(long timeout);
+
+ /**
+ * Get data from the given URL using the HTTP GET method. Notify the callback when done.
+ *
+ * @param uri The URI reference for the data to be loaded.
+ * @param callback The method to be invoked when the data is available.
+ */
+ void getURL(const DOM::DOMString &uri, const DOM::EventListener &callback);
+ //DOM::DocumentFragment parseXML(const DOM::DOMString &source, const DOM::Document &document);
+ void postURL(const DOM::DOMString &uri, const DOM::DOMString &data, const DOM::EventListener &callback, const DOM::DOMString &mimeType, const DOM::DOMString &contentEncoding);
+
+ /**
+ * Converts a Node into a DOMString. The string is an XML representation of the Node.
+ *
+ * @param node The Node to be converted.
+ * @return Converts a Node into a DOMString. The string is an XML representation of the Node.
+ */
+ DOM::DOMString printNode(const DOM::Node &node);
+ long setInterval(const DOM::DOMString &code, const long &delay);
+ long setTimeout(const DOM::DOMString &code, const long &delay);
+
+ /**
+ * Displays a modal synchronous message to the user if possible in the current user environment.
+ * Commonly, this message takes the form of a pop-up window with a single dispose button.
+ *
+ * @param message The message to be displayed.
+ */
+ void alert(const DOM::DOMString &message);
+
+ /**
+ * Displays a modal synchronous message to the user if possible in the current user environment.
+ * The user is able to accept or reject the message. Commonly, this message takes the form of
+ * a pop-up window with either a Yes/No or OK/Cancel button pair.
+ *
+ * @param message The message to be displayed.
+ * @return A boolean indicating the user's response. True for accept, False for reject.
+ */
+ bool confirm(const DOM::DOMString &message);
+
+ /**
+ * Displays a modal synchronous message to the user if possible in the current user environment.
+ * The user is able to enter a response to the message. Commonly, this message takes the form of
+ * a pop-up window with a single text entry field.
+ *
+ * @param message The message to be displayed.
+ * @param _default The default response to suggest to the user. This can be displayed in the text field and be modified by the user.
+ * @return A boolean indicating the user's response. True for accept, False for reject.
+ */
+ DOM::DOMString prompt(const DOM::DOMString &message, const DOM::DOMString &_default);
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGWindowImpl *handle() const { return impl; }
+
+private:
+ SVGWindowImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGZoomAndPan.cc b/ksvg/dom/SVGZoomAndPan.cc
new file mode 100644
index 00000000..a65284f1
--- /dev/null
+++ b/ksvg/dom/SVGZoomAndPan.cc
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGZoomAndPan.h"
+#include "SVGZoomAndPanImpl.h"
+
+using namespace KSVG;
+
+// This class can't be constructed seperately.
+SVGZoomAndPan::SVGZoomAndPan()
+{
+ impl = 0;
+}
+
+SVGZoomAndPan::SVGZoomAndPan(const SVGZoomAndPan &other) : impl(0)
+{
+ (*this) = other;
+}
+
+SVGZoomAndPan &SVGZoomAndPan::operator=(const SVGZoomAndPan &other)
+{
+ if(impl == other.impl)
+ return *this;
+
+ impl = other.impl;
+
+ return *this;
+}
+
+SVGZoomAndPan::SVGZoomAndPan(SVGZoomAndPanImpl *other)
+{
+ impl = other;
+}
+
+SVGZoomAndPan::~SVGZoomAndPan()
+{
+ // We are not allowed to delete 'impl' as it's not refcounted.
+ // delete impl;
+}
+
+void SVGZoomAndPan::setZoomAndPan(unsigned short zoomAndPan)
+{
+ if(impl)
+ impl->setZoomAndPan(zoomAndPan);
+}
+
+unsigned short SVGZoomAndPan::zoomAndPan() const
+{
+ if(!impl) return SVG_ZOOMANDPAN_UNKNOWN;
+ return impl->zoomAndPan();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGZoomAndPan.h b/ksvg/dom/SVGZoomAndPan.h
new file mode 100644
index 00000000..0a1cdf19
--- /dev/null
+++ b/ksvg/dom/SVGZoomAndPan.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGZoomAndPan_H
+#define SVGZoomAndPan_H
+
+namespace KSVG
+{
+
+enum ZoomAndPan
+{
+ SVG_ZOOMANDPAN_UNKNOWN = 0,
+ SVG_ZOOMANDPAN_DISABLE = 1,
+ SVG_ZOOMANDPAN_MAGNIFY = 2
+};
+
+class SVGZoomAndPanImpl;
+class SVGZoomAndPan
+{
+public:
+ SVGZoomAndPan(const SVGZoomAndPan &other);
+ SVGZoomAndPan &operator=(const SVGZoomAndPan &other);
+ SVGZoomAndPan(SVGZoomAndPanImpl *other);
+ virtual ~SVGZoomAndPan();
+
+ void setZoomAndPan(unsigned short zoomAndPan);
+ unsigned short zoomAndPan() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGZoomAndPanImpl *handle() const { return impl; }
+
+protected:
+ SVGZoomAndPan();
+
+private:
+ SVGZoomAndPanImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGZoomEvent.cc b/ksvg/dom/SVGZoomEvent.cc
new file mode 100644
index 00000000..bc73a438
--- /dev/null
+++ b/ksvg/dom/SVGZoomEvent.cc
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGZoomEvent.h"
+#include "SVGZoomEventImpl.h"
+#include "SVGRect.h"
+#include "SVGPoint.h"
+
+using namespace KSVG;
+
+SVGZoomEvent::SVGZoomEvent() : DOM::UIEvent()
+{
+ impl = 0;
+}
+
+SVGZoomEvent::SVGZoomEvent(const SVGZoomEvent &other) : DOM::UIEvent(other), impl(0)
+{
+ (*this) = other;
+}
+
+SVGZoomEvent &SVGZoomEvent::operator =(const SVGZoomEvent &other)
+{
+ DOM::UIEvent::operator=(other);
+
+ if(impl == other.impl)
+ return *this;
+
+ if(impl)
+ impl->deref();
+
+ impl = other.impl;
+
+ if(impl)
+ impl->ref();
+
+ return *this;
+}
+
+SVGZoomEvent::SVGZoomEvent(SVGZoomEventImpl *other) : DOM::UIEvent()
+{
+ impl = other;
+ if(impl)
+ impl->ref();
+}
+
+SVGZoomEvent::~SVGZoomEvent()
+{
+ if(impl)
+ impl->deref();
+}
+
+SVGRect SVGZoomEvent::zoomRectScreen() const
+{
+ if(!impl) return SVGRect(0);
+ return SVGRect(impl->zoomRectScreen());
+}
+
+float SVGZoomEvent::previousScale() const
+{
+ if(!impl) return -1;
+ return impl->previousScale();
+}
+
+SVGPoint SVGZoomEvent::previousTranslate() const
+{
+ if(!impl) return SVGPoint(0);
+ return SVGPoint(impl->previousTranslate());
+}
+
+float SVGZoomEvent::newScale() const
+{
+ if(!impl) return -1;
+ return impl->newScale();
+}
+
+SVGPoint SVGZoomEvent::newTranslate() const
+{
+ if(!impl) return SVGPoint(0);
+ return SVGPoint(impl->newTranslate());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/dom/SVGZoomEvent.h b/ksvg/dom/SVGZoomEvent.h
new file mode 100644
index 00000000..f759e9bd
--- /dev/null
+++ b/ksvg/dom/SVGZoomEvent.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGZoomEvent_H
+#define SVGZoomEvent_H
+
+#include <dom/dom2_events.h>
+
+namespace KSVG
+{
+
+class SVGRect;
+class SVGPoint;
+class SVGZoomEventImpl;
+class SVGZoomEvent : public DOM::UIEvent
+{
+public:
+ SVGZoomEvent();
+ SVGZoomEvent(const SVGZoomEvent &other);
+ SVGZoomEvent &operator=(const SVGZoomEvent &other);
+ SVGZoomEvent(SVGZoomEventImpl *other);
+ virtual ~SVGZoomEvent();
+
+ SVGRect zoomRectScreen() const;
+ float previousScale() const;
+ SVGPoint previousTranslate() const;
+ float newScale() const;
+ SVGPoint newTranslate() const;
+
+ // Internal! - NOT PART OF THE SVG SPECIFICATION
+ SVGZoomEventImpl *handle() const { return impl; }
+
+private:
+ SVGZoomEventImpl *impl;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/Makefile.am b/ksvg/ecma/Makefile.am
new file mode 100644
index 00000000..b3eea2b5
--- /dev/null
+++ b/ksvg/ecma/Makefile.am
@@ -0,0 +1,7 @@
+INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/data -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+METASOURCES = AUTO
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+
+noinst_LTLIBRARIES = libksvgecma.la
+
+libksvgecma_la_SOURCES = ksvg_scriptinterpreter.cpp ksvg_ecma.cpp ksvg_helper.cpp ksvg_ecmaeventlistener.cpp ksvg_window.cpp
diff --git a/ksvg/ecma/ksvg_bridge.h b/ksvg/ecma/ksvg_bridge.h
new file mode 100644
index 00000000..784dea15
--- /dev/null
+++ b/ksvg/ecma/ksvg_bridge.h
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGBridge_H
+#define KSVGBridge_H
+
+#include <kdebug.h>
+
+#include <kjs/object.h>
+#include <kjs/lookup.h>
+#include <kjs/interpreter.h> // for ExecState
+
+namespace KJS
+{
+ class Value;
+ class UString;
+ class ExecState;
+}
+
+// Base class for all bridges
+// The T class must provide prototype(exec), get and hasProperty
+// and have a static s_classInfo object
+template<class T>
+class KSVGBridge : public KJS::ObjectImp
+{
+public:
+ KSVGBridge(KJS::ExecState *exec, T *impl) : KJS::ObjectImp(impl->prototype(exec)), m_impl(impl) { }
+
+ T *impl() const { return m_impl; }
+
+ virtual KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const
+ {
+ kdDebug(26004) << "KSVGBridge::get(), " << propertyName.qstring() << " Name: " << classInfo()->className << " Object: " << m_impl << endl;
+
+ // Look for standard properties (e.g. those in the hashtables)
+ KJS::Value val = m_impl->get(exec, propertyName, this);
+
+ if(val.type() != KJS::UndefinedType)
+ return val;
+
+ // Not found -> forward to ObjectImp.
+ val = KJS::ObjectImp::get(exec, propertyName);
+ if(val.type() == KJS::UndefinedType)
+ kdDebug(26004) << "WARNING: " << propertyName.qstring() << " not found in... Name: " << classInfo()->className << " Object: " << m_impl << " on line : " << exec->context().curStmtFirstLine() << endl;
+ return val;
+ }
+
+ virtual bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const
+ {
+ kdDebug(26004) << "KSVGBridge::hasProperty(), " << propertyName.qstring() << " Name: " << classInfo()->className << " Object: " << m_impl << endl;
+
+ if(m_impl->hasProperty(exec, propertyName))
+ return true;
+
+ return KJS::ObjectImp::hasProperty(exec, propertyName);
+ }
+
+ virtual const KJS::ClassInfo *classInfo() const { return &T::s_classInfo; }
+
+protected:
+ T *m_impl;
+};
+
+// Base class for readwrite bridges
+// T must also implement put (use KSVG_PUT in the header file)
+template<class T>
+class KSVGRWBridge : public KSVGBridge<T>
+{
+public:
+ KSVGRWBridge(KJS::ExecState *exec, T *impl) : KSVGBridge<T>(exec, impl) { }
+
+ virtual void put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr)
+ {
+// if(!(attr & KJS::Internal))
+// kdDebug(26004) << "KSVGBridge::put(), " << propertyName.qstring() << " Name: " << classInfo()->className << " Object: " << m_impl << endl;
+
+ // Try to see if we know this property (and need to take special action)
+ if(this->m_impl->put(exec, propertyName, value, attr))
+ return;
+
+ // We don't -> set property in ObjectImp.
+ KJS::ObjectImp::put(exec, propertyName, value, attr);
+ }
+};
+
+#endif
diff --git a/ksvg/ecma/ksvg_cacheimpl.h b/ksvg/ecma/ksvg_cacheimpl.h
new file mode 100644
index 00000000..1140f1b4
--- /dev/null
+++ b/ksvg/ecma/ksvg_cacheimpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGCacheImpl_H
+#define KSVGCacheImpl_H
+
+#include "ksvg_scriptinterpreter.h"
+
+// Lookup or create JS object around an existing "DOM Object"
+template<class DOMObj, class KJSDOMObj>
+inline KJS::Value cacheDOMObject(KJS::ExecState *exec, DOMObj *domObj)
+{
+ KJS::ObjectImp *ret;
+ if(!domObj)
+ return KJS::Null();
+
+ KSVGScriptInterpreter *interp = static_cast<KSVGScriptInterpreter *>(exec->interpreter());
+ if((ret = interp->getDOMObject(domObj)))
+ return KJS::Value(ret);
+ else
+ {
+ ret = new KJSDOMObj(exec, domObj);
+ interp->putDOMObject(domObj, ret);
+ return KJS::Value(ret);
+ }
+}
+
+// Lookup or create singleton Impl object, and return a unique bridge object for it.
+// (Very much like KJS::cacheGlobalObject, which is for a singleton ObjectImp)
+// This one is mostly used for Constructor objects.
+template <class ClassCtor>
+inline KJS::Object cacheGlobalBridge(KJS::ExecState *exec, const KJS::Identifier &propertyName)
+{
+ KJS::ValueImp *obj = static_cast<KJS::ObjectImp*>(exec->interpreter()->globalObject().imp())->getDirect(propertyName);
+ if(obj)
+ return KJS::Object::dynamicCast(KJS::Value(obj));
+ else
+ {
+ ClassCtor* ctor = new ClassCtor(exec); // create the ClassCtor instance
+ KJS::Object newObject(new KSVGBridge<ClassCtor>(exec, ctor)); // create the bridge around it
+ exec->interpreter()->globalObject().put(exec, propertyName, newObject, KJS::Internal);
+ return newObject;
+ }
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_ecma.cpp b/ksvg/ecma/ksvg_ecma.cpp
new file mode 100644
index 00000000..a2aed6ce
--- /dev/null
+++ b/ksvg/ecma/ksvg_ecma.cpp
@@ -0,0 +1,336 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qvariant.h>
+
+#include <dom/dom2_events.h>
+
+#include "SVGEcma.h"
+
+#include "SVGDocumentImpl.h"
+
+#include "ksvg_ecma.h"
+#include "ksvg_window.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecmaeventlistener.h"
+
+#include "KSVGLoader.h"
+
+using namespace KSVG;
+using namespace KJS;
+
+class AsyncStatus : public ObjectImp
+{
+public:
+ AsyncStatus() : ObjectImp() { }
+
+ virtual bool implementsCall() const { return true; }
+ virtual Value call(ExecState *exec, Object &thisObj, const List &args);
+};
+
+Value AsyncStatus::call(ExecState *exec, Object &, const List &args)
+{
+ kdDebug(26004) << "[AsyncStatus] " << args[0].toString(exec).ascii() << endl;
+
+ if(args[0].toString(exec) == "success")
+ return Number(1);
+ else
+ return Undefined();
+}
+
+KSVGEcma::KSVGEcma(SVGDocumentImpl *doc) : m_doc(doc)
+{
+ m_init = false;
+ m_hasListeners = false;
+
+ m_window = 0;
+ m_interpreter = 0;
+
+ m_ecmaEventListeners.setAutoDelete(true);
+}
+
+KSVGEcma::~KSVGEcma()
+{
+ // We are 0 soon so event listeners may NOT call us
+ QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+ for(; it.current(); ++it)
+ it.current()->forbidRemove();
+
+ if(m_interpreter)
+ delete m_interpreter;
+}
+
+bool KSVGEcma::initialized()
+{
+ return m_init;
+}
+
+void KSVGEcma::setup()
+{
+ if(m_init)
+ return;
+
+ m_init = true;
+
+ // Create handler for js calls
+ m_window = new KSVG::Window(m_doc);
+ Object globalObject(m_window);
+
+ // Create code interpreter
+ m_interpreter = new KSVGScriptInterpreter(globalObject, m_doc);
+
+ // Set object prototype for global object
+ m_window->setPrototype(m_interpreter->builtinObjectPrototype());
+
+ // Create bridge for document. Could be done on demand now, though
+ KSVGBridge<SVGDocumentImpl> *documentRequest = new KSVGBridge<SVGDocumentImpl>(m_interpreter->globalExec(), m_doc);
+ documentRequest->ref();
+
+ m_interpreter->putDOMObject(m_doc->handle(), documentRequest);
+}
+
+Completion KSVGEcma::evaluate(const UString &code, const Value &thisV)
+{
+#ifdef KJS_VERBOSE
+ kdDebug(6070) << "KSVGEcma::evaluate " << code.qstring() << endl;
+#endif
+
+ return m_interpreter->evaluate(code, thisV);
+}
+
+Object KSVGEcma::globalObject()
+{
+ return m_interpreter->globalObject();
+}
+
+ExecState *KSVGEcma::globalExec()
+{
+ return m_interpreter->globalExec();
+}
+
+SVGEventListener *KSVGEcma::createEventListener(DOM::DOMString type)
+{
+ QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+
+ for(; it.current(); ++it)
+ {
+ if(it.current()->type() == type.string())
+ return static_cast<SVGEventListener *>(it.current());
+ }
+
+ setup();
+
+ Object constr = m_interpreter->builtinFunction();
+
+ List args;
+ args.append(String("event"));
+ args.append(String(type.string()));
+
+ Object obj = constr.construct(m_interpreter->globalExec(), args);
+
+ // Note that the KSVGEcmaEventListener constructor adds itself to the m_ecmaEventListeners list
+ KSVGEcmaEventListener *event = new KSVGEcmaEventListener(obj, type.string(), this);
+ event->ref();
+
+ // addEventListener() is called by KSVGEcmaListeners ctor, so it's
+ // safe to check to count of the eventListeners list (Niko)
+ if(m_ecmaEventListeners.count() > 0)
+ m_hasListeners = true;
+
+ return event;
+}
+
+QString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const
+{
+ KSVGEcmaEventListener *event = static_cast<KSVGEcmaEventListener *>(listener);
+ if(!event)
+ return QString::null;
+
+ return event->type();
+}
+
+void KSVGEcma::addEventListener(KSVGEcmaEventListener *listener)
+{
+ m_ecmaEventListeners.append(listener);
+}
+
+void KSVGEcma::removeEventListener(KSVGEcmaEventListener *listener)
+{
+ m_ecmaEventListeners.take(m_ecmaEventListeners.find(listener));
+
+ if(m_ecmaEventListeners.count() == 0)
+ m_hasListeners = false;
+}
+
+bool KSVGEcma::hasEventListeners()
+{
+ return m_hasListeners;
+}
+
+void KSVGEcma::finishedWithEvent(SVGEventImpl *event)
+{
+ KSVGScriptInterpreter *interpreter = static_cast<KSVGScriptInterpreter *>(globalExec()->interpreter());
+ interpreter->removeDOMObject(event);
+}
+
+Value KSVGEcma::getUrl(ExecState *exec, ::KURL url)
+{
+ Object *status = new Object(new AsyncStatus());
+
+ // FIXME: Security issue, allows local testing of getURL(), REMOVE BEFORE RELEASE! (Niko)
+ QString svgDocument = KSVGLoader::getUrl(url, true);
+ if(svgDocument.length() > 0)
+ {
+ status->put(exec, Identifier("success"), Boolean(true));
+ status->put(exec, Identifier("content"), String(svgDocument));
+ }
+ else
+ {
+ status->put(exec, Identifier("success"), Boolean(false));
+ status->put(exec, Identifier("content"), String(""));
+ }
+
+ return Value(*status);
+}
+
+void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, Object &callBackFunction)
+{
+ Object *status = new Object(new AsyncStatus());
+ status->put(exec, Identifier("content"), String(""));
+ status->put(exec, Identifier("success"), Boolean(false));
+
+ QByteArray byteArray;
+ QDataStream ds(byteArray, IO_WriteOnly);
+ ds << data;
+
+ // Support gzip compression
+ if(contentEncoding == "gzip" || contentEncoding == "deflate")
+ byteArray = qCompress(byteArray);
+
+ KSVGLoader *loader = new KSVGLoader();
+ loader->postUrl(url, byteArray, mimeType, exec, callBackFunction, *status);
+ delete loader;
+}
+
+// Helpers
+Value KSVG::getDOMNode(ExecState *exec, DOM::Node n)
+{
+ ObjectImp *ret = 0;
+ if(n.isNull())
+ return Null();
+
+ KSVGScriptInterpreter *interpreter = static_cast<KSVGScriptInterpreter *>(exec->interpreter());
+
+ ObjectImp *request = interpreter->getDOMObject(n.handle());
+ if(request)
+ return Value(request);
+
+ SVGElementImpl *elem = 0;
+
+ switch(n.nodeType())
+ {
+ case DOM::Node::ELEMENT_NODE:
+ elem = interpreter->document()->getElementFromHandle(n.handle());
+ if(!elem)
+ {
+ // Lookup different document, if possible
+ SVGDocumentImpl *different = interpreter->document()->getDocumentFromHandle(n.ownerDocument().handle());
+
+ if(!different)
+ return Null();
+
+ elem = different->getElementFromHandle(n.handle());
+
+ if(!elem)
+ return Null();
+ }
+
+ // The generated bridge() function does not ref the ret itself
+ ret = elem->bridge(exec);
+ ret->ref();
+ break;
+ case DOM::Node::TEXT_NODE:
+ ret = new KSVGRWBridge<SVGDOMTextBridge>(exec, new SVGDOMTextBridge(n));
+ ret->ref();
+ break;
+ default:
+ ret = new KSVGBridge<SVGDOMNodeBridge>(exec, new SVGDOMNodeBridge(n));
+ ret->ref();
+ break;
+ }
+
+ interpreter->putDOMObject(n.handle(), ret);
+
+ return Value(ret);
+}
+
+Value KSVG::getDOMEvent(ExecState *exec, SVGEventImpl *e)
+{
+ return e->cache(exec);
+}
+
+Value KSVG::getString(DOM::DOMString s)
+{
+ if(s.isNull())
+ return Null();
+ else
+ return String(s);
+}
+
+DOM::Node KSVG::toNode(const Value &val)
+{
+ Object obj = Object::dynamicCast(val);
+ if(obj.isNull())
+ return DOM::Node();
+
+ SVGDOMNodeBridge *bridge = toNodeBridge(static_cast<ObjectImp *>(obj.imp()));
+
+ if(bridge)
+ return bridge->impl();
+
+ return DOM::Node();
+}
+
+QVariant KSVG::valueToVariant(ExecState *exec, const Value &val)
+{
+ QVariant res;
+
+ switch(val.type())
+ {
+ case BooleanType:
+ res = QVariant(val.toBoolean(exec), 0);
+ break;
+ case NumberType:
+ res = QVariant(val.toNumber(exec));
+ break;
+ case StringType:
+ res = QVariant(val.toString(exec).qstring());
+ break;
+ default:
+ // everything else will be 'invalid'
+ break;
+ }
+
+ return res;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_ecma.h b/ksvg/ecma/ksvg_ecma.h
new file mode 100644
index 00000000..7c236454
--- /dev/null
+++ b/ksvg/ecma/ksvg_ecma.h
@@ -0,0 +1,114 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGEcma_H
+#define KSVGEcma_H
+
+#include <qptrlist.h>
+
+#include "ksvg_bridge.h"
+
+namespace DOM
+{
+ class Node;
+ class DOMString;
+}
+
+namespace KJS
+{
+ class Value;
+ class Object;
+ class UString;
+ class ExecState;
+ class Completion;
+}
+
+namespace KSVG
+{
+ class Window;
+ class SVGEventImpl;
+ class SVGDocumentImpl;
+ class SVGEventListener;
+ class SVGDOMNodeBridge;
+}
+
+class QVariant;
+
+class KSVGEcmaEventListener;
+class KSVGScriptInterpreter;
+
+typedef KSVGBridge<KSVG::SVGEventImpl> KSVGEcmaEvent;
+
+// Helpers
+namespace KSVG
+{
+ KJS::Value getDOMNode(KJS::ExecState *, DOM::Node);
+ KJS::Value getDOMEvent(KJS::ExecState *, KSVG::SVGEventImpl *);
+ KJS::Value getString(DOM::DOMString);
+
+ QVariant valueToVariant(KJS::ExecState *, const KJS::Value &);
+
+ DOM::Node toNode(const KJS::Value &);
+
+ // This one is part of generateddata.cpp
+ SVGDOMNodeBridge *toNodeBridge(const KJS::ObjectImp *);
+}
+
+class KSVGEcma
+{
+public:
+ KSVGEcma(KSVG::SVGDocumentImpl *doc);
+ ~KSVGEcma();
+
+ void setup();
+ bool initialized();
+
+ KJS::Completion evaluate(const KJS::UString &code, const KJS::Value &thisV);
+
+ KJS::Object globalObject();
+ KJS::ExecState *globalExec();
+
+ KSVGScriptInterpreter *interpreter() { return m_interpreter; }
+
+ KSVG::SVGEventListener *createEventListener(DOM::DOMString type);
+ QString valueOfEventListener(KSVG::SVGEventListener *listener) const;
+ void addEventListener(KSVGEcmaEventListener *listener);
+ void removeEventListener(KSVGEcmaEventListener *listener);
+ bool hasEventListeners();
+
+ void finishedWithEvent(KSVG::SVGEventImpl *event);
+
+ KJS::Value getUrl(KJS::ExecState *exec, ::KURL url);
+ void postUrl(KJS::ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, KJS::Object &callBackFunction);
+
+private:
+ bool m_init, m_hasListeners;
+
+ KSVG::SVGDocumentImpl *m_doc;
+
+ KSVG::Window *m_window;
+ KSVGScriptInterpreter *m_interpreter;
+ QPtrList<KSVGEcmaEventListener> m_ecmaEventListeners;
+
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.cpp b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
new file mode 100644
index 00000000..4b59f924
--- /dev/null
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qvariant.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+#include "ksvg_ecma.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecmaeventlistener.h"
+
+using namespace KSVG;
+using namespace KJS;
+
+KSVGEcmaEventListener::KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma) : SVGEventListener()
+{
+ m_listener = _listener;
+ m_remove = true;
+ m_type = _type;
+ m_ecma = _ecma;
+
+ m_ecma->addEventListener(this);
+}
+
+KSVGEcmaEventListener::~KSVGEcmaEventListener()
+{
+ if(m_remove)
+ m_ecma->removeEventListener(this);
+}
+
+void KSVGEcmaEventListener::forbidRemove()
+{
+ m_remove = false;
+}
+
+void KSVGEcmaEventListener::handleEvent(SVGEventImpl *evt)
+{
+ if(m_ecma && m_listener.implementsCall())
+ {
+ KSVGScriptInterpreter *interpreter = m_ecma->interpreter();
+ ExecState *exec = m_ecma->globalExec();
+
+ // Append 'evt'
+ List args;
+ args.append(getDOMEvent(exec, evt));
+
+ // Set current event
+ interpreter->setCurrentEvent(evt);
+
+ // Call it!
+ Object thisObj = Object::dynamicCast(getDOMNode(exec, *evt->currentTarget()));
+ Value retval = m_listener.call(exec, thisObj, args);
+
+ interpreter->setCurrentEvent(0);
+
+ if(exec->hadException())
+ {
+ exec->clearException();
+
+ // onerror support
+ SVGSVGElementImpl *rootElement = static_cast<KSVGScriptInterpreter *>(exec->interpreter())->document()->rootElement();
+ if(rootElement)
+ rootElement->dispatchEvent(SVGEvent::ERROR_EVENT, true, false);
+ }
+ else
+ {
+ QVariant ret = valueToVariant(exec, retval);
+ if(ret.type() == QVariant::Bool && ret.toBool() == false)
+ evt->preventDefault();
+ }
+ }
+}
+
+DOM::DOMString KSVGEcmaEventListener::eventListenerType()
+{
+ return "KSVGEcmaEventListener - " + m_type;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.h b/ksvg/ecma/ksvg_ecmaeventlistener.h
new file mode 100644
index 00000000..16ebe3bc
--- /dev/null
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGEcmaEventListener_H
+#define KSVGEcmaEventListener_H
+
+#include "SVGEventImpl.h"
+
+namespace KJS
+{
+ class Object;
+}
+
+class KSVGEcmaEventListener : public KSVG::SVGEventListener
+{
+public:
+ KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma);
+ virtual ~KSVGEcmaEventListener();
+
+ virtual void handleEvent(KSVG::SVGEventImpl *evt);
+ virtual DOM::DOMString eventListenerType();
+
+ QString type() { return m_type; }
+
+ void forbidRemove();
+
+private:
+ KSVGEcma *m_ecma;
+ QString m_type;
+ bool m_remove;
+
+ KJS::Object m_listener;
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_helper.cpp b/ksvg/ecma/ksvg_helper.cpp
new file mode 100644
index 00000000..597f9a06
--- /dev/null
+++ b/ksvg/ecma/ksvg_helper.cpp
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kjs/ustring.h>
+#include <kjs/identifier.h>
+
+#include <dom/dom_string.h>
+
+KJS::UString::UString(const DOM::DOMString &d)
+{
+ if(d.isNull())
+ {
+ attach(&Rep::null);
+ return;
+ }
+
+ unsigned int len = d.length();
+ KJS::UChar *dat = new UChar[len];
+ memcpy(dat, d.unicode(), len * sizeof(UChar));
+ rep = KJS::UString::Rep::create(dat, len);
+}
+
+KJS::UString::UString(const QString &d)
+{
+ unsigned int len = d.length();
+ KJS::UChar *dat = new UChar[len];
+ memcpy(dat, d.unicode(), len * sizeof(UChar));
+ rep = KJS::UString::Rep::create(dat, len);
+}
+
+QString KJS::UString::qstring() const
+{
+ return QString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+}
+
+DOM::DOMString KJS::UString::string() const
+{
+ return DOM::DOMString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+}
+
+DOM::DOMString KJS::Identifier::string() const
+{
+ return DOM::DOMString((QChar*) data(), size());
+}
+
+QString KJS::Identifier::qstring() const
+{
+ return QString((QChar*) data(), size());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_lookup.h b/ksvg/ecma/ksvg_lookup.h
new file mode 100644
index 00000000..11c41462
--- /dev/null
+++ b/ksvg/ecma/ksvg_lookup.h
@@ -0,0 +1,318 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVG_LOOKUP_H
+#define KSVG_LOOKUP_H
+
+#include <kjs/object.h>
+#include <kjs/lookup.h>
+#include <kjs/interpreter.h> // for ExecState
+
+#include "ksvg_bridge.h"
+#include "ksvg_scriptinterpreter.h"
+
+#define KSVG_GET_COMMON \
+public: \
+ \
+ /* The standard hasProperty call, auto-generated. Looks in hashtable, forwards to parents. */ \
+ bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \
+ \
+ /* get() method, called by KSVGBridge::get */ \
+ KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::ObjectImp* bridge) const; \
+ \
+ /* Called by lookupGet(). Auto-generated. Forwards to the parent which has the given property. */ \
+ KJS::Value getInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::ObjectImp* bridge) const; \
+ \
+ KJS::Object prototype(KJS::ExecState *exec) const;\
+ \
+ static const KJS::ClassInfo s_classInfo; \
+ \
+ static const struct KJS::HashTable s_hashTable; \
+ \
+ int m_attrFlags;
+
+// For classes with properties to read, and a hashtable.
+#define KSVG_GET \
+ KSVG_GET_COMMON \
+ KJS::Value cache(KJS::ExecState *exec) const;
+
+// Same thing, for base classes (kalyptus helps finding them)
+// The difference is that cache() is virtual
+#define KSVG_BASECLASS_GET \
+ KSVG_GET_COMMON \
+ virtual KJS::Value cache(KJS::ExecState *exec) const;
+
+// For classes without properties, but with a parent class to forward to
+#define KSVG_FORWARDGET \
+public: \
+ \
+ bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \
+ \
+ /* will have the code for getInParents */ \
+ KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::ObjectImp* bridge) const; \
+ \
+ KJS::Object prototype(KJS::ExecState *exec) const;\
+ \
+ static const KJS::ClassInfo s_classInfo; \
+ \
+ KJS::Value cache(KJS::ExecState *exec) const;
+
+// For read-write classes only, i.e. those which support put()
+#define KSVG_PUT \
+ \
+ /* put() method, called by KSVGBridge::put */ \
+ bool put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); \
+ \
+ /* Called by lookupPut. Auto-generated. Looks in hashtable, forwards to parents. */ \
+ bool putInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr);
+
+// For classes which inherit a read-write class, but have no readwrite property themselves
+#define KSVG_FORWARDPUT \
+ \
+ /* put() method, called by KSVGBridge::put */ \
+ bool put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr);
+
+// For classes which need to be accessable with getElementById -> elements
+#define KSVG_NO_TAG_BRIDGE \
+public: \
+ KJS::ObjectImp *bridge(KJS::ExecState *) const { return 0; }
+
+#define KSVG_BRIDGE \
+public: \
+ KJS::ObjectImp *bridge(KJS::ExecState *) const; \
+ virtual DOM::DOMString tagName() const { return s_tagName; } \
+ static const DOM::DOMString s_tagName;
+
+// Fast setting of default values, if the token is known
+// Note: this is actually misnamed it should be KSVG_SET_DEFAULT_ATTRIBUTE
+#define KSVG_SET_ALT_ATTRIBUTE(Token, Name) putValueProperty(ownerDoc()->ecmaEngine()->globalExec(), Token, String(Name), Internal);
+
+// Check if attribute has not been parsed, if the token is known
+#define KSVG_TOKEN_NOT_PARSED_ELEMENT(Token, Element) (~Element->m_attrFlags & (1 << Token))
+#define KSVG_TOKEN_NOT_PARSED(Token) KSVG_TOKEN_NOT_PARSED_ELEMENT(Token, this)
+
+// Checks if the interpreter is in attribute "getting" mode
+#define KSVG_CHECK_ATTRIBUTE bool attributeMode = static_cast<KSVGScriptInterpreter *>(exec->interpreter())->attributeGetMode();
+
+// Sets the class specific flags to a ZERO value
+#define KSVG_EMPTY_FLAGS m_attrFlags = 0;
+
+// to be used in generatedata.cpp
+// GET p1=exec, p2=propertyName, p3=bridge
+// PUT p1=exec, p2=propertyName, p3=value, p4=attr
+#define GET_METHOD_ARGS KJS::ExecState *p1, const KJS::Identifier &p2, const KJS::ObjectImp *p3
+#define PUT_METHOD_ARGS KJS::ExecState *p1, const KJS::Identifier &p2, const KJS::Value &p3, int p4
+
+namespace KSVG
+{
+ /**
+ * Helper method for property lookups
+ *
+ * This method does it all (looking in the hashtable, checking for function
+ * overrides, creating the function or retrieving from cache, calling
+ * getValueProperty in case of a non-function property, forwarding to parent[s] if
+ * unknown property).
+ *
+ * Template arguments:
+ * @param FuncImp the class which implements this object's functions
+ * @param ThisImp the class of "this". It must implement the getValueProperty(exec,token) method,
+ * for non-function properties, and the getInParents() method (auto-generated).
+ *
+ * Method arguments:
+ * @param exec execution state, as usual
+ * @param propertyName the property we're looking for
+ * @param table the static hashtable for this class
+ * @param thisObj "this"
+ */
+ template<class FuncImp, class ThisImp>
+ inline KJS::Value lookupGet(KJS::ExecState *exec,
+ const KJS::Identifier &propertyName,
+ const KJS::HashTable *table,
+ const ThisImp *thisObj, // the 'impl' object
+ const KJS::ObjectImp *bridge)
+ {
+ const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
+
+ if(!entry) // not found, forward to parents
+ return thisObj->getInParents(exec, propertyName, bridge);
+
+ if(entry->attr & KJS::Function)
+ return KJS::lookupOrCreateFunction<FuncImp>(exec, propertyName,
+ const_cast<KJS::ObjectImp *>(bridge),
+ entry->value, entry->params, entry->attr);
+
+ return thisObj->getValueProperty(exec, entry->value);
+ }
+
+ /**
+ * Simplified version of lookupGet in case there are no functions, only "values".
+ * Using this instead of lookupGet removes the need for a FuncImp class.
+ */
+ template <class ThisImp>
+ inline KJS::Value lookupGetValue(KJS::ExecState *exec,
+ const KJS::Identifier &propertyName,
+ const KJS::HashTable *table,
+ const ThisImp *thisObj, // the 'impl' object
+ const KJS::ObjectImp *bridge)
+ {
+ const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
+
+ if(!entry) // not found, forward to parents
+ return thisObj->getInParents(exec, propertyName, bridge);
+
+ if(entry->attr & KJS::Function)
+ kdError(26004) << "Function bit set! Shouldn't happen in lookupGetValue! propertyName was " << propertyName.qstring() << endl;
+
+ return thisObj->getValueProperty(exec, entry->value);
+ }
+
+ /**
+ * This one is for "put".
+ * Lookup hash entry for property to be set, and set the value.
+ * The "this" class must implement putValueProperty.
+ * If it returns false, put() will return false, and KSVGRequest will set a dynamic property in ObjectImp
+ */
+ template <class ThisImp>
+ inline bool lookupPut(KJS::ExecState *exec,
+ const KJS::Identifier &propertyName,
+ const KJS::Value &value,
+ int attr,
+ const KJS::HashTable *table,
+ ThisImp *thisObj)
+ {
+ const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName);
+
+ if(!entry) // not found, forward to parents
+ return thisObj->putInParents(exec, propertyName, value, attr);
+ else if(entry->attr & KJS::Function) // Function: put as override property
+ return false;
+ else if(entry->attr & KJS::ReadOnly && !(attr & KJS::Internal)) // readonly! Can't put!
+ {
+#ifdef KJS_VERBOSE
+ kdWarning(26004) <<" Attempt to change value of readonly property '" << propertyName.qstring() << "'" << endl;
+#endif
+ return true; // "we did it" -> don't put override property
+ }
+ else
+ {
+ if(static_cast<KSVGScriptInterpreter *>(exec->interpreter())->attributeSetMode())
+ thisObj->m_attrFlags |= (1 << entry->value);
+
+ thisObj->putValueProperty(exec, entry->value, value, attr);
+ return true;
+ }
+ }
+}
+
+// Same as kjs' DEFINE_PROTOTYPE, but with a pointer to the hashtable too, and no ClassName here
+// The ClassProto ctor(exec) must be public, so we can use KJS::cacheGlobalObject... (Niko)
+#define KSVG_DEFINE_PROTOTYPE(ClassProto) \
+ namespace KSVG { \
+ class ClassProto : public KJS::ObjectImp { \
+ public: \
+ static KJS::Object self(KJS::ExecState *exec); \
+ ClassProto( KJS::ExecState *exec ) \
+ : KJS::ObjectImp( exec->interpreter()->builtinObjectPrototype() ) {} \
+ virtual const KJS::ClassInfo *classInfo() const { return &info; } \
+ static const KJS::ClassInfo info; \
+ KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \
+ bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \
+ \
+ static const struct KJS::HashTable s_hashTable; \
+ }; \
+ }
+
+// same as IMPLEMENT_PROTOTYPE but in the KSVG namespace, and with ClassName here
+// so that KSVG_DEFINE_PROTOTYPE can be put in a header file ('info' defined here)
+#define KSVG_IMPLEMENT_PROTOTYPE(ClassName,ClassProto,ClassFunc) \
+ KJS::Value KSVG::ClassProto::get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \
+ { \
+ return lookupGetFunction<ClassFunc,KJS::ObjectImp>(exec, propertyName, &s_hashTable, this ); \
+ } \
+ bool KSVG::ClassProto::hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \
+ { /*stupid but we need this to have a common macro for the declaration*/ \
+ return KJS::ObjectImp::hasProperty(exec, propertyName); \
+ } \
+ KJS::Object KSVG::ClassProto::self(KJS::ExecState *exec) \
+ { \
+ return KJS::cacheGlobalObject<ClassProto>( exec, "[[" ClassName ".prototype]]" ); \
+ } \
+ const KJS::ClassInfo ClassProto::info = { ClassName, 0, &s_hashTable, 0 }; \
+
+// same as KSVG_IMPLEMENT_PROTOTYPE but with a parent class to forward calls to
+// Not used within KSVG up to now - each class does a self proto lookup in generateddata.cpp
+#define KSVG_IMPLEMENT_PROTOTYPE_WITH_PARENT(ClassName,ClassProto,ClassFunc,ParentProto) \
+ KJS::Value KSVG::ClassProto::get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \
+ { \
+ KJS::Value val = lookupGetFunction<ClassFunc,KJS::ObjectImp>(exec, propertyName, &s_hashTable, this ); \
+ if ( val.type() != UndefinedType ) return val; \
+ /* Not found -> forward request to "parent" prototype */ \
+ return ParentProto::self(exec).get( exec, propertyName ); \
+ } \
+ bool KSVG::ClassProto::hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \
+ { \
+ if (KJS::ObjectImp::hasProperty(exec, propertyName)) \
+ return true; \
+ return ParentProto::self(exec).hasProperty(exec, propertyName); \
+ } \
+ KJS::Object KSVG::ClassProto::self(KJS::ExecState *exec) \
+ { \
+ return KJS::cacheGlobalObject<ClassProto>( exec, "[[" ClassName ".prototype]]" ); \
+ } \
+ const KJS::ClassInfo ClassProto::info = { ClassName, 0, &s_hashTable, 0 }; \
+
+#define KSVG_IMPLEMENT_PROTOFUNC(ClassFunc,Class) \
+ namespace KSVG { \
+ class ClassFunc : public KJS::ObjectImp { \
+ public: \
+ ClassFunc(KJS::ExecState *exec, int i, int len) \
+ : KJS::ObjectImp( /*proto? */ ), id(i) { \
+ KJS::Value protect(this); \
+ put(exec,"length",KJS::Number(len),KJS::DontDelete|KJS::ReadOnly|KJS::DontEnum); \
+ } \
+ /** Used by call() to check the type of thisObj. Generated code */ \
+ Class * cast(const KJS::ObjectImp* bridge) const; \
+ \
+ virtual bool implementsCall() const { return true; } \
+ /** You need to implement that one */ \
+ virtual KJS::Value call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args); \
+ private: \
+ int id; \
+ }; \
+ }
+
+// To be used when casting the type of an argument
+#define KSVG_CHECK(ClassName, theObj) \
+ ClassName* obj = cast(static_cast<KJS::ObjectImp*>(theObj.imp())); \
+ if (!obj) { \
+ kdDebug(26004) << k_funcinfo << " Wrong object type: expected " << ClassName::s_classInfo.className << " got " << thisObj.classInfo()->className << endl; \
+ Object err = Error::create(exec,TypeError); \
+ exec->setException(err); \
+ return err; \
+ }
+
+// To be used in all call() implementations!
+// Can't use if (!thisObj.inherits(&ClassName::s_classInfo) since we don't
+// use the (single-parent) inheritance of ClassInfo...
+#define KSVG_CHECK_THIS(ClassName) KSVG_CHECK(ClassName, thisObj)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_scriptinterpreter.cpp b/ksvg/ecma/ksvg_scriptinterpreter.cpp
new file mode 100644
index 00000000..b5b9e6dd
--- /dev/null
+++ b/ksvg/ecma/ksvg_scriptinterpreter.cpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGEventImpl.h"
+#include "SVGDocumentImpl.h"
+#include "ksvg_scriptinterpreter.h"
+
+using namespace KSVG;
+using namespace KJS;
+
+KSVGScriptInterpreter::KSVGScriptInterpreter(const Object &global, SVGDocumentImpl *doc) : Interpreter(global), m_document(doc)
+{
+ m_evt = 0;
+
+ m_attributeGetMode = false;
+ m_attributeSetMode = false;
+}
+
+KSVGScriptInterpreter::~KSVGScriptInterpreter()
+{
+ if(m_evt)
+ m_evt->deref();
+}
+
+SVGDocumentImpl *KSVGScriptInterpreter::document()
+{
+ return m_document;
+}
+
+KSVG::SVGEventImpl *KSVGScriptInterpreter::currentEvent()
+{
+ return m_evt;
+}
+
+void KSVGScriptInterpreter::setCurrentEvent(KSVG::SVGEventImpl *evt)
+{
+ m_evt = evt;
+}
+
+KJS::ObjectImp *KSVGScriptInterpreter::getDOMObject(void *objectHandle) const
+{
+ return m_domObjects[objectHandle];
+}
+
+void KSVGScriptInterpreter::putDOMObject(void *objectHandle, KJS::ObjectImp *obj)
+{
+ m_domObjects.insert(objectHandle, obj);
+}
+
+void KSVGScriptInterpreter::removeDOMObject(void *objectHandle)
+{
+ m_domObjects.take(objectHandle);
+}
+
+bool KSVGScriptInterpreter::attributeGetMode()
+{
+ return m_attributeGetMode;
+}
+
+bool KSVGScriptInterpreter::attributeSetMode()
+{
+ return m_attributeSetMode;
+}
+
+void KSVGScriptInterpreter::setAttributeGetMode(bool temp)
+{
+ m_attributeGetMode = temp;
+}
+
+void KSVGScriptInterpreter::setAttributeSetMode(bool temp)
+{
+ m_attributeSetMode = temp;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_scriptinterpreter.h b/ksvg/ecma/ksvg_scriptinterpreter.h
new file mode 100644
index 00000000..ed7c6af8
--- /dev/null
+++ b/ksvg/ecma/ksvg_scriptinterpreter.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGScriptInterpreter_H
+#define KSVGScriptInterpreter_H
+
+#include <qptrdict.h>
+
+namespace KJS
+{
+ class Value;
+ class Object;
+ class Interpreter;
+}
+
+namespace KSVG
+{
+ class SVGEventImpl;
+ class SVGDocumentImpl;
+}
+
+class KSVGScriptInterpreter : public KJS::Interpreter
+{
+public:
+ KSVGScriptInterpreter(const KJS::Object &global, KSVG::SVGDocumentImpl *doc);
+ virtual ~KSVGScriptInterpreter();
+
+ KSVG::SVGDocumentImpl *document();
+
+ KJS::ObjectImp *getDOMObject(void *objectHandle) const;
+ void putDOMObject(void *objectHandle, KJS::ObjectImp *obj);
+ void removeDOMObject(void *objectHandle);
+
+ KSVG::SVGEventImpl *currentEvent();
+ void setCurrentEvent(KSVG::SVGEventImpl *evt);
+
+ bool attributeGetMode();
+ void setAttributeGetMode(bool temp);
+
+ bool attributeSetMode();
+ void setAttributeSetMode(bool temp);
+
+private:
+ KSVG::SVGDocumentImpl *m_document;
+ KSVG::SVGEventImpl *m_evt;
+
+ bool m_attributeGetMode, m_attributeSetMode;
+
+ QPtrDict<KJS::ObjectImp> m_domObjects;
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_window.cpp b/ksvg/ecma/ksvg_window.cpp
new file mode 100644
index 00000000..d4c04de3
--- /dev/null
+++ b/ksvg/ecma/ksvg_window.cpp
@@ -0,0 +1,578 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 David Faure <faure@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2, as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "ksvg_window.moc"
+#include "ksvg_lookup.h"
+#include "ksvg_ecma.h"
+#include "ksvg_bridge.h"
+#include "ksvg_scriptinterpreter.h"
+#include <SVGEventImpl.h>
+#include <SVGDocumentImpl.h>
+#include <KSVGCanvas.h>
+#include <SVGWindowImpl.h>
+// for js constants
+#include <SVGTransformImpl.h>
+#include <SVGLengthImpl.h>
+#include <SVGAngleImpl.h>
+#include <SVGColorImpl.h>
+#include <SVGPreserveAspectRatioImpl.h>
+#include <SVGTextContentElementImpl.h>
+#include <SVGPathSegImpl.h>
+#include <SVGGradientElementImpl.h>
+#include <SVGMarkerElementImpl.h>
+#include <SVGTextPathElementImpl.h>
+#include <SVGPaintImpl.h>
+#include <SVGZoomAndPanImpl.h>
+
+#include <kparts/part.h>
+#include <assert.h>
+#include <kdebug.h>
+#include <qstylesheet.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kinputdialog.h>
+
+using namespace KSVG;
+
+#include "ksvg_window.lut.h"
+
+// Spec on http://www.protocol7.com/svg-wiki/ow.asp?AdobeSVGViewerWindow
+
+/*
+@namespace KSVG
+@begin KSVG::Window::s_hashTable 34
+ closed KSVG::Window::_Closed DontDelete|ReadOnly
+ window KSVG::Window::_Window DontDelete|ReadOnly
+ evt KSVG::Window::_Evt DontDelete|ReadOnly
+ document KSVG::Window::_Document DontDelete|ReadOnly
+ svgDocument KSVG::Window::_Document DontDelete|ReadOnly
+ innerWidth KSVG::Window::_InnerWidth DontDelete|ReadOnly
+ innerHeight KSVG::Window::_InnerHeight DontDelete|ReadOnly
+ setTimeout KSVG::Window::_SetTimeout DontDelete|Function 2
+ clearTimeout KSVG::Window::_ClearTimeout DontDelete|Function 1
+ setInterval KSVG::Window::_SetInterval DontDelete|Function 2
+ clearInterval KSVG::Window::_ClearInterval DontDelete|Function 1
+ navigator KSVG::Window::_Navigator DontDelete|ReadOnly
+ printNode KSVG::Window::_PrintNode DontDelete|Function 1
+
+# todo navigator, status/defaultstatus, like in KJS::Window (khtml)
+# todo close
+# todo instancename
+# todo setsrc, getsrc, reload, focus, blur, browsereval, findinstancebyname
+
+# "Constructors" (usually repositories for constants)
+ SVGTransform KSVG::Window::_SVGTransform DontDelete|ReadOnly
+ SVGLength KSVG::Window::_SVGLength DontDelete|ReadOnly
+ SVGAngle KSVG::Window::_SVGAngle DontDelete|ReadOnly
+ SVGPreserveAspectRatio KSVG::Window::_SVGPreserveAspectRatio DontDelete|ReadOnly
+ SVGPathSeg KSVG::Window::_SVGPathSeg DontDelete|ReadOnly
+ SVGGradientElement KSVG::Window::_SVGGradientElement DontDelete|ReadOnly
+ SVGMarkerElement KSVG::Window::_SVGMarkerElement DontDelete|ReadOnly
+ SVGTextPathElement KSVG::Window::_SVGTextPathElement DontDelete|ReadOnly
+ SVGPaint KSVG::Window::_SVGPaint DontDelete|ReadOnly
+ SVGTextContentElement KSVG::Window::_SVGTextContentElement DontDelete|ReadOnly
+ SVGZoomAndPan KSVG::Window::_SVGZoomAndPan DontDelete|ReadOnly
+ SVGColor KSVG::Window::_SVGColor DontDelete|ReadOnly
+
+# Functions
+ alert KSVG::Window::_Alert DontDelete|Function 1
+ prompt KSVG::Window::_Prompt DontDelete|Function 2
+ confirm KSVG::Window::_Confirm DontDelete|Function 1
+ debug KSVG::Window::_Debug DontDelete|Function 1
+ success KSVG::Window::_Success DontDelete|Function 1
+ getSVGViewerVersion KSVG::Window::_GetSVGViewerVersion DontDelete|Function 0
+ getURL KSVG::Window::_GetURL DontDelete|Function 2
+ postURL KSVG::Window::_PostURL DontDelete|Function 5
+ parseXML KSVG::Window::_ParseXML DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOFUNC(WindowFunc, Window)
+
+const ClassInfo KSVG::Window::s_classInfo = { "Window", 0, &s_hashTable, 0 };
+
+KSVG::Window::Window(KSVG::SVGDocumentImpl *p) : ObjectImp(), m_doc(p)
+{
+ winq = new WindowQObject(this);
+}
+
+KSVG::Window::~Window()
+{
+ delete winq;
+}
+
+KSVG::Window *KSVG::Window::retrieveActive(ExecState *exec)
+{
+ ValueImp *imp = exec->interpreter()->globalObject().imp();
+ assert(imp);
+ return static_cast<KSVG::Window*>(imp);
+}
+
+bool KSVG::Window::hasProperty(ExecState *, const Identifier &) const
+{
+ return true; // See KJS::KSVG::Window::hasProperty
+}
+
+Value KSVG::Window::get(ExecState *exec, const Identifier &p) const
+{
+ kdDebug(26004) << "KSVG::Window (" << this << ")::get " << p.qstring() << endl;
+
+ if(p == "closed")
+ return Boolean(m_doc.isNull());
+
+ // we don't want any operations on a closed window
+ if(m_doc.isNull())
+ return Undefined();
+
+ // Look for overrides first
+ Value val = ObjectImp::get(exec, p);
+ if(!val.isA(UndefinedType))
+ return isSafeScript(exec) ? val : Undefined();
+
+ // Not the right way in the long run. Should use retrieve(m_doc)...
+ KSVGScriptInterpreter* interpreter = static_cast<KSVGScriptInterpreter *>(exec->interpreter());
+
+ const HashEntry *entry = Lookup::findEntry(&KSVG::Window::s_hashTable, p);
+ if(entry)
+ {
+ switch(entry->value)
+ {
+ case _Document:
+ // special case, KSVGEcma::setup created it, so we don't need to do it
+ return Value(interpreter->getDOMObject(m_doc->handle()));
+ case _Window:
+ return Value(const_cast<Window *>(this));
+ case _Evt:
+ {
+ KSVG::SVGEventImpl *evt = interpreter->currentEvent();
+ if(evt)
+ return getDOMEvent(exec, evt);
+ else
+ return Undefined();
+ }
+ case _InnerWidth:
+ return Number(m_doc->canvas()->width());
+ case _InnerHeight:
+ return Number(m_doc->canvas()->height());
+ case _SetTimeout:
+ case _ClearTimeout:
+ case _SetInterval:
+ case _ClearInterval:
+ case _PrintNode:
+ {
+ if(isSafeScript(exec))
+ return lookupOrCreateFunction<WindowFunc>(exec, p, this, entry->value, entry->params, entry->attr);
+ else
+ return Undefined();
+ }
+ case _Alert:
+ case _Confirm:
+ case _Debug:
+ case _Success:
+ case _GetSVGViewerVersion:
+ case _GetURL:
+ case _PostURL:
+ case _ParseXML:
+ case _Prompt:
+ return lookupOrCreateFunction<WindowFunc>(exec, p, this, entry->value, entry->params, entry->attr);
+ case _SVGTransform:
+ return getSVGTransformImplConstructor(exec);
+ case _SVGLength:
+ return getSVGLengthImplConstructor(exec);
+ case _SVGAngle:
+ return getSVGAngleImplConstructor(exec);
+ case _SVGColor:
+ return getSVGColorImplConstructor(exec);
+ case _SVGPreserveAspectRatio:
+ return getSVGPreserveAspectRatioImplConstructor(exec);
+ case _SVGPathSeg:
+ return getSVGPathSegImplConstructor(exec);
+ case _SVGGradientElement:
+ return getSVGGradientElementImplConstructor(exec);
+ case _SVGMarkerElement:
+ return getSVGMarkerElementImplConstructor(exec);
+ case _SVGTextPathElement:
+ return getSVGTextPathElementImplConstructor(exec);
+ case _SVGPaint:
+ return getSVGPaintImplConstructor(exec);
+ case _SVGTextContentElement:
+ return getSVGTextContentElementImplConstructor(exec);
+ case _SVGZoomAndPan:
+ return getSVGZoomAndPanImplConstructor(exec);
+ }
+ }
+
+ // This isn't necessarily a bug. Some code uses if(!window.blah) window.blah=1
+ // But it can also mean something isn't loaded or implemented...
+ kdDebug(26004) << "KSVG::Window::get property not found: " << p.qstring() << endl;
+
+ return Undefined();
+}
+
+void KSVG::Window::put(ExecState* exec, const Identifier &propertyName, const Value &value, int attr)
+{
+ // Called by an internal KJS call (e.g. InterpreterImp's constructor) ?
+ // If yes, save time and jump directly to ObjectImp.
+ if((attr != None && attr != DontDelete)
+ // Same thing if we have a local override (e.g. "var location")
+ || (ObjectImp::getDirect(propertyName) && isSafeScript(exec)))
+ {
+ ObjectImp::put( exec, propertyName, value, attr );
+ return;
+ }
+
+ const HashEntry *entry = Lookup::findEntry(&KSVG::Window::s_hashTable, propertyName);
+ if(entry)
+ {
+#ifdef KJS_VERBOSE
+ kdDebug(26004) << "Window(" << this << ")::put " << propertyName.qstring() << endl;
+#endif
+ //switch(entry->value)
+ //{
+ // ...
+ //}
+ }
+
+ if(isSafeScript(exec))
+ ObjectImp::put(exec, propertyName, value, attr);
+}
+
+bool KSVG::Window::isSafeScript(ExecState *exec) const
+{
+ if(m_doc.isNull()) // part deleted ? can't grant access
+ {
+ kdDebug(26004) << "KSVG::Window::isSafeScript: accessing deleted part !" << endl;
+ return false;
+ }
+
+ KSVG::SVGDocumentImpl *activePart = static_cast<KSVGScriptInterpreter *>(exec->interpreter())->document();
+
+ if(!activePart)
+ {
+ kdDebug(26004) << "KSVG::Window::isSafeScript: current interpreter's part is 0L!" << endl;
+ return false;
+ }
+
+ if(activePart == m_doc) // Not calling from another frame, no problem.
+ return true;
+
+ return false;
+}
+
+void KSVG::Window::clear(ExecState *exec)
+{
+ kdDebug(26004) << "KSVG::Window::clear " << this << endl;
+ delete winq;
+ winq = new WindowQObject(this);;
+
+ // Get rid of everything, those user vars could hold references to DOM nodes
+ deleteAllProperties(exec);
+
+ // Really delete those properties, so that the DOM nodes get deref'ed
+ // KJS::Collector::collect();
+
+ // Now recreate a working global object for the next URL that will use us
+ Interpreter *interpreter = exec->interpreter();
+ interpreter->initGlobalObject();
+}
+
+Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ if(!thisObj.inherits(&KSVG::Window::s_classInfo))
+ {
+ Object err = Error::create(exec, TypeError);
+ exec->setException(err);
+ return err;
+ }
+
+ Window *window = static_cast<Window *>(thisObj.imp());
+ Value v = args[0];
+ UString s = v.toString(exec);
+ QString str = s.qstring();
+
+ switch(id)
+ {
+ case KSVG::Window::_Alert:
+ SVGWindowImpl::alert(DOM::DOMString(str), "Javascript");
+ return Undefined();
+ case KSVG::Window::_Confirm:
+ return Boolean(SVGWindowImpl::confirm(DOM::DOMString(str), "Javascript"));
+ case KSVG::Window::_Debug:
+ kdDebug(26004) << "[Debug] " << str << endl;
+ return Undefined();
+ case KSVG::Window::_Success:
+ //if(args[0].toString(exec) == "success") // ? Did you really mean that ?
+ return Number(1);
+ //return Undefined();
+ case KSVG::Window::_GetSVGViewerVersion:
+ return String("0.1"); // I cant really find a central place for the version nr, so... (Rob)
+ case KSVG::Window::_ClearTimeout:
+ case KSVG::Window::_ClearInterval:
+ (const_cast<Window *>(window))->clearTimeout(v.toInt32(exec));
+ return Undefined();
+ case KSVG::Window::_PrintNode:
+ return String(const_cast<Window *>(window)->doc()->window()->printNode(toNode(args[0])));
+ case KSVG::Window::_GetURL:
+ {
+ KURL url((const_cast<Window *>(window))->doc()->baseUrl(), args[0].toString(exec).qstring());
+ Value asyncStatus = (const_cast<Window *>(window))->doc()->ecmaEngine()->getUrl(exec, url);
+ Object callBackFunction = Object::dynamicCast(args[1]);
+ List callBackArgs;
+
+ callBackArgs.append(asyncStatus);
+ callBackFunction.call(exec, callBackFunction, callBackArgs);
+
+ return Undefined();
+ }
+ case KSVG::Window::_PostURL:
+ {
+ KURL url((const_cast<Window *>(window))->doc()->baseUrl(), args[0].toString(exec).qstring());
+ QString data = args[1].toString(exec).qstring();
+ QString mimeType = args[3].toString(exec).qstring();
+ QString contentEncoding = args[4].toString(exec).qstring();
+ Object callBackFunction = Object::dynamicCast(args[2]);
+
+ (const_cast<Window *>(window))->doc()->ecmaEngine()->postUrl(exec, url, data, mimeType, contentEncoding, callBackFunction);
+
+ return Undefined();
+ };
+ case KSVG::Window::_ParseXML:
+ {
+ SVGDocumentImpl *doc = new SVGDocumentImpl();
+ doc->ref();
+ doc->attach(0);
+
+ // So we can find it later...
+ (const_cast<Window *>(window))->doc()->addToDocumentDict(doc->handle(), doc);
+
+ // Also add the current doc to the new doc!
+ SVGDocumentImpl *curDoc = (const_cast<Window *>(window))->doc();
+ doc->addToDocumentDict(curDoc->handle(), curDoc);
+
+ QXmlInputSource *svgFragment = new QXmlInputSource();
+ svgFragment->setData(args[0].toString(exec).qstring());
+
+ doc->parseSVG(svgFragment, true);
+
+ DOM::DocumentFragment fragment = doc->createDocumentFragment();
+ DOM::Node node = doc->firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ fragment.appendChild(node);
+
+
+// fragment = *doc; // Should copy the nodes into here...
+
+ return (new SVGDOMDocumentFragmentBridge(fragment))->cache(exec);
+ }
+ case KSVG::Window::_Prompt:
+ {
+ // mop: from khtml. do we need that?
+ // part->xmlDocImpl()->updateRendering();
+ bool ok;
+ QString str2;
+ if (args.size() >= 2)
+ str2 = KInputDialog::getText(i18n("Prompt"),
+ QStyleSheet::convertFromPlainText(str),
+ args[1].toString(exec).qstring(), &ok);
+ else
+ str2 = KInputDialog::getText(i18n("Prompt"),
+ QStyleSheet::convertFromPlainText(str),
+ QString::null, &ok);
+ if ( ok )
+ return String(str2);
+ else
+ return Null();
+ }
+ case KSVG::Window::_SetInterval:
+ if(args.size() >= 2 && v.isA(StringType))
+ {
+ int i = args[1].toInt32(exec);
+ int r = (const_cast<Window *>(window))->installTimeout(s, i, false);
+ return Number(r);
+ }
+ else if(args.size() >= 2 && !Object::dynamicCast(v).isNull() && Object::dynamicCast(v).implementsCall())
+ {
+ Value func = args[0];
+ int i = args[1].toInt32(exec);
+ int r = (const_cast<Window *>(window))->installTimeout(s, i, false);
+ return Number(r);
+ }
+ else
+ return Undefined();
+ case KSVG::Window::_SetTimeout:
+ if (args.size() == 2 && v.isA(StringType))
+ {
+ int i = args[1].toInt32(exec);
+ int r = (const_cast<Window *>(window))->installTimeout(s, i, true /*single shot*/);
+ return Number(r);
+ }
+ else if(args.size() >= 2 && v.isA(ObjectType) && Object::dynamicCast(v).implementsCall())
+ {
+ Value func = args[0];
+ int i = args[1].toInt32(exec);
+ int r = (const_cast<Window *>(window))->installTimeout(s, i, false);
+ return Number(r);
+ }
+ else
+ return Undefined();
+ }
+
+ return Undefined();
+}
+
+int KSVG::Window::installTimeout(const UString &handler, int t, bool singleShot)
+{
+ return winq->installTimeout(handler, t, singleShot);
+}
+
+void KSVG::Window::clearTimeout(int timerId)
+{
+ winq->clearTimeout(timerId);
+}
+
+////////////////////// ScheduledAction ////////////////////////
+
+ScheduledAction::ScheduledAction(Object _func, List _args, bool _singleShot)
+{
+ func = _func;
+ args = _args;
+ isFunction = true;
+ singleShot = _singleShot;
+}
+
+ScheduledAction::ScheduledAction(QString _code, bool _singleShot)
+{
+ code = _code;
+ isFunction = false;
+ singleShot = _singleShot;
+}
+
+ScheduledAction::~ScheduledAction()
+{
+}
+
+void ScheduledAction::execute(Window *window)
+{
+ Q_ASSERT(window->doc());
+
+ KSVGScriptInterpreter *interpreter = window->doc()->ecmaEngine()->interpreter();
+ if(isFunction)
+ {
+ if(func.implementsCall())
+ {
+ ExecState *exec = interpreter->globalExec();
+ Q_ASSERT(window == interpreter->globalObject().imp());
+ Object obj(window);
+ func.call(exec, obj, args); // note that call() creates its own execution state for the func call
+ }
+ }
+ else
+ {
+ interpreter->evaluate(code);
+ window->doc()->rerender();
+ }
+}
+
+////////////////////// WindowQObject ////////////////////////
+
+WindowQObject::WindowQObject(Window *w) : parent(w)
+{
+}
+
+WindowQObject::~WindowQObject()
+{
+ parentDestroyed(); // reuse same code
+}
+
+void WindowQObject::parentDestroyed()
+{
+ killTimers();
+
+ QMapIterator<int, ScheduledAction *> it;
+ for(it = scheduledActions.begin(); it != scheduledActions.end(); ++it)
+ {
+ ScheduledAction *action = *it;
+ delete action;
+ }
+
+ scheduledActions.clear();
+}
+
+int WindowQObject::installTimeout(const UString &handler, int t, bool singleShot)
+{
+ int id = startTimer(t);
+ ScheduledAction *action = new ScheduledAction(handler.qstring(), singleShot);
+ scheduledActions.insert(id, action);
+ return id;
+}
+
+int WindowQObject::installTimeout(const Value &func, List args, int t, bool singleShot)
+{
+ Object objFunc = Object::dynamicCast(func);
+ int id = startTimer(t);
+ scheduledActions.insert(id, new ScheduledAction(objFunc, args, singleShot));
+ return id;
+}
+
+void WindowQObject::clearTimeout(int timerId, bool delAction)
+{
+ killTimer(timerId);
+
+ if(delAction)
+ {
+ QMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
+ if(it != scheduledActions.end())
+ {
+ ScheduledAction *action = *it;
+ scheduledActions.remove(it);
+ delete action;
+ }
+ }
+}
+
+void WindowQObject::timerEvent(QTimerEvent *e)
+{
+ QMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
+ if(it != scheduledActions.end())
+ {
+ ScheduledAction *action = *it;
+ bool singleShot = action->singleShot;
+
+ // remove single shots installed by setTimeout()
+ if(singleShot)
+ {
+ clearTimeout(e->timerId(), false);
+ scheduledActions.remove(it);
+ }
+
+ if(parent->doc())
+ action->execute(parent);
+
+ // It is important to test singleShot and not action->singleShot here - the
+ // action could have been deleted already if not single shot and if the
+ // JS code called by execute() calls clearTimeout().
+ if(singleShot)
+ delete action;
+ }
+ else
+ kdWarning(6070) << "WindowQObject::timerEvent this=" << this << " timer " << e->timerId() << " not found (" << scheduledActions.count() << " actions in map)" << endl;
+}
+
+void WindowQObject::timeoutClose()
+{
+}
diff --git a/ksvg/ecma/ksvg_window.h b/ksvg/ecma/ksvg_window.h
new file mode 100644
index 00000000..28c9699e
--- /dev/null
+++ b/ksvg/ecma/ksvg_window.h
@@ -0,0 +1,122 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002 David Faure <faure@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2, as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVG_WINDOW_H
+#define KSVG_WINDOW_H
+
+#include <kjs/object.h>
+#include <qguardedptr.h>
+
+namespace KSVG {
+
+class SVGDocumentImpl;
+class WindowQObject;
+
+// This is currently a fork of khtml's Window object, simplified.
+// However in the long run it could become a base class for it.
+// Author: David Faure <faure@kde.org>
+class Window : public KJS::ObjectImp {
+ friend class WindowFunc;
+ friend class WindowQObject;
+ friend class ScheduledAction;
+public:
+ Window(KSVG::SVGDocumentImpl *p);
+ ~Window();
+
+ virtual KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const;
+ virtual void put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr = KJS::None);
+ virtual bool hasProperty(KJS::ExecState * /*exec*/, const KJS::Identifier &/*p*/) const;
+
+ /**
+ * Returns and registers a window object. In case there's already a Window
+ * for the specified part p this will be returned in order to have unique
+ * bindings.
+ */
+ //static KJS::Value retrieve(KSVG::SVGDocumentImpl *p);
+ /**
+ * Returns the Window object for a given part
+ */
+ //static Window *retrieveWindow(KSVG::SVGDocumentImpl *p);
+ /**
+ * returns a pointer to the Window object this javascript interpreting instance
+ * was called from.
+ */
+ static Window *retrieveActive(KJS::ExecState *exec);
+
+ QGuardedPtr<KSVG::SVGDocumentImpl> doc() const { return m_doc; }
+
+ int installTimeout(const KJS::UString &handler, int t, bool singleShot);
+ void clearTimeout(int timerId);
+
+ bool isSafeScript(KJS::ExecState *exec) const;
+ void clear( KJS::ExecState *exec );
+
+ enum {
+ // Properties
+ _Closed, _Window, _Document, _Evt, _InnerWidth, _InnerHeight,
+ _SVGTransform, _SVGLength, _SVGAngle, _SVGColor, _SVGPreserveAspectRatio, _SVGGradientElement,
+ _SVGPathSeg, _SVGTextContentElement, _SVGPaint, _SVGZoomAndPan, _SVGMarkerElement, _SVGTextPathElement,
+ _SetInterval, _ClearInterval, _SetTimeout, _ClearTimeout, _Navigator, _PrintNode,
+ // Functions
+ _Alert, _Confirm, _Debug, _Success, _GetSVGViewerVersion, _GetURL, _PostURL, _ParseXML, _Prompt
+ };
+
+ virtual const KJS::ClassInfo* classInfo() const { return &s_classInfo; }
+ static const KJS::ClassInfo s_classInfo;
+ static const struct KJS::HashTable s_hashTable;
+
+private:
+ WindowQObject *winq;
+ QGuardedPtr<KSVG::SVGDocumentImpl> m_doc;
+};
+
+class ScheduledAction {
+public:
+ ScheduledAction(KJS::Object _func, KJS::List _args, bool _singleShot);
+ ScheduledAction(QString _code, bool _singleShot);
+ ~ScheduledAction();
+ void execute(Window *window);
+ KJS::Object func;
+ KJS::List args;
+ QString code;
+ bool isFunction;
+ bool singleShot;
+};
+
+class WindowQObject : public QObject {
+ Q_OBJECT
+public:
+ WindowQObject(Window *w);
+ ~WindowQObject();
+ int installTimeout(const KJS::UString &handler, int t, bool singleShot);
+ int installTimeout(const KJS::Value &func, KJS::List args, int t, bool singleShot);
+ void clearTimeout(int timerId, bool delAction = true);
+public slots:
+ void timeoutClose();
+protected slots:
+ void parentDestroyed();
+protected:
+ void timerEvent(QTimerEvent *e);
+private:
+ Window *parent;
+ //KHTMLPart *part; // not guarded, may be dangling
+ QMap<int, ScheduledAction*> scheduledActions;
+};
+
+}
+#endif // KSVG_WINDOW_H
diff --git a/ksvg/impl/LRUCache.h b/ksvg/impl/LRUCache.h
new file mode 100644
index 00000000..879f1856
--- /dev/null
+++ b/ksvg/impl/LRUCache.h
@@ -0,0 +1,169 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LRUCACHE_H
+#define LRUCACHE_H
+
+#include <qvaluelist.h>
+
+namespace KSVG
+{
+
+// A value-based LRU cache with a maximum total cost constraint, but with the exception that the
+// most recently added item is kept in the cache even if its cost exceeds the maximum total cost.
+template<class keyType, class valueType>
+class MinOneLRUCache
+{
+public:
+ MinOneLRUCache(int maxTotalCost = 0) : m_maxTotalCost(maxTotalCost), m_totalCost(0) {}
+ virtual ~MinOneLRUCache() {}
+
+ void insert(const keyType& key, const valueType& value, int cost);
+ bool find(const keyType& key, valueType& result);
+
+ void setMaxTotalCost(int maxTotalCost);
+ int maxTotalCost() const { return m_maxTotalCost; }
+ int totalCost() const { return m_totalCost; }
+
+ void clear();
+
+protected:
+ class CacheItem
+ {
+ public:
+ CacheItem() : m_cost(0) {}
+ CacheItem(const keyType& key, const valueType& value, int cost) : m_key(key), m_value(value), m_cost(cost) {}
+
+ const keyType& key() const { return m_key; }
+ const valueType& value() const { return m_value; }
+ int cost() const { return m_cost; }
+
+ private:
+ keyType m_key;
+ valueType m_value;
+ int m_cost;
+ };
+
+ typedef QValueList<CacheItem> CacheItemList;
+
+ typename CacheItemList::iterator find(const keyType& key);
+ void enforceCostConstraint();
+
+ CacheItemList m_items;
+ int m_maxTotalCost;
+ int m_totalCost;
+};
+
+template<class keyType, class valueType>
+void MinOneLRUCache<keyType, valueType>::insert(const keyType& key, const valueType& value, int cost)
+{
+ typename CacheItemList::iterator it = find(key);
+
+ if(it != m_items.end())
+ {
+ // Replace the existing item.
+ m_totalCost -= (*it).cost();
+ m_items.erase(it);
+ }
+
+ // We always hold the most recently added item in the cache, even if it exceeds
+ // the maximum total cost.
+ m_items.push_front(CacheItem(key, value, cost));
+ m_totalCost += cost;
+ enforceCostConstraint();
+}
+
+template<class keyType, class valueType>
+bool MinOneLRUCache<keyType, valueType>::find(const keyType& key, valueType& result)
+{
+ bool foundKey = false;
+ typename CacheItemList::iterator it = find(key);
+
+ if(it != m_items.end())
+ {
+ CacheItem item = *it;
+ result = item.value();
+
+ if(it != m_items.begin())
+ {
+ // This is now the most recently used item.
+ m_items.erase(it);
+ m_items.push_front(item);
+ }
+
+ foundKey = true;
+ }
+
+ return foundKey;
+}
+
+template<class keyType, class valueType>
+typename MinOneLRUCache<keyType, valueType>::CacheItemList::iterator MinOneLRUCache<keyType, valueType>::find(const keyType& key)
+{
+ typename CacheItemList::iterator it;
+
+ for(it = m_items.begin(); it != m_items.end(); it++)
+ {
+ if((*it).key() == key)
+ break;
+ }
+
+ return it;
+}
+
+template<class keyType, class valueType>
+void MinOneLRUCache<keyType, valueType>::enforceCostConstraint()
+{
+ if(m_totalCost > m_maxTotalCost && m_items.size() > 1)
+ {
+ typename CacheItemList::iterator it = m_items.begin();
+ m_totalCost = (*it).cost();
+ ++it;
+
+ while(it != m_items.end() && m_totalCost + (*it).cost() <= m_maxTotalCost)
+ {
+ m_totalCost += (*it).cost();
+ ++it;
+ }
+
+ // Remove the remainder
+ while(it != m_items.end())
+ it = m_items.erase(it);
+ }
+}
+
+template<class keyType, class valueType>
+void MinOneLRUCache<keyType, valueType>::setMaxTotalCost(int maxTotalCost)
+{
+ m_maxTotalCost = maxTotalCost;
+ enforceCostConstraint();
+}
+
+template<class keyType, class valueType>
+void MinOneLRUCache<keyType, valueType>::clear()
+{
+ m_items.clear();
+ m_totalCost = 0;
+}
+
+}
+
+#endif
+
diff --git a/ksvg/impl/Makefile.am b/ksvg/impl/Makefile.am
new file mode 100644
index 00000000..24e40d67
--- /dev/null
+++ b/ksvg/impl/Makefile.am
@@ -0,0 +1,116 @@
+SUBDIRS = libs
+noinst_LTLIBRARIES = libksvgdomimpl.la
+
+KDE_OPTIONS = nofinal
+
+# The makefile has the following structure:
+# datatypes
+# animated datatypes
+# lists
+# animated lists
+# base classes
+# document structure
+# styling
+# paths
+# basic shapes
+# text
+# painting
+# color
+# gradients & patterns
+# clipping & masking
+# filters
+# interactivity
+# linking
+# scripting
+# animations
+# font & glyph stuff
+# metadata
+# extensibility
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+libksvgdomimpl_la_SOURCES = \
+SVGLengthImpl.cc SVGNumberImpl.cc SVGPointImpl.cc SVGTransformImpl.cc \
+SVGMatrixImpl.cc SVGRectImpl.cc SVGAngleImpl.cc \
+\
+SVGAnimatedLengthImpl.cc SVGAnimatedNumberImpl.cc SVGAnimatedIntegerImpl.cc \
+SVGAnimatedBooleanImpl.cc SVGAnimatedEnumerationImpl.cc SVGAnimatedPreserveAspectRatioImpl.cc \
+SVGAnimatedRectImpl.cc SVGAnimatedAngleImpl.cc SVGAnimatedPathDataImpl.cc SVGAnimatedStringImpl.cc \
+\
+SVGLengthListImpl.cc SVGNumberListImpl.cc SVGPointListImpl.cc SVGTransformListImpl.cc \
+SVGStringListImpl.cc SVGPathSegListImpl.cc SVGElementInstanceListImpl.cc \
+\
+SVGAnimatedLengthListImpl.cc SVGAnimatedNumberListImpl.cc \
+SVGAnimatedPointsImpl.cc SVGAnimatedTransformListImpl.cc \
+\
+SVGShapeImpl.cc SVGContainerImpl.cc SVGBBoxTarget.cc SVGHelperImpl.cc \
+SVGStylableImpl.cc SVGTransformableImpl.cc SVGTestsImpl.cc SVGLangSpaceImpl.cc \
+SVGExternalResourcesRequiredImpl.cc SVGLocatableImpl.cc SVGFitToViewBoxImpl.cc \
+SVGPreserveAspectRatioImpl.cc SVGZoomAndPanImpl.cc SVGViewSpecImpl.cc \
+\
+SVGElementImpl.cc SVGElementInstanceImpl.cc \
+SVGDocumentImpl.cc SVGSVGElementImpl.cc SVGWindowImpl.cc \
+SVGDefsElementImpl.cc SVGUseElementImpl.cc \
+SVGDescElementImpl.cc SVGTitleElementImpl.cc \
+SVGGElementImpl.cc SVGSwitchElementImpl.cc \
+SVGSymbolElementImpl.cc SVGImageElementImpl.cc \
+SVGURIReferenceImpl.cc \
+\
+SVGStyleElementImpl.cc SVGCSSRuleImpl.cc \
+\
+SVGPathElementImpl.cc SVGPathSegImpl.cc SVGPathSegClosePathImpl.cc SVGPathSegArcImpl.cc \
+SVGPathSegMovetoImpl.cc SVGPathSegCurvetoQuadraticImpl.cc SVGPathSegCurvetoQuadraticSmoothImpl.cc \
+SVGPathSegCurvetoCubicImpl.cc SVGPathSegCurvetoCubicSmoothImpl.cc SVGPathSegLinetoImpl.cc \
+SVGPathSegLinetoHorizontalImpl.cc SVGPathSegLinetoVerticalImpl.cc \
+\
+SVGRectElementImpl.cc SVGCircleElementImpl.cc SVGEllipseElementImpl.cc SVGLineElementImpl.cc \
+SVGPolyElementImpl.cc SVGPolylineElementImpl.cc SVGPolygonElementImpl.cc \
+\
+SVGTextElementImpl.cc SVGTSpanElementImpl.cc SVGTRefElementImpl.cc \
+SVGTextPositioningElementImpl.cc SVGTextContentElementImpl.cc SVGTextPathElementImpl.cc \
+\
+SVGPaintImpl.cc SVGMarkerElementImpl.cc \
+\
+SVGColorImpl.cc SVGICCColorImpl.cc SVGColorProfileElementImpl.cc SVGColorProfileRuleImpl.cc \
+\
+SVGPaintServerImpl.cc SVGGradientElementImpl.cc SVGStopElementImpl.cc \
+SVGLinearGradientElementImpl.cc SVGRadialGradientElementImpl.cc SVGPatternElementImpl.cc \
+\
+SVGClipPathElementImpl.cc SVGMaskElementImpl.cc \
+\
+SVGFilterElementImpl.cc SVGFilterPrimitiveStandardAttributesImpl.cc \
+SVGFEBlendElementImpl.cc SVGFEColorMatrixElementImpl.cc \
+SVGFEComponentTransferElementImpl.cc SVGComponentTransferFunctionElementImpl.cc \
+SVGFEFuncAElementImpl.cc SVGFEFuncBElementImpl.cc SVGFEFuncGElementImpl.cc \
+SVGFEFuncRElementImpl.cc SVGFECompositeElementImpl.cc SVGFEConvolveMatrixElementImpl.cc \
+SVGFEFloodElementImpl.cc SVGFEGaussianBlurElementImpl.cc SVGFEDiffuseLightingElementImpl.cc \
+SVGFEDistantLightElementImpl.cc SVGFEPointLightElementImpl.cc SVGFESpotLightElementImpl.cc \
+SVGFEDisplacementMapElementImpl.cc SVGFEMergeElementImpl.cc SVGFEMergeNodeElementImpl.cc \
+SVGFEImageElementImpl.cc SVGFEMorphologyElementImpl.cc SVGFEOffsetElementImpl.cc \
+SVGFESpecularLightingElementImpl.cc SVGFETileElementImpl.cc SVGFETurbulenceElementImpl.cc \
+\
+SVGCursorElementImpl.cc \
+\
+SVGAElementImpl.cc SVGViewElementImpl.cc \
+\
+SVGScriptElementImpl.cc SVGEventImpl.cc SVGZoomEventImpl.cc \
+SVGEcma.cc generateddata.cpp \
+\
+SVGAnimationElementImpl.cc SVGAnimateElementImpl.cc SVGSetElementImpl.cc \
+SVGAnimateMotionElementImpl.cc SVGAnimateColorElementImpl.cc \
+SVGAnimateTransformElementImpl.cc SVGMPathElementImpl.cc SVGTimeScheduler.cc \
+\
+SVGFontElementImpl.cc SVGAltGlyphElementImpl.cc SVGAltGlyphDefElementImpl.cc \
+SVGGlyphRefElementImpl.cc SVGGlyphElementImpl.cc SVGMissingGlyphElementImpl.cc \
+SVGFontFaceElementImpl.cc SVGFontFaceFormatElementImpl.cc SVGFontFaceNameElementImpl.cc \
+SVGFontFaceSrcElementImpl.cc SVGFontFaceUriElementImpl.cc SVGDefinitionSrcElementImpl.cc \
+SVGHKernElementImpl.cc SVGVKernElementImpl.cc \
+\
+SVGMetadataElementImpl.cc \
+\
+SVGForeignObjectElementImpl.cc \
+\
+svgpathparser.cc
+
+libksvgdomimpl_la_METASOURCES = AUTO
+
+INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/data -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
diff --git a/ksvg/impl/SVGAElementImpl.cc b/ksvg/impl/SVGAElementImpl.cc
new file mode 100644
index 00000000..153ff5ff
--- /dev/null
+++ b/ksvg/impl/SVGAElementImpl.cc
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAElementImpl::SVGAElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_target = new SVGAnimatedStringImpl();
+ m_target->ref();
+}
+
+SVGAElementImpl::~SVGAElementImpl()
+{
+ if(m_target)
+ m_target->deref();
+}
+
+/*
+@namespace KSVG
+@begin SVGAElementImpl::s_hashTable 2
+ target SVGAElementImpl::Target DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Target:
+ return m_target->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Target:
+ {
+ if(m_target)
+ m_target->deref();
+
+ SVGAnimatedStringImpl *temp = new SVGAnimatedStringImpl();
+ temp->ref();
+ temp->setBaseVal(value.toString(exec).string());
+ setTarget(temp);
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGAElementImpl::setTarget(SVGAnimatedStringImpl *target)
+{
+ m_target = target;
+}
+
+SVGAnimatedStringImpl *SVGAElementImpl::target() const
+{
+ return m_target;
+}
+
+SVGAElementImpl *SVGAElementImpl::getLink(SVGElementImpl *sourceElem)
+{
+ for(DOM::Node node = *sourceElem; !node.isNull(); node = node.parentNode())
+ {
+ SVGElementImpl *elem = sourceElem->ownerDoc()->getElementFromHandle(node.handle());
+ if(elem)
+ {
+ SVGAElementImpl *link = dynamic_cast<SVGAElementImpl *>(elem);
+ if(link)
+ return link;
+ }
+ }
+
+ return false;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAElementImpl.h b/ksvg/impl/SVGAElementImpl.h
new file mode 100644
index 00000000..2da4c3d4
--- /dev/null
+++ b/ksvg/impl/SVGAElementImpl.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAElementImpl_H
+#define SVGAElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAElementImpl : public SVGContainerImpl,
+ public SVGURIReferenceImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGAElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAElementImpl();
+
+ void setTarget(SVGAnimatedStringImpl *target);
+ SVGAnimatedStringImpl *target() const;
+
+ static SVGAElementImpl *getLink(SVGElementImpl *sourceElem);
+
+private:
+ SVGAnimatedStringImpl *m_target;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Target
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGAElementImpl, "a")
+
+}
+
+#endif
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAltGlyphDefElementImpl.cc b/ksvg/impl/SVGAltGlyphDefElementImpl.cc
new file mode 100644
index 00000000..2a0b5fe9
--- /dev/null
+++ b/ksvg/impl/SVGAltGlyphDefElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAltGlyphDefElementImpl.h"
+
+using namespace KSVG;
+
+SVGAltGlyphDefElementImpl::SVGAltGlyphDefElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGAltGlyphDefElementImpl::~SVGAltGlyphDefElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAltGlyphDefElementImpl.h b/ksvg/impl/SVGAltGlyphDefElementImpl.h
new file mode 100644
index 00000000..cc1c92f4
--- /dev/null
+++ b/ksvg/impl/SVGAltGlyphDefElementImpl.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAltGlyphDefElementImpl_H
+#define SVGAltGlyphDefElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGAltGlyphDefElementImpl : public SVGElementImpl
+{
+public:
+ SVGAltGlyphDefElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAltGlyphDefElementImpl();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAltGlyphDefElementImpl, "altGlyphDef")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAltGlyphElementImpl.cc b/ksvg/impl/SVGAltGlyphElementImpl.cc
new file mode 100644
index 00000000..d426bd74
--- /dev/null
+++ b/ksvg/impl/SVGAltGlyphElementImpl.cc
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSVGElementImpl.h"
+#include "SVGAltGlyphElementImpl.h"
+
+using namespace KSVG;
+
+SVGAltGlyphElementImpl::SVGAltGlyphElementImpl(DOM::ElementImpl *impl) : SVGTSpanElementImpl(impl), SVGURIReferenceImpl()
+{
+}
+
+SVGAltGlyphElementImpl::~SVGAltGlyphElementImpl()
+{
+}
+
+void SVGAltGlyphElementImpl::setAttributes()
+{
+ SVGTSpanElementImpl::setAttributes();
+}
+
+DOM::DOMString SVGAltGlyphElementImpl::format()
+{
+ return "";
+}
+
+DOM::DOMString SVGAltGlyphElementImpl::glyphRef()
+{
+ return "";
+}
+
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAltGlyphElementImpl.h b/ksvg/impl/SVGAltGlyphElementImpl.h
new file mode 100644
index 00000000..8dcfe479
--- /dev/null
+++ b/ksvg/impl/SVGAltGlyphElementImpl.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAltGlyphElementImpl_H
+#define SVGAltGlyphElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTSpanElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+
+namespace KSVG
+{
+
+class SVGAltGlyphElementImpl : public SVGTSpanElementImpl,
+ public SVGURIReferenceImpl
+{
+public:
+ SVGAltGlyphElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAltGlyphElementImpl();
+ virtual void setAttributes();
+
+ DOM::DOMString glyphRef();
+ DOM::DOMString format();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAltGlyphElementImpl, "altGlyph")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAngleImpl.cc b/ksvg/impl/SVGAngleImpl.cc
new file mode 100644
index 00000000..6102329d
--- /dev/null
+++ b/ksvg/impl/SVGAngleImpl.cc
@@ -0,0 +1,277 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAngle.h"
+
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAngleImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+const double deg2rad = 0.017453292519943295769; // pi/180
+const double deg2grad = 400.0 / 360.0;
+const double rad2grad = deg2grad / deg2rad;
+
+SVGAngleImpl::SVGAngleImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_unitType = SVG_ANGLETYPE_UNKNOWN;
+ m_valueInSpecifiedUnits = 0;
+ m_value = 0;
+}
+
+SVGAngleImpl::~SVGAngleImpl()
+{
+}
+
+unsigned short SVGAngleImpl::unitType() const
+{
+ return m_unitType;
+}
+
+void SVGAngleImpl::setValue(float value)
+{
+ m_value = value;
+}
+
+float SVGAngleImpl::value() const
+{
+ return m_value;
+}
+
+// calc m_value
+void SVGAngleImpl::calculate()
+{
+ if(m_unitType == SVG_ANGLETYPE_GRAD)
+ m_value = m_valueInSpecifiedUnits / deg2grad;
+ else if(m_unitType == SVG_ANGLETYPE_RAD)
+ m_value = m_valueInSpecifiedUnits / deg2rad;
+ else if(m_unitType == SVG_ANGLETYPE_UNSPECIFIED || m_unitType == SVG_ANGLETYPE_DEG)
+ m_value = m_valueInSpecifiedUnits;
+}
+
+void SVGAngleImpl::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
+{
+ m_valueInSpecifiedUnits = valueInSpecifiedUnits;
+ calculate();
+}
+
+float SVGAngleImpl::valueInSpecifiedUnits() const
+{
+ return m_valueInSpecifiedUnits;
+}
+
+void SVGAngleImpl::setValueAsString(const DOM::DOMString &valueAsString)
+{
+ m_valueAsString = valueAsString;
+
+ QString s = valueAsString.string();
+
+ bool bOK;
+ m_valueInSpecifiedUnits = s.toFloat(&bOK);
+ m_unitType = SVG_ANGLETYPE_UNSPECIFIED;
+
+ if(!bOK)
+ {
+ if(s.endsWith("deg"))
+ m_unitType = SVG_ANGLETYPE_DEG;
+ else if(s.endsWith("grad"))
+ m_unitType = SVG_ANGLETYPE_GRAD;
+ else if(s.endsWith("rad"))
+ m_unitType = SVG_ANGLETYPE_RAD;
+ }
+
+ calculate();
+}
+
+DOM::DOMString SVGAngleImpl::valueAsString() const
+{
+ m_valueAsString.string().setNum(m_valueInSpecifiedUnits);
+
+ switch(m_unitType)
+ {
+ case SVG_ANGLETYPE_UNSPECIFIED:
+ case SVG_ANGLETYPE_DEG:
+ m_valueAsString.string() += "deg";
+ break;
+ case SVG_ANGLETYPE_RAD:
+ m_valueAsString.string() += "rad";
+ break;
+ case SVG_ANGLETYPE_GRAD:
+ m_valueAsString.string() += "grad";
+ break;
+ }
+
+ return m_valueAsString;
+}
+
+void SVGAngleImpl::newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits)
+{
+ m_unitType = unitType;
+ m_valueInSpecifiedUnits = valueInSpecifiedUnits;
+ calculate();
+}
+
+void SVGAngleImpl::convertToSpecifiedUnits(unsigned short unitType)
+{
+ if(m_unitType == unitType)
+ return;
+
+ if(m_unitType == SVG_ANGLETYPE_DEG && unitType == SVG_ANGLETYPE_RAD)
+ m_valueInSpecifiedUnits *= deg2rad;
+ else if(m_unitType == SVG_ANGLETYPE_GRAD && unitType == SVG_ANGLETYPE_RAD)
+ m_valueInSpecifiedUnits /= rad2grad;
+ else if(m_unitType == SVG_ANGLETYPE_DEG && unitType == SVG_ANGLETYPE_GRAD)
+ m_valueInSpecifiedUnits *= deg2grad;
+ else if(m_unitType == SVG_ANGLETYPE_RAD && unitType == SVG_ANGLETYPE_GRAD)
+ m_valueInSpecifiedUnits *= rad2grad;
+ else if(m_unitType == SVG_ANGLETYPE_RAD && unitType == SVG_ANGLETYPE_DEG)
+ m_valueInSpecifiedUnits /= deg2rad;
+ else if(m_unitType == SVG_ANGLETYPE_GRAD && unitType == SVG_ANGLETYPE_DEG)
+ m_valueInSpecifiedUnits /= deg2grad;
+
+ m_unitType = unitType;
+}
+
+// Helpers
+double SVGAngleImpl::todeg(double rad)
+{
+ return rad / deg2rad;
+}
+
+double SVGAngleImpl::torad(double deg)
+{
+ return deg * deg2rad;
+}
+
+double SVGAngleImpl::shortestArcBisector(double angle1, double angle2)
+{
+ double bisector = (angle1 + angle2) / 2;
+
+ if(fabs(angle1 - angle2) > 180)
+ bisector += 180;
+
+ return bisector;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAngleImpl::s_hashTable 5
+ value SVGAngleImpl::Value DontDelete
+ valueInSpecifiedUnits SVGAngleImpl::ValueInSpecifiedUnits DontDelete
+ valueAsString SVGAngleImpl::ValueAsString DontDelete
+ unitType SVGAngleImpl::UnitType DontDelete
+@end
+@namespace KSVG
+@begin SVGAngleImplProto::s_hashTable 3
+ convertToSpecifiedUnits SVGAngleImpl::ConvertToSpecifiedUnits DontDelete|Function 1
+ newValueSpecifiedUnits SVGAngleImpl::NewValueSpecifiedUnits DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGAngle", SVGAngleImplProto, SVGAngleImplProtoFunc)
+
+Value SVGAngleImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Value:
+ return Number(value());
+ case ValueInSpecifiedUnits:
+ return Number(valueInSpecifiedUnits());
+ case ValueAsString:
+ return String(valueAsString().string());
+ case UnitType:
+ return Number(unitType());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAngleImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Value:
+ setValue(value.toNumber(exec));
+ break;
+ case ValueInSpecifiedUnits:
+ setValueInSpecifiedUnits(value.toNumber(exec));
+ break;
+ case ValueAsString:
+ setValueAsString(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGAngleImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGAngleImpl)
+
+ switch(id)
+ {
+ case SVGAngleImpl::ConvertToSpecifiedUnits:
+ obj->convertToSpecifiedUnits(static_cast<unsigned short>(args[0].toNumber(exec)));
+ break;
+ case SVGAngleImpl::NewValueSpecifiedUnits:
+ obj->newValueSpecifiedUnits(static_cast<unsigned short>(args[0].toNumber(exec)), args[1].toNumber(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+/*
+@namespace KSVG
+@begin SVGAngleImplConstructor::s_hashTable 7
+ SVG_ANGLETYPE_UNKNOWN KSVG::SVG_ANGLETYPE_UNKNOWN DontDelete|ReadOnly
+ SVG_ANGLETYPE_UNSPECIFIED KSVG::SVG_ANGLETYPE_UNSPECIFIED DontDelete|ReadOnly
+ SVG_ANGLETYPE_RAD KSVG::SVG_ANGLETYPE_RAD DontDelete|ReadOnly
+ SVG_ANGLETYPE_DEG KSVG::SVG_ANGLETYPE_DEG DontDelete|ReadOnly
+ SVG_ANGLETYPE_GRAD KSVG::SVG_ANGLETYPE_GRAD DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAngleImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGAngleImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGAngleImplConstructor>(exec, "[[svgangle.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAngleImpl.h b/ksvg/impl/SVGAngleImpl.h
new file mode 100644
index 00000000..d3c656de
--- /dev/null
+++ b/ksvg/impl/SVGAngleImpl.h
@@ -0,0 +1,102 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAngleImpl_H
+#define SVGAngleImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAngleImpl : public DOM::DomShared
+{
+public:
+ SVGAngleImpl();
+ virtual ~SVGAngleImpl();
+
+ unsigned short unitType() const;
+
+ void setValue(float value);
+ float value() const;
+
+ void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
+ float valueInSpecifiedUnits() const;
+
+ void setValueAsString(const DOM::DOMString &valueAsString);
+ DOM::DOMString valueAsString() const;
+
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ void convertToSpecifiedUnits(unsigned short unitType);
+
+ // Helpers
+ static double todeg(double rad);
+ static double torad(double deg);
+
+ // Returns the angle that divides the shortest arc between the two angles.
+ static double shortestArcBisector(double angle1, double angle2);
+
+private:
+ unsigned short m_unitType;
+ float m_value;
+ float m_valueInSpecifiedUnits;
+ DOM::DOMString m_valueAsString;
+
+ void calculate();
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Value, ValueInSpecifiedUnits, ValueAsString, UnitType,
+ // Functions
+ ConvertToSpecifiedUnits, NewValueSpecifiedUnits
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGAngleImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGAngleImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGAngleImplConstructor(KJS::ExecState *exec);
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGAngleImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGAngleImplProtoFunc, SVGAngleImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateColorElementImpl.cc b/ksvg/impl/SVGAnimateColorElementImpl.cc
new file mode 100644
index 00000000..c4cc0ad4
--- /dev/null
+++ b/ksvg/impl/SVGAnimateColorElementImpl.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include <kdebug.h>
+
+#include "SVGColorImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGAnimateColorElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateColorElementImpl::SVGAnimateColorElementImpl(DOM::ElementImpl *impl) : SVGAnimationElementImpl(impl)
+{
+ m_fromColor = new SVGColorImpl(this);
+ m_fromColor->ref();
+
+ m_toColor = new SVGColorImpl(this);
+ m_toColor->ref();
+}
+
+SVGAnimateColorElementImpl::~SVGAnimateColorElementImpl()
+{
+ m_fromColor->deref();
+ m_toColor->deref();
+}
+
+/*
+ * Outstanding issues
+ * - 'values' support
+ * - 'by' support
+ */
+
+void SVGAnimateColorElementImpl::setAttributes()
+{
+ SVGAnimationElementImpl::setAttributes();
+
+ SVGStylableImpl::setColor(getFrom(), m_fromColor);
+ SVGStylableImpl::setColor(getTo(), m_toColor);
+
+ ownerDoc()->timeScheduler()->addTimer(this, int(getStartTime() * 1000.0));
+}
+
+void SVGAnimateColorElementImpl::handleTimerEvent()
+{
+ if(!m_connected)
+ {
+ double duration = getSimpleDuration() * 1000.0;
+ double dinterval = SVGTimeScheduler::staticTimerInterval;
+
+ m_step = 0;
+ m_steps = (int) rint(duration / dinterval);
+
+ m_connected = true;
+ ownerDoc()->timeScheduler()->connectIntervalTimer(this);
+ }
+ else
+ {
+ QColor fromColor(m_fromColor->rgbColor().color());
+ QColor toColor(m_toColor->rgbColor().color());
+
+ int red = (int) rint(((toColor.red() - fromColor.red()) / static_cast<double>(m_steps)) * m_step + fromColor.red());
+ int green = (int) rint(((toColor.green() - fromColor.green()) / static_cast<double>(m_steps)) * m_step + fromColor.green());
+ int blue = (int) rint(((toColor.blue() - fromColor.blue()) / static_cast<double>(m_steps)) * m_step + fromColor.blue());
+
+ QString color = "rgb(" + QString::number(red) + "," + QString::number(green) + "," + QString::number(blue) + ")";
+ applyAttribute(getAttributeName(), color);
+ }
+
+ if(m_step < m_steps)
+ m_step++;
+ else
+ {
+ ownerDoc()->timeScheduler()->disconnectIntervalTimer(this);
+ m_connected = false;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateColorElementImpl.h b/ksvg/impl/SVGAnimateColorElementImpl.h
new file mode 100644
index 00000000..2832802e
--- /dev/null
+++ b/ksvg/impl/SVGAnimateColorElementImpl.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateColorElementImpl_H
+#define SVGAnimateColorElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGAnimationElementImpl.h"
+
+class QTimer;
+
+namespace KSVG
+{
+
+class SVGColorImpl;
+class SVGAnimateColorElementImpl : public SVGAnimationElementImpl
+{
+public:
+ SVGAnimateColorElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAnimateColorElementImpl();
+
+ virtual void handleTimerEvent();
+ virtual void setAttributes();
+
+private:
+ SVGColorImpl *m_toColor, *m_fromColor;
+
+ int m_steps, m_step;
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAnimateColorElementImpl, "animateColor")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateElementImpl.cc b/ksvg/impl/SVGAnimateElementImpl.cc
new file mode 100644
index 00000000..ab9bc52c
--- /dev/null
+++ b/ksvg/impl/SVGAnimateElementImpl.cc
@@ -0,0 +1,191 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGAnimateElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateElementImpl::SVGAnimateElementImpl(DOM::ElementImpl *impl) : SVGAnimationElementImpl(impl)
+{
+ m_animVal = 0.0;
+ m_addStep = 0.0;
+}
+
+SVGAnimateElementImpl::~SVGAnimateElementImpl()
+{
+}
+
+void SVGAnimateElementImpl::setAttributes()
+{
+ SVGAnimationElementImpl::setAttributes();
+
+ ownerDoc()->timeScheduler()->addTimer(this, int(getStartTime() * 1000.0));
+}
+
+void SVGAnimateElementImpl::handleTimerEvent()
+{
+ if(!m_connected)
+ {
+ double duration = getSimpleDuration() * 1000.0;
+ double dinterval = SVGTimeScheduler::staticTimerInterval;
+
+ m_step = 0;
+ m_steps = (int) rint(duration / dinterval);
+
+ double to = 0, from = 0;
+ if(getTo().isEmpty())
+ to = targetElement()->getAttribute(getAttributeName()).string().toDouble();
+ else
+ to = getTo().toDouble();
+
+ if(getFrom().isEmpty())
+ from = targetElement()->getAttribute(getAttributeName()).string().toDouble();
+ else
+ from = getFrom().toDouble();
+
+ // 'by' support
+ if(!getBy().isEmpty())
+ {
+ m_animVal = from;
+ m_addStep = getBy().toDouble() / m_steps;
+ }
+ else
+ {
+ m_animVal = from;
+ m_addStep = (to - m_animVal) / m_steps;
+ }
+
+ m_connected = true;
+ ownerDoc()->timeScheduler()->connectIntervalTimer(this);
+ }
+ else
+ {
+ m_animVal += m_addStep;
+ applyAttribute(getAttributeName(), QString::number(m_animVal));
+ }
+
+ if(m_step < m_steps)
+ m_step++;
+ else
+ {
+ ownerDoc()->timeScheduler()->disconnectIntervalTimer(this);
+ m_connected = false;
+ if(m_fill == REMOVE)
+ applyAttribute(getAttributeName(), targetElement()->getAttribute(getAttributeName()).string());
+ }
+
+#if 0
+ m_attributeTimer = addTimer(interval() * 1000, false);
+
+
+ /*
+ m_steps = (getSimpleDuration() * 1000) / SVGAnimationElementImpl::timerTime;
+ m_step = 0;
+
+ if(m_additive == "sum" && m_times == 1 && !needCombine)
+ {
+ float add;
+
+ SVGLengthImpl *temp = new SVGLengthImpl();
+ temp->ref();
+ temp->setValueAsString(targetElement()->getAttribute(m_attributeName).string());
+ add = temp->value();
+ temp->deref();
+
+ m_from += add;
+ m_newFrom += add;
+ m_to += add;
+ m_newTo += add;
+
+ m_additiveAdded = add;
+ }
+
+ m_addStep = (m_to - m_from) / m_steps;
+ m_attributeTimer = addTimer(SVGAnimationElementImpl::timerTime, false);*/
+ }
+ else
+ {
+/* m_from += m_addStep;
+
+ if(m_additive == "replace" && needCombine)
+ needCombine = false;
+
+ applyAttribute(m_attributeName, QString::number(m_from), needCombine);
+
+ m_step++;
+
+ if(m_step == m_steps)
+ {
+ removeTimer(m_attributeTimer);
+
+ if(getRepeatDuration() == "indefinite" || getRepeatCount() == "indefinite")
+ {
+ m_times++;
+ m_firstEvent = true;
+
+ if(m_accumulate != "sum")
+ {
+ m_from = m_newFrom;
+ m_to = m_newTo;
+ }
+ else
+ {
+ m_from += (m_newFrom - m_additiveAdded) / 2;
+ m_to += (m_newTo - m_additiveAdded) / 2;
+ }
+
+ m_addStep = 0;
+ m_attributeTimer = 0;
+
+ addTimer(1);
+ }
+ else if(!getRepeatCount().isEmpty())
+ {
+ if(m_times <= getRepeatCount().toInt())
+ {
+ m_times++;
+ m_firstEvent = true;
+
+ if(m_accumulate != "sum")
+ {
+ m_from = m_newFrom;
+ m_to = m_newTo;
+ }
+ else
+ {
+ m_from += (m_newFrom - m_additiveAdded) / 2;
+ m_to += (m_newTo - m_additiveAdded) / 2;
+ }
+
+ m_addStep = 0;
+ m_attributeTimer = 0;
+
+ addTimer(1);
+ }
+ }
+ }*/
+ }
+#endif // 0
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateElementImpl.h b/ksvg/impl/SVGAnimateElementImpl.h
new file mode 100644
index 00000000..855ced6e
--- /dev/null
+++ b/ksvg/impl/SVGAnimateElementImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateElementImpl_H
+#define SVGAnimateElementImpl_H
+
+#include "ksvg_lookup.h"
+#include "SVGAnimationElementImpl.h"
+
+class QTimer;
+
+namespace KSVG
+{
+
+class SVGAnimateElementImpl : public SVGAnimationElementImpl
+{
+public:
+ SVGAnimateElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAnimateElementImpl();
+
+ virtual void handleTimerEvent();
+ virtual void setAttributes();
+
+private:
+ double m_addStep, m_animVal;
+ QTimer *m_timer;
+
+ int m_steps, m_step;
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAnimateElementImpl, "animate")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateMotionElementImpl.cc b/ksvg/impl/SVGAnimateMotionElementImpl.cc
new file mode 100644
index 00000000..ce756d55
--- /dev/null
+++ b/ksvg/impl/SVGAnimateMotionElementImpl.cc
@@ -0,0 +1,102 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+// TODO: CLEANUP
+
+#include <dom/dom_doc.h>
+#include "SVGDocumentImpl.h"
+#include "SVGPathElementImpl.h"
+#include "SVGAnimateMotionElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateMotionElementImpl::SVGAnimateMotionElementImpl(DOM::ElementImpl *impl) : SVGAnimationElementImpl(impl)
+{
+}
+
+SVGAnimateMotionElementImpl::~SVGAnimateMotionElementImpl()
+{
+}
+
+void SVGAnimateMotionElementImpl::setAttributes()
+{
+ SVGAnimationElementImpl::setAttributes();
+
+/*
+ // TODO: rotate..
+
+ DOM::DOMString _path = getAttribute("path");
+ if(!_path.isNull())
+ {
+ if(m_path)
+ m_path->deref();
+
+ m_path = new SVGPathElementImpl(reinterpret_cast<DOM::ElementImpl *>(static_cast<DOM::Document *>(ownerDoc())->createElement("path").handle()));
+ m_path->setOwnerDoc(ownerDoc());
+ m_path->setAttribute("d", _path);
+ m_path->setAttributes();
+ }
+
+ addTimer(int(getStartTime() * 1000));*/
+}
+
+//void SVGAnimateMotionElementImpl::prerender(KSVGPainter *p)
+//{
+// SVGAnimationElementImpl::prerender(p);
+
+/* if(!m_pathArray)
+ {
+ bool temp;
+ m_pathArray = m_path->preparePath(&temp, p->worldMatrix());
+ }*/
+//}
+
+void SVGAnimateMotionElementImpl::handleTimerEvent(bool /*needCombine*/)
+{
+/* if(m_firstEvent)
+ {
+ m_firstEvent = false;
+
+ m_steps = (int) (getSimpleDuration() * 1000) / interval();
+ m_step = 0;
+
+ m_motionTimer = addTimer(interval() * 1000, false);
+ }
+ else
+ {
+ m_step++;
+
+ if(m_step <= m_pathArray->count() - 1)
+ {
+ QPoint p = m_pathArray->point(m_step - 50);
+ applyAttribute("x", QString::number(p.x()));
+ applyAttribute("y", QString::number(p.y()));
+ kdDebug() << " X " << p.x() << " Y " << p.y() << " (" << m_pathArray->count() << "; " << m_step << ")" <<endl;
+ }
+
+ if(m_step == m_steps)
+ {
+ // TODO: repeat
+ removeTimer(m_motionTimer);
+ }
+ }*/
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateMotionElementImpl.h b/ksvg/impl/SVGAnimateMotionElementImpl.h
new file mode 100644
index 00000000..fed4c550
--- /dev/null
+++ b/ksvg/impl/SVGAnimateMotionElementImpl.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateMotionElementImpl_H
+#define SVGAnimateMotionElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGAnimationElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathElementImpl;
+class SVGAnimateMotionElementImpl : public SVGAnimationElementImpl
+{
+public:
+ SVGAnimateMotionElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAnimateMotionElementImpl();
+
+ virtual void handleTimerEvent(bool needCombine = false);
+ virtual void setAttributes();
+
+private:
+ int m_steps, m_step;
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAnimateMotionElementImpl, "animateMotion")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.cc b/ksvg/impl/SVGAnimateTransformElementImpl.cc
new file mode 100644
index 00000000..d2634bb1
--- /dev/null
+++ b/ksvg/impl/SVGAnimateTransformElementImpl.cc
@@ -0,0 +1,257 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qstringlist.h>
+
+#include "SVGLengthImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGAnimateTransformElementImpl.h"
+
+using namespace KSVG;
+
+SVGAnimateTransformElementImpl::SVGAnimateTransformElementImpl(DOM::ElementImpl *impl) : SVGAnimationElementImpl(impl)
+{
+ m_firstEvent = true;
+ m_setAttributes = false;
+
+ m_rotateX = -1;
+ m_rotateY = -1;
+ m_times = 1;
+ m_from = 0;
+ m_to = 0;
+
+ m_addStep = 0;
+}
+
+SVGAnimateTransformElementImpl::~SVGAnimateTransformElementImpl()
+{
+}
+
+void SVGAnimateTransformElementImpl::setAttributes()
+{
+ if(m_setAttributes)
+ return;
+
+ m_setAttributes = true;
+
+ SVGAnimationElementImpl::setAttributes();
+
+ /*
+ // TODO: much :)
+
+ DOM::DOMString _type = getAttribute("type");
+ if(!_type.isNull())
+ m_type = _type.string().lower();
+
+ DOM::DOMString _from = getAttribute("from");
+ if(!_from.isNull())
+ {
+ if(m_type != "rotate")
+ {
+ SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength();
+ temp->setValueAsString(_from.string());
+
+ m_from = temp->value();
+
+ temp->deref();
+ }
+ else
+ {
+ SVGTransformListImpl *list = new SVGTransformListImpl();
+ list->ref();
+
+ SVGHelperImpl::parseTransformAttribute(list, m_type + "(" + _from.string() + ")");
+
+ m_from = list->getFirst()->angle();
+
+ QStringList stringList = QStringList::split(' ', list->getFirst()->toString());
+ m_rotateX = stringList[1].toInt();
+ m_rotateY = stringList[2].mid(0, stringList[2].length() - 1).toInt();
+
+ list->deref();
+ }
+
+ m_newFrom = m_from;
+ m_addStep = m_from;
+ }
+
+ DOM::DOMString _to = getAttribute("to");
+ if(!_to.isNull())
+ {
+ if(m_type != "rotate")
+ {
+ SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength();
+ temp->setValueAsString(_to.string());
+
+ m_to = temp->value();
+
+ temp->deref();
+ }
+ else
+ {
+ SVGTransformListImpl *list = new SVGTransformListImpl();
+ list->ref();
+
+ SVGHelperImpl::parseTransformAttribute(list, m_type + "(" + _to.string() + ")");
+
+ m_to = list->getFirst()->angle();
+
+ list->deref();
+ }
+
+ m_newTo = m_to;
+ }
+
+ // TODO: values + rotate including cx + cy
+ DOM::DOMString _values = getAttribute("values");
+ if(!_values.isNull())
+ {
+ QString test = _values.string();
+
+ if(test.contains(";"))
+ {
+ SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength();
+
+ QStringList list = QStringList::split(';', test);
+ temp->setValueAsString(list[0]);
+ m_from = temp->value();
+ temp->setValueAsString(list[1]);
+ m_to = temp->value();
+
+ m_newFrom = m_from;
+ m_newTo = m_to;
+ m_addStep = m_from;
+
+ temp->deref();
+ }
+ }
+
+ if(getStartTime() != -1)
+ addTimer(int(getStartTime() * 1000));
+ else
+ addTimer(1);
+ */
+}
+
+void SVGAnimateTransformElementImpl::handleTimerEvent(bool)
+{ /*
+ if(m_firstEvent)
+ {
+ m_firstEvent = false;
+
+ m_steps = (int) (getSimpleDuration() * 1000) / interval();
+ m_step = 0;
+
+ m_addStep = (m_to - m_from) / m_steps;
+
+ m_transformTimer = addTimer(interval() * 1000, false);
+ }
+ else
+ {
+ m_from += m_addStep;
+
+ SVGTransformImpl *transform = SVGSVGElementImpl::createSVGTransform();
+
+ if(m_type == "rotate")
+ {
+ int x = 0, y = 0;
+
+ if(m_rotateX != -1)
+ x = m_rotateX;
+
+ if(m_rotateY != -1)
+ y = m_rotateY;
+
+ transform->setRotate(m_from, x, y);
+ }
+ else if(m_type == "scale")
+ transform->setScale(m_from, m_from);
+ else if(m_type == "skewx")
+ transform->setSkewX(m_from);
+ else if(m_type == "skewy")
+ transform->setSkewY(m_from);
+
+ QString trans = transform->toString();
+ QString last = trans;
+
+ if(targetElement()->hasAttribute("transform"))
+ {
+ trans += " " + targetElement()->getAttribute("transform").string();
+
+ if(!m_lastTransform.isEmpty())
+ {
+ int pos = trans.find(m_lastTransform);
+
+ QString extract;
+ extract += trans.mid(0, pos);
+ extract += trans.mid(pos + m_lastTransform.length() + 1, trans.length());
+
+ trans = extract;
+ }
+ }
+
+ m_lastTransform = last;
+
+ transform->deref();
+
+ applyAttribute("transform", trans);
+
+ m_step++;
+
+ if(m_step == m_steps)
+ {
+ removeTimer(m_transformTimer);
+
+ if(getRepeatDuration() == "indefinite" || getRepeatCount() == "indefinite")
+ {
+ m_firstEvent = true;
+ m_from = m_newFrom;
+ m_to = m_newTo;
+
+ m_addStep = 0;
+ m_transformTimer = 0;
+
+ addTimer(1);
+ }
+ else if(!getRepeatCount().isEmpty())
+ {
+ if(m_times <= getRepeatCount().toInt())
+ {
+ m_times++;
+ m_firstEvent = true;
+ m_from = m_newFrom;
+ m_to = m_newTo;
+
+ m_addStep = 0;
+ m_transformTimer = 0;
+
+ addTimer(1);
+ }
+ }
+ }
+ }
+ */
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.h b/ksvg/impl/SVGAnimateTransformElementImpl.h
new file mode 100644
index 00000000..7e6e2653
--- /dev/null
+++ b/ksvg/impl/SVGAnimateTransformElementImpl.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimateTransformElementImpl_H
+#define SVGAnimateTransformElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGAnimationElementImpl.h"
+
+class QTimer;
+
+namespace KSVG
+{
+
+class SVGTransformImpl;
+class SVGTransformListImpl;
+class SVGAnimateTransformElementImpl : public SVGAnimationElementImpl
+{
+public:
+ SVGAnimateTransformElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAnimateTransformElementImpl();
+
+ virtual void handleTimerEvent(bool needCombine = false);
+ virtual void setAttributes();
+
+private:
+ QString m_type, m_lastTransform;
+
+ int m_times;
+
+ int m_rotateX, m_rotateY;
+
+ int m_steps, m_step;
+
+ double m_from, m_to, m_newFrom, m_newTo;
+ double m_addStep;
+
+ QTimer *m_transformTimer;
+ SVGTransformListImpl *m_transformList;
+
+ bool m_firstEvent;
+ bool m_setAttributes;
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGAnimateTransformElementImpl, "animateTransform")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedAngleImpl.cc b/ksvg/impl/SVGAnimatedAngleImpl.cc
new file mode 100644
index 00000000..63f0c000
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedAngleImpl.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAngleImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedAngleImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedAngleImpl::SVGAnimatedAngleImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_baseVal = SVGSVGElementImpl::createSVGAngle();
+ m_animVal = SVGSVGElementImpl::createSVGAngle();
+}
+
+SVGAnimatedAngleImpl::~SVGAnimatedAngleImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGAngleImpl *SVGAnimatedAngleImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGAngleImpl *SVGAnimatedAngleImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedAngleImpl::s_hashTable 3
+ baseVal SVGAnimatedAngleImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedAngleImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedAngleImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedAngleImpl.h b/ksvg/impl/SVGAnimatedAngleImpl.h
new file mode 100644
index 00000000..f6617ce6
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedAngleImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedAngleImpl_H
+#define SVGAnimatedAngleImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAngleImpl;
+class SVGAnimatedAngleImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedAngleImpl();
+ virtual ~SVGAnimatedAngleImpl();
+
+ SVGAngleImpl *baseVal() const;
+ SVGAngleImpl *animVal() const;
+
+private:
+ SVGAngleImpl *m_baseVal;
+ SVGAngleImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedBooleanImpl.cc b/ksvg/impl/SVGAnimatedBooleanImpl.cc
new file mode 100644
index 00000000..d30fa5ef
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedBooleanImpl.cc
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedBooleanImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedBooleanImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedBooleanImpl::SVGAnimatedBooleanImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_baseVal = false;
+ m_animVal = false;
+}
+
+SVGAnimatedBooleanImpl::~SVGAnimatedBooleanImpl()
+{
+}
+
+void SVGAnimatedBooleanImpl::setBaseVal(bool baseVal)
+{
+ m_baseVal = baseVal;
+}
+
+bool SVGAnimatedBooleanImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+bool SVGAnimatedBooleanImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedBooleanImpl::s_hashTable 3
+ baseVal SVGAnimatedBooleanImpl::BaseVal DontDelete
+ animVal SVGAnimatedBooleanImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedBooleanImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return Number(baseVal());
+ case AnimVal:
+ return Number(animVal());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAnimatedBooleanImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case BaseVal:
+ setBaseVal(value.toBoolean(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedBooleanImpl.h b/ksvg/impl/SVGAnimatedBooleanImpl.h
new file mode 100644
index 00000000..9e31792e
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedBooleanImpl.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedBooleanImpl_H
+#define SVGAnimatedBooleanImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedBooleanImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedBooleanImpl();
+ virtual ~SVGAnimatedBooleanImpl();
+
+ void setBaseVal(bool baseVal);
+ bool baseVal() const;
+
+ bool animVal() const;
+
+private:
+ bool m_baseVal;
+ bool m_animVal;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedEnumerationImpl.cc b/ksvg/impl/SVGAnimatedEnumerationImpl.cc
new file mode 100644
index 00000000..f619f231
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedEnumerationImpl.cc
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedEnumerationImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedEnumerationImpl::SVGAnimatedEnumerationImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_baseVal = 0;
+ m_animVal = 0;
+}
+
+SVGAnimatedEnumerationImpl::~SVGAnimatedEnumerationImpl()
+{
+}
+
+void SVGAnimatedEnumerationImpl::setBaseVal(unsigned short baseVal)
+{
+ m_baseVal = baseVal;
+}
+
+unsigned short SVGAnimatedEnumerationImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+unsigned short SVGAnimatedEnumerationImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedEnumerationImpl::s_hashTable 3
+ baseVal SVGAnimatedEnumerationImpl::BaseVal DontDelete
+ animVal SVGAnimatedEnumerationImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedEnumerationImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return Number(baseVal());
+ case AnimVal:
+ return Number(animVal());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAnimatedEnumerationImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case BaseVal:
+ setBaseVal(static_cast<unsigned short>(value.toNumber(exec)));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedEnumerationImpl.h b/ksvg/impl/SVGAnimatedEnumerationImpl.h
new file mode 100644
index 00000000..ae4638f4
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedEnumerationImpl.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedEnumerationImpl_H
+#define SVGAnimatedEnumerationImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumerationImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedEnumerationImpl();
+ virtual ~SVGAnimatedEnumerationImpl();
+
+ void setBaseVal(unsigned short baseVal);
+ unsigned short baseVal() const;
+
+ unsigned short animVal() const;
+
+private:
+ unsigned short m_baseVal;
+ unsigned short m_animVal;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedIntegerImpl.cc b/ksvg/impl/SVGAnimatedIntegerImpl.cc
new file mode 100644
index 00000000..8bf08a87
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedIntegerImpl.cc
@@ -0,0 +1,91 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedIntegerImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedIntegerImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedIntegerImpl::SVGAnimatedIntegerImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_baseVal = 0;
+ m_animVal = 0;
+}
+
+SVGAnimatedIntegerImpl::~SVGAnimatedIntegerImpl()
+{
+}
+
+void SVGAnimatedIntegerImpl::setBaseVal(long baseVal)
+{
+ m_baseVal = baseVal;
+}
+
+long SVGAnimatedIntegerImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+long SVGAnimatedIntegerImpl::animVal() const
+{
+ return m_animVal;
+}
+
+/*
+@namespace KSVG
+@begin SVGAnimatedIntegerImpl::s_hashTable 3
+ baseVal SVGAnimatedIntegerImpl::BaseVal DontDelete
+ animVal SVGAnimatedIntegerImpl::AnimVal DontDelete
+@end
+*/
+
+Value SVGAnimatedIntegerImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return Number(baseVal());
+ case AnimVal:
+ return Number(animVal());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+ return KJS::Undefined();
+}
+
+void SVGAnimatedIntegerImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case BaseVal:
+ setBaseVal(value.toInteger(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedIntegerImpl.h b/ksvg/impl/SVGAnimatedIntegerImpl.h
new file mode 100644
index 00000000..8ad7ad88
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedIntegerImpl.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedIntegerImpl_H
+#define SVGAnimatedIntegerImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedIntegerImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedIntegerImpl();
+ virtual ~SVGAnimatedIntegerImpl();
+
+ void setBaseVal(long baseVal);
+ long baseVal() const;
+
+ long animVal() const;
+
+private:
+ long m_baseVal;
+ long m_animVal;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedLengthImpl.cc b/ksvg/impl/SVGAnimatedLengthImpl.cc
new file mode 100644
index 00000000..25176965
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedLengthImpl.cc
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedLengthImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedLengthImpl::SVGAnimatedLengthImpl(LengthMode mode, SVGElementImpl *object) : DOM::DomShared()
+{
+ m_baseVal = new SVGLengthImpl(mode, object);
+ m_baseVal->ref();
+
+ m_animVal = new SVGLengthImpl(mode, object);
+ m_animVal->ref();
+}
+
+SVGAnimatedLengthImpl::SVGAnimatedLengthImpl(const SVGAnimatedLengthImpl &other) : DOM::DomShared()
+{
+ (*this) = other;
+}
+
+SVGAnimatedLengthImpl::~SVGAnimatedLengthImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGAnimatedLengthImpl &SVGAnimatedLengthImpl::operator=(const SVGAnimatedLengthImpl &other)
+{
+ *m_baseVal = *(other.m_baseVal);
+ *m_animVal = *(other.m_animVal);
+
+ return *this;
+}
+
+SVGLengthImpl *SVGAnimatedLengthImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGLengthImpl *SVGAnimatedLengthImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedLengthImpl::s_hashTable 3
+ baseVal SVGAnimatedLengthImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedLengthImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedLengthImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedLengthImpl.h b/ksvg/impl/SVGAnimatedLengthImpl.h
new file mode 100644
index 00000000..80f473db
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedLengthImpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedLengthImpl_H
+#define SVGAnimatedLengthImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "SVGLengthImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+class SVGElementImpl;
+class SVGAnimatedLengthImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedLengthImpl(LengthMode mode = LENGTHMODE_UNKNOWN, SVGElementImpl *object = 0);
+ SVGAnimatedLengthImpl(const SVGAnimatedLengthImpl &);
+ virtual ~SVGAnimatedLengthImpl();
+
+ SVGAnimatedLengthImpl &operator=(const SVGAnimatedLengthImpl &);
+
+ SVGLengthImpl *baseVal() const;
+ SVGLengthImpl *animVal() const;
+
+private:
+ SVGLengthImpl *m_baseVal;
+ SVGLengthImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedLengthListImpl.cc b/ksvg/impl/SVGAnimatedLengthListImpl.cc
new file mode 100644
index 00000000..296fa1ea
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedLengthListImpl.cc
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedLengthListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedLengthListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedLengthListImpl::SVGAnimatedLengthListImpl() : DOM::DomShared()
+{
+ m_baseVal = new SVGLengthListImpl();
+ m_baseVal->ref();
+
+ m_animVal = new SVGLengthListImpl();
+ m_animVal->ref();
+}
+
+SVGAnimatedLengthListImpl::SVGAnimatedLengthListImpl(const SVGAnimatedLengthListImpl &other) : DOM::DomShared()
+{
+ (*this) = other;
+}
+
+SVGAnimatedLengthListImpl::~SVGAnimatedLengthListImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGAnimatedLengthListImpl &SVGAnimatedLengthListImpl::operator=(const SVGAnimatedLengthListImpl &other)
+{
+ *m_baseVal = *(other.m_baseVal);
+ *m_animVal = *(other.m_animVal);
+
+ return *this;
+}
+
+SVGLengthListImpl *SVGAnimatedLengthListImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGLengthListImpl *SVGAnimatedLengthListImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedLengthListImpl::s_hashTable 3
+ baseVal SVGAnimatedLengthListImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedLengthListImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedLengthListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedLengthListImpl.h b/ksvg/impl/SVGAnimatedLengthListImpl.h
new file mode 100644
index 00000000..74f3cb1e
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedLengthListImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedLengthListImpl_H
+#define SVGAnimatedLengthListImpl_H
+
+#include "SVGLengthListImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthListImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedLengthListImpl();
+ SVGAnimatedLengthListImpl(const SVGAnimatedLengthListImpl &);
+ virtual ~SVGAnimatedLengthListImpl();
+
+ SVGAnimatedLengthListImpl &operator=(const SVGAnimatedLengthListImpl &);
+
+ SVGLengthListImpl *baseVal() const;
+ SVGLengthListImpl *animVal() const;
+
+private:
+ SVGLengthListImpl *m_baseVal;
+ SVGLengthListImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
diff --git a/ksvg/impl/SVGAnimatedNumberImpl.cc b/ksvg/impl/SVGAnimatedNumberImpl.cc
new file mode 100644
index 00000000..2937c233
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedNumberImpl.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedNumberImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedNumberImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedNumberImpl::SVGAnimatedNumberImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_baseVal = 0;
+ m_animVal = 0;
+}
+
+SVGAnimatedNumberImpl::~SVGAnimatedNumberImpl()
+{
+}
+
+void SVGAnimatedNumberImpl::setBaseVal(float baseVal)
+{
+ m_baseVal = baseVal;
+}
+
+float SVGAnimatedNumberImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+float SVGAnimatedNumberImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedNumberImpl::s_hashTable 3
+ baseVal SVGAnimatedNumberImpl::BaseVal DontDelete
+ animVal SVGAnimatedNumberImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedNumberImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return Number(baseVal());
+ case AnimVal:
+ return Number(animVal());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+
+ return Undefined();
+}
+
+void SVGAnimatedNumberImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case BaseVal:
+ setBaseVal(value.toNumber(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedNumberImpl.h b/ksvg/impl/SVGAnimatedNumberImpl.h
new file mode 100644
index 00000000..81c9217b
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedNumberImpl.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedNumberImpl_H
+#define SVGAnimatedNumberImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedNumberImpl();
+ virtual ~SVGAnimatedNumberImpl();
+
+ void setBaseVal(float baseVal);
+ float baseVal() const;
+
+ float animVal() const;
+
+private:
+ float m_baseVal;
+ float m_animVal;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedNumberListImpl.cc b/ksvg/impl/SVGAnimatedNumberListImpl.cc
new file mode 100644
index 00000000..d6ff44e0
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedNumberListImpl.cc
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedNumberListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedNumberListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedNumberListImpl::SVGAnimatedNumberListImpl() : DOM::DomShared()
+{
+ m_baseVal = new SVGNumberListImpl();
+ m_baseVal->ref();
+
+ m_animVal = new SVGNumberListImpl();
+ m_animVal->ref();
+}
+
+SVGAnimatedNumberListImpl::~SVGAnimatedNumberListImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGNumberListImpl *SVGAnimatedNumberListImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGNumberListImpl *SVGAnimatedNumberListImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedNumberListImpl::s_hashTable 3
+ baseVal SVGAnimatedNumberListImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedNumberListImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedNumberListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedNumberListImpl.h b/ksvg/impl/SVGAnimatedNumberListImpl.h
new file mode 100644
index 00000000..b44b3ffd
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedNumberListImpl.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedNumberListImpl_H
+#define SVGAnimatedNumberListImpl_H
+
+#include "SVGNumberListImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberListImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedNumberListImpl();
+ virtual ~SVGAnimatedNumberListImpl();
+
+ SVGNumberListImpl *baseVal() const;
+ SVGNumberListImpl *animVal() const;
+
+private:
+ SVGNumberListImpl *m_baseVal;
+ SVGNumberListImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
diff --git a/ksvg/impl/SVGAnimatedPathDataImpl.cc b/ksvg/impl/SVGAnimatedPathDataImpl.cc
new file mode 100644
index 00000000..2b9ebf4c
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPathDataImpl.cc
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegListImpl.h"
+#include "SVGAnimatedPathDataImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedPathDataImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedPathDataImpl::SVGAnimatedPathDataImpl() : DOM::DomShared()
+{
+ m_pathSegList = new SVGPathSegListImpl();
+ m_pathSegList->ref();
+
+ m_normalizedPathSegList = new SVGPathSegListImpl();
+ m_normalizedPathSegList->ref();
+
+ m_animatedPathSegList = new SVGPathSegListImpl();
+ m_animatedPathSegList->ref();
+
+ m_animatedNormalizedPathSegList = new SVGPathSegListImpl();
+ m_animatedNormalizedPathSegList->ref();
+}
+
+SVGAnimatedPathDataImpl::~SVGAnimatedPathDataImpl()
+{
+ if(m_pathSegList)
+ m_pathSegList->deref();
+ if(m_normalizedPathSegList)
+ m_normalizedPathSegList->deref();
+ if(m_animatedPathSegList)
+ m_animatedPathSegList->deref();
+ if(m_animatedNormalizedPathSegList)
+ m_animatedNormalizedPathSegList->deref();
+}
+
+SVGPathSegListImpl *SVGAnimatedPathDataImpl::pathSegList() const
+{
+ return m_pathSegList;
+}
+
+SVGPathSegListImpl *SVGAnimatedPathDataImpl::normalizedPathSegList() const
+{
+ return m_normalizedPathSegList;
+}
+
+SVGPathSegListImpl *SVGAnimatedPathDataImpl::animatedPathSegList() const
+{
+ return m_animatedPathSegList;
+}
+
+SVGPathSegListImpl *SVGAnimatedPathDataImpl::animatedNormalizedPathSegList() const
+{
+ return m_animatedNormalizedPathSegList;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedPathDataImpl::s_hashTable 5
+ pathSegList SVGAnimatedPathDataImpl::PathSegList DontDelete|ReadOnly
+ normalizedPathSegList SVGAnimatedPathDataImpl::NormalizedPathSegList DontDelete|ReadOnly
+ animatedPathSegList SVGAnimatedPathDataImpl::AnimatedPathSegList DontDelete|ReadOnly
+ animatedNormalizedPathSegList SVGAnimatedPathDataImpl::AnimatedNormalizedPathSegList DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedPathDataImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case PathSegList:
+ return pathSegList()->cache(exec);
+ case NormalizedPathSegList:
+ return normalizedPathSegList()->cache(exec);
+ case AnimatedPathSegList:
+ return animatedPathSegList()->cache(exec);
+ case AnimatedNormalizedPathSegList:
+ return animatedNormalizedPathSegList()->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+}
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedPathDataImpl.h b/ksvg/impl/SVGAnimatedPathDataImpl.h
new file mode 100644
index 00000000..2af1f893
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPathDataImpl.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPathDataImpl_H
+#define SVGAnimatedPathDataImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGPathSegListImpl;
+
+// special case, virtual public HAS to stay
+class SVGAnimatedPathDataImpl : virtual public DOM::DomShared
+{
+public:
+ SVGAnimatedPathDataImpl();
+ virtual ~SVGAnimatedPathDataImpl();
+
+ SVGPathSegListImpl *pathSegList() const;
+ SVGPathSegListImpl *normalizedPathSegList() const;
+ SVGPathSegListImpl *animatedPathSegList() const;
+ SVGPathSegListImpl *animatedNormalizedPathSegList() const;
+
+private:
+ SVGPathSegListImpl *m_pathSegList;
+ SVGPathSegListImpl *m_normalizedPathSegList;
+ SVGPathSegListImpl *m_animatedPathSegList;
+ SVGPathSegListImpl *m_animatedNormalizedPathSegList;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ PathSegList, NormalizedPathSegList, AnimatedPathSegList, AnimatedNormalizedPathSegList
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedPointsImpl.cc b/ksvg/impl/SVGAnimatedPointsImpl.cc
new file mode 100644
index 00000000..093ded77
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPointsImpl.cc
@@ -0,0 +1,139 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstringlist.h>
+
+#include "CanvasItem.h"
+#include "SVGPointListImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedPointsImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedPointsImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGAnimatedPointsImpl::SVGAnimatedPointsImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_points = new SVGPointListImpl();
+ m_points->ref();
+
+ m_animatedPoints = new SVGPointListImpl();
+ m_animatedPoints->ref();
+}
+
+SVGAnimatedPointsImpl::~SVGAnimatedPointsImpl()
+{
+ if(m_points)
+ m_points->deref();
+ if(m_animatedPoints)
+ m_animatedPoints->deref();
+}
+
+SVGPointListImpl *SVGAnimatedPointsImpl::points() const
+{
+ return m_points;
+}
+
+SVGPointListImpl *SVGAnimatedPointsImpl::animatedPoints() const
+{
+ return m_animatedPoints;
+}
+
+void SVGAnimatedPointsImpl::parsePoints(QString _points, SVGPointListImpl *points)
+{
+ if(_points.isEmpty())
+ return;
+
+ _points = _points.simplifyWhiteSpace();
+
+ if(_points.contains(",,") || _points.contains(", ,"))
+ return;
+
+ _points.replace(',', ' ');
+ _points.replace('\r', QString::null);
+ _points.replace('\n', QString::null);
+
+ _points = _points.simplifyWhiteSpace();
+
+ QStringList pointList = QStringList::split(' ', _points);
+ for(QStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
+ {
+ SVGPointImpl *point = SVGSVGElementImpl::createSVGPoint();
+ point->setX((*(it++)).toFloat());
+ point->setY((*it).toFloat());
+
+ points->appendItem(point);
+ }
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedPointsImpl::s_hashTable 3
+ points SVGAnimatedPointsImpl::Points DontDelete|ReadOnly
+ animatedPoints SVGAnimatedPointsImpl::AnimatedPoints DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedPointsImpl::getValueProperty(ExecState *exec, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Points: // TODO: We need a pointList->toText function, quite trivial
+// if(!attributeMode)
+ return points()->cache(exec);
+ case AnimatedPoints:
+ return animatedPoints()->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAnimatedPointsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Points:
+ parsePoints(value.toString(exec).qstring(), m_points);
+ break;
+ case AnimatedPoints:
+ parsePoints(value.toString(exec).qstring(), m_animatedPoints);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedPointsImpl.h b/ksvg/impl/SVGAnimatedPointsImpl.h
new file mode 100644
index 00000000..ef4dafca
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPointsImpl.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPointsImpl_H
+#define SVGAnimatedPointsImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+class QString;
+
+namespace KSVG
+{
+
+class SVGPointListImpl;
+class SVGAnimatedPointsImpl : virtual public DOM::DomShared
+{
+public:
+ SVGAnimatedPointsImpl();
+ virtual ~SVGAnimatedPointsImpl();
+
+ SVGPointListImpl *points() const;
+ SVGPointListImpl *animatedPoints() const;
+
+ static void parsePoints(QString _points, SVGPointListImpl *points);
+
+protected:
+ SVGPointListImpl *m_points;
+ SVGPointListImpl *m_animatedPoints;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Points, AnimatedPoints
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.cc b/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.cc
new file mode 100644
index 00000000..166b987f
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedPreserveAspectRatioImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedPreserveAspectRatioImpl::SVGAnimatedPreserveAspectRatioImpl() : DOM::DomShared()
+{
+ m_baseVal = new SVGPreserveAspectRatioImpl();
+ m_baseVal->ref();
+
+ m_animVal = new SVGPreserveAspectRatioImpl();
+ m_animVal->ref();
+}
+
+SVGAnimatedPreserveAspectRatioImpl::~SVGAnimatedPreserveAspectRatioImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGPreserveAspectRatioImpl *SVGAnimatedPreserveAspectRatioImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGPreserveAspectRatioImpl *SVGAnimatedPreserveAspectRatioImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedPreserveAspectRatioImpl::s_hashTable 3
+ baseVal SVGAnimatedPreserveAspectRatioImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedPreserveAspectRatioImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedPreserveAspectRatioImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.h b/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.h
new file mode 100644
index 00000000..30fb7c87
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedPreserveAspectRatioImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedPreserveAspectRatioImpl_H
+#define SVGAnimatedPreserveAspectRatioImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGPreserveAspectRatioImpl;
+class SVGAnimatedPreserveAspectRatioImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedPreserveAspectRatioImpl();
+ virtual ~SVGAnimatedPreserveAspectRatioImpl();
+
+ SVGPreserveAspectRatioImpl *baseVal() const;
+ SVGPreserveAspectRatioImpl *animVal() const;
+
+private:
+ SVGPreserveAspectRatioImpl *m_baseVal;
+ SVGPreserveAspectRatioImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedRectImpl.cc b/ksvg/impl/SVGAnimatedRectImpl.cc
new file mode 100644
index 00000000..4ba7a50d
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedRectImpl.cc
@@ -0,0 +1,81 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGRectImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedRectImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedRectImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedRectImpl::SVGAnimatedRectImpl() : DOM::DomShared()
+{
+ m_baseVal = SVGSVGElementImpl::createSVGRect();
+ m_animVal = SVGSVGElementImpl::createSVGRect();
+}
+
+SVGAnimatedRectImpl::~SVGAnimatedRectImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGRectImpl *SVGAnimatedRectImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGRectImpl *SVGAnimatedRectImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedRectImpl::s_hashTable 3
+ baseVal SVGAnimatedRectImpl::BaseVal DontDelete
+ animVal SVGAnimatedRectImpl::AnimVal DontDelete
+@end
+*/
+
+Value SVGAnimatedRectImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedRectImpl.h b/ksvg/impl/SVGAnimatedRectImpl.h
new file mode 100644
index 00000000..0619505d
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedRectImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedRectImpl_H
+#define SVGAnimatedRectImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGAnimatedRectImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedRectImpl();
+ virtual ~SVGAnimatedRectImpl();
+
+ SVGRectImpl *baseVal() const;
+ SVGRectImpl *animVal() const;
+
+private:
+ SVGRectImpl *m_baseVal;
+ SVGRectImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedStringImpl.cc b/ksvg/impl/SVGAnimatedStringImpl.cc
new file mode 100644
index 00000000..1ce4f00b
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedStringImpl.cc
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedStringImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedStringImpl::SVGAnimatedStringImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGAnimatedStringImpl::~SVGAnimatedStringImpl()
+{
+}
+
+void SVGAnimatedStringImpl::setBaseVal(const DOM::DOMString &baseVal)
+{
+ m_baseVal = baseVal;
+}
+
+DOM::DOMString SVGAnimatedStringImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+DOM::DOMString SVGAnimatedStringImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedStringImpl::s_hashTable 3
+ baseVal SVGAnimatedStringImpl::BaseVal DontDelete
+ animVal SVGAnimatedStringImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedStringImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return String(baseVal().string());
+ case AnimVal:
+ return String(animVal().string());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAnimatedStringImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case BaseVal:
+ setBaseVal(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedStringImpl.h b/ksvg/impl/SVGAnimatedStringImpl.h
new file mode 100644
index 00000000..cc15f7e2
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedStringImpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedStringImpl_H
+#define SVGAnimatedStringImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedStringImpl();
+ virtual ~SVGAnimatedStringImpl();
+
+ void setBaseVal(const DOM::DOMString &baseVal);
+ DOM::DOMString baseVal() const;
+
+ DOM::DOMString animVal() const;
+
+private:
+ DOM::DOMString m_baseVal;
+ DOM::DOMString m_animVal;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedTransformListImpl.cc b/ksvg/impl/SVGAnimatedTransformListImpl.cc
new file mode 100644
index 00000000..2e3b5536
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedTransformListImpl.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimatedTransformListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGAnimatedTransformListImpl::SVGAnimatedTransformListImpl() : DOM::DomShared()
+{
+ m_baseVal = new SVGTransformListImpl();
+ m_baseVal->ref();
+
+ m_animVal = new SVGTransformListImpl();
+ m_animVal->ref();
+}
+
+SVGAnimatedTransformListImpl::~SVGAnimatedTransformListImpl()
+{
+ if(m_baseVal)
+ m_baseVal->deref();
+ if(m_animVal)
+ m_animVal->deref();
+}
+
+SVGTransformListImpl *SVGAnimatedTransformListImpl::baseVal() const
+{
+ return m_baseVal;
+}
+
+SVGTransformListImpl *SVGAnimatedTransformListImpl::animVal() const
+{
+ return m_animVal;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGAnimatedTransformListImpl::s_hashTable 3
+ baseVal SVGAnimatedTransformListImpl::BaseVal DontDelete|ReadOnly
+ animVal SVGAnimatedTransformListImpl::AnimVal DontDelete|ReadOnly
+@end
+*/
+
+Value SVGAnimatedTransformListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case BaseVal:
+ return m_baseVal->cache(exec);
+ case AnimVal:
+ return m_animVal->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimatedTransformListImpl.h b/ksvg/impl/SVGAnimatedTransformListImpl.h
new file mode 100644
index 00000000..dc4be7e1
--- /dev/null
+++ b/ksvg/impl/SVGAnimatedTransformListImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimatedTransformListImpl_H
+#define SVGAnimatedTransformListImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGTransformListImpl;
+class SVGAnimatedTransformListImpl : public DOM::DomShared
+{
+public:
+ SVGAnimatedTransformListImpl();
+ virtual ~SVGAnimatedTransformListImpl();
+
+ SVGTransformListImpl *baseVal() const;
+ SVGTransformListImpl *animVal() const;
+
+private:
+ SVGTransformListImpl *m_baseVal;
+ SVGTransformListImpl *m_animVal;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ BaseVal, AnimVal
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimationElementImpl.cc b/ksvg/impl/SVGAnimationElementImpl.cc
new file mode 100644
index 00000000..454a323e
--- /dev/null
+++ b/ksvg/impl/SVGAnimationElementImpl.cc
@@ -0,0 +1,465 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include <kdebug.h>
+
+#include <qtimer.h>
+
+#include "CanvasItem.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGAnimationElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGAnimationElementImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGAnimationElementImpl::SVGAnimationElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGTestsImpl(), SVGExternalResourcesRequiredImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_connected = false;
+ m_targetElement = 0;
+
+ m_values = new SVGStringListImpl();
+ m_keyTimes= new SVGStringListImpl();
+ m_keySplines = new SVGStringListImpl();
+
+ m_fill = REMOVE;
+ m_additive = REPLACE;
+ m_accumulate = ACCUMULATE_NONE;
+}
+
+SVGAnimationElementImpl::~SVGAnimationElementImpl()
+{
+ if(m_targetElement)
+ m_targetElement->deref();
+}
+
+SVGElementImpl *SVGAnimationElementImpl::targetElement() const
+{
+ if(!m_targetElement)
+ {
+ SVGAnimationElementImpl *modify = const_cast<SVGAnimationElementImpl *>(this);
+ if(!m_href.isEmpty())
+ modify->setTargetElement(ownerDoc()->getElementByIdRecursive(ownerSVGElement(), SVGURIReferenceImpl::getTarget(m_href)));
+ else if(!parentNode().isNull())
+ modify->setTargetElement(ownerDoc()->getElementFromHandle(parentNode().handle()));
+ }
+
+ return m_targetElement;
+}
+
+double SVGAnimationElementImpl::parseClockValue(const QString &data) const
+{
+ QString parse = data.stripWhiteSpace();
+ QString debugOutput = "parseClockValue(" + parse + ") -> ";
+
+ if(parse == "indefinite") // Saves some time...
+ return -1;
+
+ double result;
+
+ int doublePointOne = parse.find(':');
+ int doublePointTwo = parse.find(':', doublePointOne + 1);
+
+ if(doublePointOne != -1 && doublePointTwo != -1) // Spec: "Full clock values"
+ {
+ unsigned int hours = parse.mid(0, 2).toUInt();
+ unsigned int minutes = parse.mid(3, 2).toUInt();
+ unsigned int seconds = parse.mid(6, 2).toUInt();
+ unsigned int milliseconds = 0;
+
+ result = (3600 * hours) + (60 * minutes) + seconds;
+
+ if(parse.find('.') != -1)
+ {
+ QString temp = parse.mid(9, 2);
+ milliseconds = temp.toUInt();
+ result += (milliseconds * (1 / pow(10.0, temp.length())));
+ }
+ }
+ else if(doublePointOne != -1 && doublePointTwo == -1) // Spec: "Partial clock values"
+ {
+ unsigned int minutes = parse.mid(0, 2).toUInt();
+ unsigned int seconds = parse.mid(3, 2).toUInt();
+ unsigned int milliseconds = 0;
+
+ result = (60 * minutes) + seconds;
+
+ if(parse.find('.') != -1)
+ {
+ QString temp = parse.mid(6, 2);
+ milliseconds = temp.toUInt();
+ result += (milliseconds * (1 / pow(10.0, temp.length())));
+ }
+ }
+ else // Spec: "Timecount values"
+ {
+ int dotPosition = parse.find('.');
+
+ if(parse.endsWith("h"))
+ {
+ if(dotPosition == -1)
+ result = parse.mid(0, parse.length() - 1).toUInt() * 3600;
+ else
+ {
+ result = parse.mid(0, dotPosition).toUInt() * 3600;
+ QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
+ result += (3600.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
+ }
+ }
+ else if(parse.endsWith("min"))
+ {
+ if(dotPosition == -1)
+ result = parse.mid(0, parse.length() - 3).toUInt() * 60;
+ else
+ {
+ result = parse.mid(0, dotPosition).toUInt() * 60;
+ QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 4);
+ result += (60.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
+ }
+ }
+ else if(parse.endsWith("ms"))
+ {
+ if(dotPosition == -1)
+ result = parse.mid(0, parse.length() - 2).toUInt() / 1000.0;
+ else
+ {
+ result = parse.mid(0, dotPosition).toUInt() / 1000.0;
+ QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 3);
+ result += (temp.toUInt() / 1000.0) * (1 / pow(10.0, temp.length()));
+ }
+ }
+ else if(parse.endsWith("s"))
+ {
+ if(dotPosition == -1)
+ result = parse.mid(0, parse.length() - 1).toUInt();
+ else
+ {
+ result = parse.mid(0, dotPosition).toUInt();
+ QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
+ result += temp.toUInt() * (1 / pow(10.0, temp.length()));
+ }
+ }
+ else
+ result = parse.toDouble();
+ }
+
+ kdDebug() << debugOutput << result << endl;
+ return result;
+}
+
+/*
+@namespace KSVG
+@begin SVGAnimationElementImpl::s_hashTable 23
+ targetElement SVGAnimationElementImpl::TargetElement DontDelete|ReadOnly
+ href SVGAnimationElementImpl::Href DontDelete|ReadOnly
+ additive SVGAnimationElementImpl::Additive DontDelete|ReadOnly
+ accumulate SVGAnimationElementImpl::Accumulate DontDelete|ReadOnly
+ attributeName SVGAnimationElementImpl::AttributeName DontDelete|ReadOnly
+ attributeType SVGAnimationElementImpl::AttributeType DontDelete|ReadOnly
+ calcMode SVGAnimationElementImpl::CalcMode DontDelete|ReadOnly
+ values SVGAnimationElementImpl::Values DontDelete|ReadOnly
+ keyTimes SVGAnimationElementImpl::KeyTimes DontDelete|ReadOnly
+ keySplines SVGAnimationElementImpl::KeySplines DontDelete|ReadOnly
+ from SVGAnimationElementImpl::From DontDelete|ReadOnly
+ to SVGAnimationElementImpl::To DontDelete|ReadOnly
+ by SVGAnimationElementImpl::By DontDelete|ReadOnly
+ begin SVGAnimationElementImpl::Begin DontDelete|ReadOnly
+ dur SVGAnimationElementImpl::Dur DontDelete|ReadOnly
+ end SVGAnimationElementImpl::End DontDelete|ReadOnly
+ min SVGAnimationElementImpl::Min DontDelete|ReadOnly
+ max SVGAnimationElementImpl::Max DontDelete|ReadOnly
+ restart SVGAnimationElementImpl::Restart DontDelete|ReadOnly
+ repeatCount SVGAnimationElementImpl::RepeatCount DontDelete|ReadOnly
+ repeatDur SVGAnimationElementImpl::RepeatDur DontDelete|ReadOnly
+ fill SVGAnimationElementImpl::Fill DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGAnimationElementImplProto::s_hashTable 5
+ getStartTime SVGAnimationElementImpl::GetStartTime DontDelete|Function 0
+ getCurrentTime SVGAnimationElementImpl::GetCurrentTime DontDelete|Function 0
+ getSimpleDuration SVGAnimationElementImpl::GetSimpleDuration DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGAnimationElement",SVGAnimationElementImplProto,SVGAnimationElementImplProtoFunc)
+
+Value SVGAnimationElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case TargetElement:
+ return m_targetElement->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ QString val = value.toString(exec).qstring();
+ switch(token)
+ {
+ case Href:
+ m_href = val;
+ break;
+ case Additive:
+ m_additive = (val == "sum") ? SUM : REPLACE;
+ break;
+ case Accumulate:
+ m_accumulate = (val == "sum") ? ACCUMULATE_SUM : ACCUMULATE_NONE;
+ break;
+ case AttributeName:
+ m_attributeName = val;
+ break;
+ case AttributeType:
+ if(val == "css")
+ m_attributeType = CSS;
+ else if(val == "xml")
+ m_attributeType = XML;
+ else
+ m_attributeType = AUTO;
+ break;
+ case CalcMode: // FIXME: See spec for default values!!!
+ if(val == "discrete")
+ m_calcMode = DISCRETE;
+ else if(val == "linear")
+ m_calcMode = LINEAR;
+ else if(val == "spline")
+ m_calcMode = SPLINE;
+ else if(val == "paced")
+ m_calcMode = PACED;
+ break;
+ case Values:
+ SVGHelperImpl::parseSemicolonSeperatedList(m_values, val);
+ break;
+ case KeyTimes:
+ SVGHelperImpl::parseSemicolonSeperatedList(m_keyTimes, val);
+ break;
+ case KeySplines:
+ SVGHelperImpl::parseSemicolonSeperatedList(m_keySplines, val);
+ break;
+ case From:
+ m_from = val;
+ break;
+ case To:
+ m_to = val;
+ break;
+ case By:
+ m_by = val;
+ break;
+ case Begin:
+ case End:
+ {
+ // Create list
+ SVGStringListImpl *temp = new SVGStringListImpl();
+ temp->ref();
+
+ // Feed data into list
+ SVGHelperImpl::parseSemicolonSeperatedList(temp, val);
+
+ // Parse data
+ for(unsigned int i = 0; i < temp->numberOfItems(); i++)
+ {
+ QString current = temp->getItem(i)->string();
+
+ if(current.startsWith("accessKey"))
+ {
+ // Register keyDownEventListener for the character
+ QString character = current.mid(current.length() - 2, 1);
+
+ kdDebug() << "ACCESSKEY CHARACTER " << character << endl;
+ }
+ else if(current.startsWith("wallclock"))
+ {
+ int firstBrace = current.find("(");
+ int secondBrace = current.find(")");
+
+ QString wallclockValue = current.mid(firstBrace + 1, secondBrace - firstBrace - 2);
+
+ kdDebug() << "WALLCLOCK VALUE " << wallclockValue << endl;
+ }
+ else if(current.contains("."))
+ {
+ int dotPosition = current.find(".");
+
+ QString element = current.mid(0, dotPosition);
+ QString clockValue;
+
+ if(current.contains("begin"))
+ clockValue = current.mid(dotPosition + 6);
+ else if(current.contains("end"))
+ clockValue = current.mid(dotPosition + 4);
+ else if(current.contains("repeat"))
+ clockValue = current.mid(dotPosition + 7);
+ else // DOM2 Event Reference
+ {
+ int plusMinusPosition = -1;
+
+ if(current.contains("+"))
+ plusMinusPosition = current.find("+");
+ else if(current.contains("-"))
+ plusMinusPosition = current.find("-");
+
+ QString event = current.mid(dotPosition + 1, plusMinusPosition - dotPosition - 1);
+
+ clockValue = current.mid(dotPosition + event.length() + 1);
+ kdDebug() << "EVENT " << event << endl;
+ }
+
+ kdDebug() << "ELEMENT " << element << " CLOCKVALUE " << clockValue << endl;
+ }
+ else
+ {
+ if(token == Begin)
+ m_begin = parseClockValue(current);
+ else
+ m_end = parseClockValue(current);
+ }
+ }
+
+ temp->deref();
+
+ break;
+ }
+ case Dur:
+ m_duration = parseClockValue(val);
+ break;
+// case Min:
+// case Max:
+ case Restart:
+ if(val == "whenNotActive")
+ m_restart = WHENNOTACTIVE;
+ else if(val == "never")
+ m_restart = NEVER;
+ else
+ m_restart = ALWAYS;
+ break;
+ case RepeatCount:
+ m_repeatCount = val;
+ break;
+ case RepeatDur:
+ m_repeatDur = val;
+ break;
+ case Fill:
+ m_fill = (val == "freeze") ? FREEZE : REMOVE;
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGAnimationElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &)
+{
+ KSVG_CHECK_THIS(SVGAnimationElementImpl)
+
+ switch(id)
+ {
+ case SVGAnimationElementImpl::GetStartTime:
+ return Number(obj->getStartTime());
+ case SVGAnimationElementImpl::GetCurrentTime:
+ return Number(obj->getCurrentTime());
+ case SVGAnimationElementImpl::GetSimpleDuration:
+ return Number(obj->getSimpleDuration());
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+void SVGAnimationElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: Default value is "replace"
+ if(KSVG_TOKEN_NOT_PARSED(Additive))
+ KSVG_SET_ALT_ATTRIBUTE(Additive, "replace")
+
+ // Spec: Default value is "none"
+ if(KSVG_TOKEN_NOT_PARSED(Accumulate))
+ KSVG_SET_ALT_ATTRIBUTE(Accumulate, "none")
+
+ // Spec: Default value is "always"
+ if(KSVG_TOKEN_NOT_PARSED(Restart))
+ KSVG_SET_ALT_ATTRIBUTE(Restart, "always")
+}
+
+void SVGAnimationElementImpl::setTargetElement(SVGElementImpl *target)
+{
+ if(m_targetElement)
+ m_targetElement->deref();
+
+ m_targetElement = target;
+ m_targetElement->ref();
+}
+
+void SVGAnimationElementImpl::applyAttribute(const QString &name, const QString &value)
+{
+ SVGElementImpl *target = targetElement();
+ if(!target)
+ {
+ kdDebug() << k_funcinfo << " name: " << name << " value: " << value << " NO TARGET ELEMENT!" << endl;
+ return;
+ }
+
+ // The only two cases I can imagine, where combining is needed (Niko)
+ bool combine = (name == "style" || name == "transform");
+
+ if(!combine)
+ target->setAttributeInternal(name, value);
+ else
+ {
+ kdDebug() << "TODO COMBINE: " << value << " NAME " << name << endl;
+ }
+}
+
+double SVGAnimationElementImpl::getStartTime() const
+{
+ return m_begin;
+}
+
+double SVGAnimationElementImpl::getCurrentTime() const
+{
+ return 0.0;
+}
+
+double SVGAnimationElementImpl::getSimpleDuration() const
+{
+ return m_duration;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGAnimationElementImpl.h b/ksvg/impl/SVGAnimationElementImpl.h
new file mode 100644
index 00000000..9fd9446e
--- /dev/null
+++ b/ksvg/impl/SVGAnimationElementImpl.h
@@ -0,0 +1,149 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAnimationElementImpl_H
+#define SVGAnimationElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+enum EFillMode
+{
+ REMOVE,
+ FREEZE
+};
+
+enum EAdditiveMode
+{
+ REPLACE,
+ SUM
+};
+
+enum EAccumulateMode
+{
+ ACCUMULATE_NONE,
+ ACCUMULATE_SUM
+};
+
+enum ECalcMode
+{
+ DISCRETE,
+ LINEAR,
+ PACED,
+ SPLINE
+};
+
+enum ERestart
+{
+ ALWAYS,
+ WHENNOTACTIVE,
+ NEVER
+};
+
+enum EAttributeType
+{
+ CSS,
+ XML,
+ AUTO
+};
+
+class SVGAnimationElementImpl : public SVGElementImpl,
+ public SVGTestsImpl,
+ public SVGExternalResourcesRequiredImpl
+{
+public:
+ SVGAnimationElementImpl(DOM::ElementImpl *);
+ virtual ~SVGAnimationElementImpl();
+
+ SVGElementImpl *targetElement() const;
+ void setTargetElement(SVGElementImpl *target);
+
+ void applyAttribute(const QString &name, const QString &value);
+
+ virtual void handleTimerEvent() { } //= 0;
+ virtual void setAttributes();
+
+ double getStartTime() const;
+ double getCurrentTime() const;
+ double getSimpleDuration() const;
+
+ QString getRepeatCount() const { return m_repeatCount; }
+ QString getRepeatDuration() const { return m_repeatDur; }
+
+ QString getAttributeName() const { return m_attributeName; }
+ QString getFrom() const { return m_from; }
+ QString getTo() const { return m_to; }
+ QString getBy() const { return m_by; }
+
+protected:
+ double parseClockValue(const QString &data) const;
+
+ bool m_connected;
+ EFillMode m_fill : 1;
+ EAdditiveMode m_additive : 1;
+ EAccumulateMode m_accumulate : 1;
+ ECalcMode m_calcMode : 2;
+ ERestart m_restart : 2;
+ EAttributeType m_attributeType : 2;
+ SVGElementImpl *m_targetElement;
+
+ QString m_href;
+ QString m_attributeName;
+ QString m_from, m_to, m_by;
+
+ double m_begin, m_end, m_duration;
+
+ QString m_repeatCount, m_repeatDur;
+
+ SVGStringListImpl *m_values, *m_keyTimes, *m_keySplines;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ TargetElement,
+ Href, Additive, Accumulate, AttributeName, AttributeType,
+ CalcMode, Values, KeyTimes, KeySplines, From, To, By,
+ Begin, Dur, End, Min, Max, Restart, RepeatCount, RepeatDur, Fill,
+ // Functions
+ GetStartTime, GetCurrentTime, GetSimpleDuration
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGAnimationElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGAnimationElementImplProtoFunc, SVGAnimationElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGBBoxTarget.cc b/ksvg/impl/SVGBBoxTarget.cc
new file mode 100644
index 00000000..fcef164e
--- /dev/null
+++ b/ksvg/impl/SVGBBoxTarget.cc
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <dom/dom_misc.h>
+
+#include "SVGShapeImpl.h"
+#include "SVGBBoxTarget.h"
+
+using namespace KSVG;
+
+SVGBBoxTarget::SVGBBoxTarget()
+{
+ m_target = 0;
+}
+
+SVGBBoxTarget::~SVGBBoxTarget()
+{
+ if(m_target)
+ dynamic_cast<DOM::DomShared *>(m_target)->deref();
+}
+
+SVGShapeImpl *SVGBBoxTarget::getBBoxTarget() const
+{
+ return m_target;
+}
+
+void SVGBBoxTarget::setBBoxTarget(SVGShapeImpl *target)
+{
+ if(m_target)
+ dynamic_cast<DOM::DomShared *>(m_target)->deref();
+
+ m_target = target;
+
+ if(m_target)
+ dynamic_cast<DOM::DomShared *>(m_target)->ref();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGBBoxTarget.h b/ksvg/impl/SVGBBoxTarget.h
new file mode 100644
index 00000000..03de657d
--- /dev/null
+++ b/ksvg/impl/SVGBBoxTarget.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGBBoxTarget_H
+#define SVGBBoxTarget_H
+
+namespace KSVG
+{
+
+class SVGShapeImpl;
+class SVGBBoxTarget
+{
+public:
+ SVGBBoxTarget();
+ virtual ~SVGBBoxTarget();
+
+ SVGShapeImpl *getBBoxTarget() const;
+ void setBBoxTarget(SVGShapeImpl *target);
+
+protected:
+ SVGShapeImpl *m_target;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCSSRuleImpl.cc b/ksvg/impl/SVGCSSRuleImpl.cc
new file mode 100644
index 00000000..991487e3
--- /dev/null
+++ b/ksvg/impl/SVGCSSRuleImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGCSSRuleImpl.h"
+
+using namespace KSVG;
+
+SVGCSSRuleImpl::SVGCSSRuleImpl() : DOM::DomShared()//, css::CSSRule()
+{
+}
+
+SVGCSSRuleImpl::~SVGCSSRuleImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCSSRuleImpl.h b/ksvg/impl/SVGCSSRuleImpl.h
new file mode 100644
index 00000000..03ab4e8b
--- /dev/null
+++ b/ksvg/impl/SVGCSSRuleImpl.h
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGCSSRuleImpl_H
+#define SVGCSSRuleImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGCSSRuleImpl : public DOM::DomShared //, public css::CSSRule
+{
+public:
+ SVGCSSRuleImpl();
+ virtual ~SVGCSSRuleImpl();
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCircleElementImpl.cc b/ksvg/impl/SVGCircleElementImpl.cc
new file mode 100644
index 00000000..b6246d1a
--- /dev/null
+++ b/ksvg/impl/SVGCircleElementImpl.cc
@@ -0,0 +1,178 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include "SVGRectImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGCircleElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+using namespace KSVG;
+
+#include "SVGCircleElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGCircleElementImpl::SVGCircleElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_cx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_cx->ref();
+ m_cx->baseVal()->setValueAsString("-1");
+
+ m_cy = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_cy->ref();
+ m_cy->baseVal()->setValueAsString("-1");
+
+ m_r = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, this);
+ m_r->ref();
+ m_r->baseVal()->setValueAsString("-1");
+}
+
+SVGCircleElementImpl::~SVGCircleElementImpl()
+{
+ if(m_cx)
+ m_cx->deref();
+ if(m_cy)
+ m_cy->deref();
+ if(m_r)
+ m_r->deref();
+}
+
+SVGAnimatedLengthImpl *SVGCircleElementImpl::cx()
+{
+ return m_cx;
+}
+
+SVGAnimatedLengthImpl *SVGCircleElementImpl::cy()
+{
+ return m_cy;
+}
+
+SVGAnimatedLengthImpl *SVGCircleElementImpl::r()
+{
+ return m_r;
+}
+
+/*
+@namespace KSVG
+@begin SVGCircleElementImpl::s_hashTable 5
+ cx SVGCircleElementImpl::Cx DontDelete|ReadOnly
+ cy SVGCircleElementImpl::Cy DontDelete|ReadOnly
+ r SVGCircleElementImpl::R DontDelete|ReadOnly
+@end
+*/
+
+Value SVGCircleElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Cx:
+ if(!attributeMode)
+ return m_cx->cache(exec);
+ else
+ return Number(m_cx->baseVal()->value());
+ case Cy:
+ if(!attributeMode)
+ return m_cy->cache(exec);
+ else
+ return Number(m_cy->baseVal()->value());
+ case R:
+ if(!attributeMode)
+ return m_r->cache(exec);
+ else
+ return Number(m_r->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGCircleElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Cx:
+ cx()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Cy:
+ cy()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case R:
+ r()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(r()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute r of element <circle> is illegal"));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGCircleElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_cx->baseVal()->value() - m_r->baseVal()->value());
+ ret->setY(m_cy->baseVal()->value() - m_r->baseVal()->value());
+ ret->setWidth(m_r->baseVal()->value() * 2.0);
+ ret->setHeight(m_r->baseVal()->value() * 2.0);
+ return ret;
+}
+
+void SVGCircleElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Cx))
+ KSVG_SET_ALT_ATTRIBUTE(Cx, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Cy))
+ KSVG_SET_ALT_ATTRIBUTE(Cy, "0")
+}
+
+void SVGCircleElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createCircle(this);
+ c->insert(m_item);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCircleElementImpl.h b/ksvg/impl/SVGCircleElementImpl.h
new file mode 100644
index 00000000..29e0df3f
--- /dev/null
+++ b/ksvg/impl/SVGCircleElementImpl.h
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGCircleElementImpl_H
+#define SVGCircleElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGAnimatedLengthImpl;
+class SVGCircleElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGCircleElementImpl(DOM::ElementImpl *);
+ virtual ~SVGCircleElementImpl();
+
+ SVGAnimatedLengthImpl *cx();
+ SVGAnimatedLengthImpl *cy();
+ SVGAnimatedLengthImpl *r();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void setAttributes();
+
+ virtual SVGRectImpl *getBBox();
+
+private:
+ SVGAnimatedLengthImpl *m_cx;
+ SVGAnimatedLengthImpl *m_cy;
+ SVGAnimatedLengthImpl *m_r;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Cx, Cy, R
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGCircleElementImpl, "circle")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGClipPathElementImpl.cc b/ksvg/impl/SVGClipPathElementImpl.cc
new file mode 100644
index 00000000..87b4d4ac
--- /dev/null
+++ b/ksvg/impl/SVGClipPathElementImpl.cc
@@ -0,0 +1,104 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGClipPathElement.h"
+#include "SVGClipPathElementImpl.h"
+#include "KSVGCanvas.h"
+#include "SVGDocumentImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+#include "SVGClipPathElementImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGClipPathElementImpl::SVGClipPathElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl(), SVGBBoxTarget()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_clipPathUnits = new SVGAnimatedEnumerationImpl();
+ m_clipPathUnits->ref();
+ m_clipPathUnits->setBaseVal(SVGClipPathElement::SVG_UNIT_TYPE_UNKNOWN);
+}
+
+SVGClipPathElementImpl::~SVGClipPathElementImpl()
+{
+ if(m_clipPathUnits)
+ m_clipPathUnits->deref();
+}
+
+SVGAnimatedEnumerationImpl *SVGClipPathElementImpl::clipPathUnits() const
+{
+ return m_clipPathUnits;
+}
+
+/*
+@namespace KSVG
+@begin SVGClipPathElementImpl::s_hashTable 2
+ clipPathUnits SVGClipPathElementImpl::ClipPathUnits DontDelete|ReadOnly
+@end
+*/
+
+Value SVGClipPathElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ClipPathUnits:
+ return m_clipPathUnits->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGClipPathElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case ClipPathUnits:
+ if(value.toString(exec).qstring() == "objectBoundingBox")
+ m_clipPathUnits->setBaseVal(SVGClipPathElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ else
+ m_clipPathUnits->setBaseVal(SVGClipPathElement::SVG_UNIT_TYPE_USERSPACEONUSE);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGClipPathElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if attribute not specified, use userSpaceOnUse
+ if(KSVG_TOKEN_NOT_PARSED(ClipPathUnits))
+ KSVG_SET_ALT_ATTRIBUTE(ClipPathUnits, "userSpaceOnUse")
+
+ if(!m_item)
+ m_item = ownerDoc()->canvas()->createClipPath(this);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGClipPathElementImpl.h b/ksvg/impl/SVGClipPathElementImpl.h
new file mode 100644
index 00000000..1e1879a9
--- /dev/null
+++ b/ksvg/impl/SVGClipPathElementImpl.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGClipPathElementImpl_H
+#define SVGClipPathElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGBBoxTarget.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedEnumerationImpl;
+class SVGClipPathElementImpl : public SVGContainerImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl,
+ public SVGBBoxTarget
+{
+public:
+ SVGClipPathElementImpl(DOM::ElementImpl *);
+ virtual ~SVGClipPathElementImpl();
+
+ SVGAnimatedEnumerationImpl *clipPathUnits() const;
+
+ virtual void setAttributes();
+
+ virtual bool directRender() { return false; }
+
+private:
+ SVGAnimatedEnumerationImpl *m_clipPathUnits;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ ClipPathUnits
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGClipPathElementImpl, "clipPath")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorImpl.cc b/ksvg/impl/SVGColorImpl.cc
new file mode 100644
index 00000000..a01e1113
--- /dev/null
+++ b/ksvg/impl/SVGColorImpl.cc
@@ -0,0 +1,540 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option); any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstringlist.h>
+
+#include "SVGColor.h"
+
+#include "SVGColorImpl.h"
+#include "SVGNumberImpl.h"
+#include "SVGICCColorImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGNumberListImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGColorProfileElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGColorImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+SVGColorImpl::SVGColorImpl(SVGElementImpl *object) : m_object(object)
+{
+ m_colorType = SVG_COLORTYPE_UNKNOWN;
+ m_iccColor = 0;
+}
+
+SVGColorImpl::SVGColorImpl(const SVGColorImpl &other) : DOM::DomShared()
+{
+ (*this) = other;
+}
+
+SVGColorImpl::~SVGColorImpl()
+{
+ if(m_iccColor)
+ m_iccColor->deref();
+}
+
+SVGColorImpl &SVGColorImpl::operator=(const SVGColorImpl &other)
+{
+ m_colorType = other.m_colorType;
+ m_rgbColor = other.m_rgbColor;
+
+ if(m_iccColor && other.m_iccColor)
+ *m_iccColor = *(other.m_iccColor);
+
+ return *this;
+}
+
+unsigned short SVGColorImpl::colorType() const
+{
+ return m_colorType;
+}
+
+DOM::RGBColor SVGColorImpl::rgbColor() const
+{
+ return m_rgbColor;
+}
+
+SVGICCColorImpl *SVGColorImpl::iccColor() const
+{
+ return m_iccColor;
+}
+
+void SVGColorImpl::setRGBColor(QColor color)
+{
+ m_colorType = SVG_COLORTYPE_RGBCOLOR;
+ m_rgbColor = DOM::RGBColor(color.rgb());
+}
+
+void SVGColorImpl::setRGBColor(int r, int g, int b)
+{
+ m_colorType = SVG_COLORTYPE_RGBCOLOR;
+ m_rgbColor = DOM::RGBColor(QColor(r, g, b).rgb());
+}
+
+void SVGColorImpl::setRGBColor(const DOM::DOMString &rgbColor)
+{
+ if(rgbColor == "aliceblue")
+ setRGBColor(240, 248, 255);
+ else if(rgbColor == "antiquewhite")
+ setRGBColor(250, 235, 215);
+ else if(rgbColor == "aqua")
+ setRGBColor(0, 255, 255);
+ else if(rgbColor == "aquamarine")
+ setRGBColor(127, 255, 212);
+ else if(rgbColor == "azure")
+ setRGBColor(240, 255, 255);
+ else if(rgbColor == "beige")
+ setRGBColor(245, 245, 220);
+ else if(rgbColor == "bisque")
+ setRGBColor(255, 228, 196);
+ else if(rgbColor == "black")
+ setRGBColor(0, 0, 0);
+ else if(rgbColor == "blanchedalmond")
+ setRGBColor(255, 235, 205);
+ else if(rgbColor == "blue")
+ setRGBColor(0, 0, 255);
+ else if(rgbColor == "blueviolet")
+ setRGBColor(138, 43, 226);
+ else if(rgbColor == "brown")
+ setRGBColor(165, 42, 42);
+ else if(rgbColor == "burlywood")
+ setRGBColor(222, 184, 135);
+ else if(rgbColor == "cadetblue")
+ setRGBColor(95, 158, 160);
+ else if(rgbColor == "chartreuse")
+ setRGBColor(127, 255, 0);
+ else if(rgbColor == "chocolate")
+ setRGBColor(210, 105, 30);
+ else if(rgbColor == "coral")
+ setRGBColor(255, 127, 80);
+ else if(rgbColor == "cornflowerblue")
+ setRGBColor(100, 149, 237);
+ else if(rgbColor == "cornsilk")
+ setRGBColor(255, 248, 220);
+ else if(rgbColor == "crimson")
+ setRGBColor(220, 20, 60);
+ else if(rgbColor == "cyan")
+ setRGBColor(0, 255, 255);
+ else if(rgbColor == "darkblue")
+ setRGBColor(0, 0, 139);
+ else if(rgbColor == "darkcyan")
+ setRGBColor(0, 139, 139);
+ else if(rgbColor == "darkgoldenrod")
+ setRGBColor(184, 134, 11);
+ else if(rgbColor == "darkgray")
+ setRGBColor(169, 169, 169);
+ else if(rgbColor == "darkgrey")
+ setRGBColor(169, 169, 169);
+ else if(rgbColor == "darkgreen")
+ setRGBColor(0, 100, 0);
+ else if(rgbColor == "darkkhaki")
+ setRGBColor(189, 183, 107);
+ else if(rgbColor == "darkmagenta")
+ setRGBColor(139, 0, 139);
+ else if(rgbColor == "darkolivegreen")
+ setRGBColor(85, 107, 47);
+ else if(rgbColor == "darkorange")
+ setRGBColor(255, 140, 0);
+ else if(rgbColor == "darkorchid")
+ setRGBColor(153, 50, 204);
+ else if(rgbColor == "darkred")
+ setRGBColor(139, 0, 0);
+ else if(rgbColor == "darksalmon")
+ setRGBColor(233, 150, 122);
+ else if(rgbColor == "darkseagreen")
+ setRGBColor(143, 188, 143);
+ else if(rgbColor == "darkslateblue")
+ setRGBColor(72, 61, 139);
+ else if(rgbColor == "darkslategray")
+ setRGBColor(47, 79, 79);
+ else if(rgbColor == "darkslategrey")
+ setRGBColor(47, 79, 79);
+ else if(rgbColor == "darkturquoise")
+ setRGBColor(0, 206, 209);
+ else if(rgbColor == "darkviolet")
+ setRGBColor(148, 0, 211);
+ else if(rgbColor == "deeppink")
+ setRGBColor(255, 20, 147);
+ else if(rgbColor == "deepskyblue")
+ setRGBColor(0, 191, 255);
+ else if(rgbColor == "dimgray")
+ setRGBColor(105, 105, 105);
+ else if(rgbColor == "dimgrey")
+ setRGBColor(105, 105, 105);
+ else if(rgbColor == "dodgerblue")
+ setRGBColor(30, 144, 255);
+ else if(rgbColor == "firebrick")
+ setRGBColor(178, 34, 34);
+ else if(rgbColor == "floralwhite")
+ setRGBColor(255, 250, 240);
+ else if(rgbColor == "forestgreen")
+ setRGBColor(34, 139, 34);
+ else if(rgbColor == "fuchsia")
+ setRGBColor(255, 0, 255);
+ else if(rgbColor == "gainsboro")
+ setRGBColor(220, 220, 220);
+ else if(rgbColor == "ghostwhite")
+ setRGBColor(248, 248, 255);
+ else if(rgbColor == "gold")
+ setRGBColor(255, 215, 0);
+ else if(rgbColor == "goldenrod")
+ setRGBColor(218, 165, 32);
+ else if(rgbColor == "gray")
+ setRGBColor(128, 128, 128);
+ else if(rgbColor == "grey")
+ setRGBColor(128, 128, 128);
+ else if(rgbColor == "green")
+ setRGBColor(0, 128, 0);
+ else if(rgbColor == "greenyellow")
+ setRGBColor(173, 255, 47);
+ else if(rgbColor == "honeydew")
+ setRGBColor(240, 255, 240);
+ else if(rgbColor == "hotpink")
+ setRGBColor(255, 105, 180);
+ else if(rgbColor == "indianred")
+ setRGBColor(205, 92, 92);
+ else if(rgbColor == "indigo")
+ setRGBColor(75, 0, 130);
+ else if(rgbColor == "ivory")
+ setRGBColor(255, 255, 240);
+ else if(rgbColor == "khaki")
+ setRGBColor(240, 230, 140);
+ else if(rgbColor == "lavender")
+ setRGBColor(230, 230, 250);
+ else if(rgbColor == "lavenderblush")
+ setRGBColor(255, 240, 245);
+ else if(rgbColor == "lawngreen")
+ setRGBColor(124, 252, 0);
+ else if(rgbColor == "lemonchiffon")
+ setRGBColor(255, 250, 205);
+ else if(rgbColor == "lightblue")
+ setRGBColor(173, 216, 230);
+ else if(rgbColor == "lightcoral")
+ setRGBColor(240, 128, 128);
+ else if(rgbColor == "lightcyan")
+ setRGBColor(224, 255, 255);
+ else if(rgbColor == "lightgoldenrodyellow")
+ setRGBColor(250, 250, 210);
+ else if(rgbColor == "lightgray")
+ setRGBColor(211, 211, 211);
+ else if(rgbColor == "lightgrey")
+ setRGBColor(211, 211, 211);
+ else if(rgbColor == "lightgreen")
+ setRGBColor(144, 238, 144);
+ else if(rgbColor == "lightpink")
+ setRGBColor(255, 182, 193);
+ else if(rgbColor == "lightsalmon")
+ setRGBColor(255, 160, 122);
+ else if(rgbColor == "lightseagreen")
+ setRGBColor(32, 178, 170);
+ else if(rgbColor == "lightskyblue")
+ setRGBColor(135, 206, 250);
+ else if(rgbColor == "lightslategray")
+ setRGBColor(119, 136, 153);
+ else if(rgbColor == "lightslategrey")
+ setRGBColor(119, 136, 153);
+ else if(rgbColor == "lightsteelblue")
+ setRGBColor(176, 196, 222);
+ else if(rgbColor == "lightyellow")
+ setRGBColor(255, 255, 224);
+ else if(rgbColor == "lime")
+ setRGBColor(0, 255, 0);
+ else if(rgbColor == "limegreen")
+ setRGBColor(50, 205, 50);
+ else if(rgbColor == "linen")
+ setRGBColor(250, 240, 230);
+ else if(rgbColor == "magenta")
+ setRGBColor(255, 0, 255);
+ else if(rgbColor == "maroon")
+ setRGBColor(128, 0, 0);
+ else if(rgbColor == "mediumaquamarine")
+ setRGBColor(102, 205, 170);
+ else if(rgbColor == "mediumblue")
+ setRGBColor(0, 0, 205);
+ else if(rgbColor == "mediumorchid")
+ setRGBColor(186, 85, 211);
+ else if(rgbColor == "mediumpurple")
+ setRGBColor(147, 112, 219);
+ else if(rgbColor == "mediumseagreen")
+ setRGBColor(60, 179, 113);
+ else if(rgbColor == "mediumslateblue")
+ setRGBColor(123, 104, 238);
+ else if(rgbColor == "mediumspringgreen")
+ setRGBColor(0, 250, 154);
+ else if(rgbColor == "mediumturquoise")
+ setRGBColor(72, 209, 204);
+ else if(rgbColor == "mediumvioletred")
+ setRGBColor(199, 21, 133);
+ else if(rgbColor == "midnightblue")
+ setRGBColor(25, 25, 112);
+ else if(rgbColor == "mintcream")
+ setRGBColor(245, 255, 250);
+ else if(rgbColor == "mistyrose")
+ setRGBColor(255, 228, 225);
+ else if(rgbColor == "moccasin")
+ setRGBColor(255, 228, 181);
+ else if(rgbColor == "navajowhite")
+ setRGBColor(255, 222, 173);
+ else if(rgbColor == "navy")
+ setRGBColor(0, 0, 128);
+ else if(rgbColor == "oldlace")
+ setRGBColor(253, 245, 230);
+ else if(rgbColor == "olive")
+ setRGBColor(128, 128, 0);
+ else if(rgbColor == "olivedrab")
+ setRGBColor(107, 142, 35);
+ else if(rgbColor == "orange")
+ setRGBColor(255, 165, 0);
+ else if(rgbColor == "orangered")
+ setRGBColor(255, 69, 0);
+ else if(rgbColor == "orchid")
+ setRGBColor(218, 112, 214);
+ else if(rgbColor == "palegoldenrod")
+ setRGBColor(238, 232, 170);
+ else if(rgbColor == "palegreen")
+ setRGBColor(152, 251, 152);
+ else if(rgbColor == "paleturquoise")
+ setRGBColor(175, 238, 238);
+ else if(rgbColor == "palevioletred")
+ setRGBColor(219, 112, 147);
+ else if(rgbColor == "papayawhip")
+ setRGBColor(255, 239, 213);
+ else if(rgbColor == "peachpuff")
+ setRGBColor(255, 218, 185);
+ else if(rgbColor == "peru")
+ setRGBColor(205, 133, 63);
+ else if(rgbColor == "pink")
+ setRGBColor(255, 192, 203);
+ else if(rgbColor == "plum")
+ setRGBColor(221, 160, 221);
+ else if(rgbColor == "powderblue")
+ setRGBColor(176, 224, 230);
+ else if(rgbColor == "purple")
+ setRGBColor(128, 0, 128);
+ else if(rgbColor == "red")
+ setRGBColor(255, 0, 0);
+ else if(rgbColor == "rosybrown")
+ setRGBColor(188, 143, 143);
+ else if(rgbColor == "royalblue")
+ setRGBColor(65, 105, 225);
+ else if(rgbColor == "saddlebrown")
+ setRGBColor(139, 69, 19);
+ else if(rgbColor == "salmon")
+ setRGBColor(250, 128, 114);
+ else if(rgbColor == "sandybrown")
+ setRGBColor(244, 164, 96);
+ else if(rgbColor == "seagreen")
+ setRGBColor(46, 139, 87);
+ else if(rgbColor == "seashell")
+ setRGBColor(255, 245, 238);
+ else if(rgbColor == "sienna")
+ setRGBColor(160, 82, 45);
+ else if(rgbColor == "silver")
+ setRGBColor(192, 192, 192);
+ else if(rgbColor == "skyblue")
+ setRGBColor(135, 206, 235);
+ else if(rgbColor == "slateblue")
+ setRGBColor(106, 90, 205);
+ else if(rgbColor == "slategray")
+ setRGBColor(112, 128, 144);
+ else if(rgbColor == "slategrey")
+ setRGBColor(112, 128, 144);
+ else if(rgbColor == "snow")
+ setRGBColor(255, 250, 250);
+ else if(rgbColor == "springgreen")
+ setRGBColor(0, 255, 127);
+ else if(rgbColor == "steelblue")
+ setRGBColor(70, 130, 180);
+ else if(rgbColor == "tan")
+ setRGBColor(210, 180, 140);
+ else if(rgbColor == "teal")
+ setRGBColor(0, 128, 128);
+ else if(rgbColor == "thistle")
+ setRGBColor(216, 191, 216);
+ else if(rgbColor == "tomato")
+ setRGBColor(255, 99, 71);
+ else if(rgbColor == "turquoise")
+ setRGBColor(64, 224, 208);
+ else if(rgbColor == "violet")
+ setRGBColor(238, 130, 238);
+ else if(rgbColor == "wheat")
+ setRGBColor(245, 222, 179);
+ else if(rgbColor == "white")
+ setRGBColor(255, 255, 255);
+ else if(rgbColor == "whitesmoke")
+ setRGBColor(245, 245, 245);
+ else if(rgbColor == "yellow")
+ setRGBColor(255, 255, 0);
+ else if(rgbColor == "yellowgreen")
+ setRGBColor(154, 205, 50);
+}
+
+void SVGColorImpl::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ QColor color;
+
+ QString content = iccColor.string().right(iccColor.string().length() - 10);
+ QString iccTarget = content.mid(0, content.find(','));
+
+ QStringList colors = QStringList::split(',', content);
+ QString r = colors[1];
+ QString g = colors[2];
+ QString b = colors[3].left(colors[3].length() - 1);
+
+ iccTarget = SVGURIReferenceImpl::getTarget(iccTarget);
+
+ SVGColorProfileElementImpl *handle = 0;
+ if(m_object)
+ handle = static_cast<SVGColorProfileElementImpl *>(dynamic_cast<SVGElementImpl *>(m_object)->ownerDoc()->rootElement()->getElementById(iccTarget));
+
+ if(iccTarget.isEmpty() || !handle)
+ {
+ color.setNamedColor(rgbColor.string().stripWhiteSpace());
+ setRGBColor(color);
+ }
+ else
+ {
+ color.setRgb(handle->correctPixel(r.toFloat() * 257, g.toFloat() * 257, b.toFloat() * 257));
+ setRGBColor(color);
+
+ m_colorType = SVG_COLORTYPE_RGBCOLOR_ICCCOLOR;
+
+ if(!m_iccColor)
+ {
+ m_iccColor = new SVGICCColorImpl();
+ m_iccColor->ref();
+ }
+
+ m_iccColor->setColorProfile(DOM::DOMString(content));
+
+ SVGNumberImpl *rnumber = SVGSVGElementImpl::createSVGNumber();
+ rnumber->setValue(r.toFloat());
+
+ SVGNumberImpl *gnumber = SVGSVGElementImpl::createSVGNumber();
+ gnumber->setValue(g.toFloat());
+
+ SVGNumberImpl *bnumber = SVGSVGElementImpl::createSVGNumber();
+ bnumber->setValue(b.toFloat());
+
+ m_iccColor->colors()->clear();
+ m_iccColor->colors()->appendItem(bnumber);
+ m_iccColor->colors()->appendItem(gnumber);
+ m_iccColor->colors()->appendItem(rnumber);
+ }
+}
+
+void SVGColorImpl::setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ m_colorType = colorType;
+
+ if(m_colorType == SVG_COLORTYPE_UNKNOWN || m_colorType == SVG_COLORTYPE_CURRENTCOLOR)
+ return;
+
+ setRGBColorICCColor(rgbColor, iccColor);
+}
+
+// Ecma stuff
+/*
+@namespace KSVG
+@begin SVGColorImpl::s_hashTable 5
+ colorType SVGColorImpl::ColorType DontDelete|ReadOnly
+ RGBColor SVGColorImpl::RGBColor DontDelete|ReadOnly
+ ICCColor SVGColorImpl::ICCColor DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGColorImplProto::s_hashTable 5
+ setRGBColor SVGColorImpl::SetRGBColor DontDelete|Function 1
+ setRGBColorICCColor SVGColorImpl::SetRGBColorICCColor DontDelete|Function 2
+ setColor SVGColorImpl::SetColor DontDelete|Function 3
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGColor", SVGColorImplProto, SVGColorImplProtoFunc)
+
+Value SVGColorImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ColorType:
+ return Number(colorType());
+#ifdef __GNUC__
+#warning FIXME bridge stuff
+#endif
+ case RGBColor:
+ return Undefined();
+ case ICCColor:
+ return m_iccColor->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGColorImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGColorImpl)
+
+ switch(id)
+ {
+ case SVGColorImpl::SetRGBColor:
+ obj->setRGBColor(args[0].toString(exec).string());
+ break;
+ case SVGColorImpl::SetRGBColorICCColor:
+ obj->setRGBColorICCColor(args[0].toString(exec).string(), args[1].toString(exec).string());
+ break;
+ case SVGColorImpl::SetColor:
+ obj->setColor(static_cast<unsigned short>(args[0].toNumber(exec)), args[1].toString(exec).string(), args[2].toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+/*
+@namespace KSVG
+@begin SVGColorImplConstructor::s_hashTable 5
+ SVG_COLORTYPE_UNKNOWN KSVG::SVG_COLORTYPE_UNKNOWN DontDelete|ReadOnly
+ SVG_COLORTYPE_RGBCOLOR KSVG::SVG_COLORTYPE_RGBCOLOR DontDelete|ReadOnly
+ SVG_COLORTYPE_RGBCOLOR_ICCCOLOR KSVG::SVG_COLORTYPE_RGBCOLOR_ICCCOLOR DontDelete|ReadOnly
+ SVG_COLORTYPE_CURRENTCOLOR KSVG::SVG_COLORTYPE_CURRENTCOLOR DontDelete|ReadOnly
+@end
+*/
+
+Value SVGColorImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGColorImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGColorImplConstructor>(exec, "[[svgcolor.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorImpl.h b/ksvg/impl/SVGColorImpl.h
new file mode 100644
index 00000000..d49c6f82
--- /dev/null
+++ b/ksvg/impl/SVGColorImpl.h
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColorImpl_H
+#define SVGColorImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/css_value.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+class SVGElementImpl;
+class SVGICCColorImpl;
+class SVGColorImpl : public DOM::DomShared
+{
+public:
+ SVGColorImpl(SVGElementImpl *object);
+ SVGColorImpl(const SVGColorImpl &);
+ virtual ~SVGColorImpl();
+
+ SVGColorImpl &operator=(const SVGColorImpl &);
+
+ unsigned short colorType() const;
+
+ DOM::RGBColor rgbColor() const;
+ SVGICCColorImpl *iccColor() const;
+
+ virtual void setRGBColor(const DOM::DOMString &rgbColor);
+ virtual void setRGBColor(int r, int g, int b);
+ virtual void setRGBColor(QColor color);
+ virtual void setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+ virtual void setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+
+private:
+ unsigned short m_colorType;
+ DOM::RGBColor m_rgbColor;
+ SVGICCColorImpl *m_iccColor;
+ SVGElementImpl *m_object;
+
+public:
+ KSVG_BASECLASS_GET
+
+ enum
+ {
+ // Properties
+ ColorType, RGBColor, ICCColor,
+ // Functions
+ SetRGBColor, SetRGBColorICCColor, SetColor
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGColorImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGColorImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGColorImplConstructor(KJS::ExecState *exec);
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGColorImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGColorImplProtoFunc, SVGColorImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorProfileElementImpl.cc b/ksvg/impl/SVGColorProfileElementImpl.cc
new file mode 100644
index 00000000..f898188b
--- /dev/null
+++ b/ksvg/impl/SVGColorProfileElementImpl.cc
@@ -0,0 +1,271 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kurl.h>
+#include <kdebug.h>
+#include <kio/netaccess.h>
+
+#include <qimage.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+#include "SVGRenderingIntent.h"
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGColorProfileElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGColorProfileElementImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGColorProfileElementImpl::SVGColorProfileElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_loaded = false;
+
+ // Spec: Default value 'auto', if not overwritten later
+ m_renderingIntent = RENDERING_INTENT_AUTO;
+}
+
+SVGColorProfileElementImpl::~SVGColorProfileElementImpl()
+{
+ if(m_loaded)
+ closeColorProfile();
+}
+
+/*
+@namespace KSVG
+@begin SVGColorProfileElementImpl::s_hashTable 5
+ name SVGColorProfileElementImpl::Name DontDelete|ReadOnly
+ href SVGColorProfileElementImpl::Href DontDelete|ReadOnly
+ rendering-intent SVGColorProfileElementImpl::RenderingIntent DontDelete|ReadOnly
+@end
+*/
+
+Value SVGColorProfileElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Name:
+ return String(m_name);
+ case Href:
+ return href()->cache(exec);
+ case RenderingIntent:
+ return Number(m_renderingIntent);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGColorProfileElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Name:
+ m_name = value.toString(exec).string();
+ ownerDoc()->rootElement()->addToIdMap(m_name.string(), this);
+ break;
+ case Href:
+ href()->setBaseVal(value.toString(exec).string());
+ break;
+ case RenderingIntent:
+ {
+ QString compare = value.toString(exec).qstring().lower();
+
+ if(compare == "perceptual")
+ m_renderingIntent = RENDERING_INTENT_PERCEPTUAL;
+ else if(compare == "relative-colorimetric")
+ m_renderingIntent = RENDERING_INTENT_RELATIVE_COLORIMETRIC;
+ else if(compare == "saturation")
+ m_renderingIntent = RENDERING_INTENT_SATURATION;
+ else if(compare == "absolute-colorimetric")
+ m_renderingIntent = RENDERING_INTENT_ABSOLUTE_COLORIMETRIC;
+ else
+ m_renderingIntent = RENDERING_INTENT_AUTO;
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGColorProfileElementImpl::setLocal(const DOM::DOMString &local)
+{
+ m_local = local;
+}
+
+DOM::DOMString SVGColorProfileElementImpl::local() const
+{
+ return m_local;
+}
+
+void SVGColorProfileElementImpl::setName(const DOM::DOMString &name)
+{
+ m_name = name;
+}
+
+DOM::DOMString SVGColorProfileElementImpl::name() const
+{
+ return m_name;
+}
+
+void SVGColorProfileElementImpl::setRenderingIntent(unsigned short renderingIntent)
+{
+ m_renderingIntent = renderingIntent;
+}
+
+unsigned short SVGColorProfileElementImpl::renderingIntent() const
+{
+ return m_renderingIntent;
+}
+
+bool SVGColorProfileElementImpl::canLoad()
+{
+ QString open;
+ bool temp;
+ return canLoad(false, temp, open, true);
+}
+
+bool SVGColorProfileElementImpl::canLoad(bool remote, bool &tempFile, QString &open, bool verbose)
+{
+ KURL file;
+
+ if(!KURL::isRelativeURL(href()->baseVal().string()))
+ file = KURL(href()->baseVal().string());
+ else
+ file = KURL(ownerDoc()->baseUrl(), href()->baseVal().string());
+
+ if(file.path().isEmpty())
+ {
+ if(verbose)
+ kdDebug() << "Couldn't load color profile " << file.path() << "!" << endl;
+
+ return false;
+ }
+
+ if(file.isLocalFile())
+ {
+ open = file.path();
+
+ if(!QFile::exists(open))
+ {
+ if(verbose)
+ kdDebug() << "Couldn't load color profile " << file.path() << "! It does not exist." << endl;
+
+ return false;
+ }
+ }
+ else
+ {
+ if(remote)
+ {
+ if(KIO::NetAccess::download(file, open, 0))
+ tempFile = true;
+ }
+ }
+
+ return true;
+}
+
+bool SVGColorProfileElementImpl::loadColorProfile()
+{
+ QString open;
+ bool tempFile = false;
+
+ if(!canLoad(true, tempFile, open, false))
+ return false;
+
+ m_hInput = cmsOpenProfileFromFile(open.latin1(), "r");
+ m_hOutput = cmsCreate_sRGBProfile();
+
+ unsigned int dwIn = BYTES_SH(2) | CHANNELS_SH(_cmsChannelsOf(m_inputColorSpace));
+ unsigned int dwOut = BYTES_SH(2) | CHANNELS_SH(_cmsChannelsOf(m_outputColorSpace));
+
+ if(m_renderingIntent != RENDERING_INTENT_AUTO)
+ m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, m_renderingIntent - 2, cmsFLAGS_NOTPRECALC);
+ else
+ m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, cmsTakeRenderingIntent(m_hInput), cmsFLAGS_NOTPRECALC);
+
+ m_inputColorSpace = cmsGetColorSpace(m_hInput);
+ m_outputColorSpace = cmsGetColorSpace(m_hOutput);
+ m_loaded = true;
+
+ if(tempFile)
+ KIO::NetAccess::removeTempFile(open);
+
+ return true;
+}
+
+void SVGColorProfileElementImpl::closeColorProfile()
+{
+ cmsDeleteTransform(m_hTrans);
+ cmsCloseProfile(m_hInput);
+}
+
+QRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b)
+{
+ if(!m_loaded)
+ {
+ if(!loadColorProfile())
+ return qRgb(0, 0, 0);
+ }
+
+ unsigned short input[MAXCHANNELS], output[MAXCHANNELS];
+
+ input[0] = ((unsigned int) r) * 257;
+ input[1] = ((unsigned int) g) * 257;
+ input[2] = ((unsigned int) b) * 257;
+
+ cmsDoTransform(m_hTrans, input, output, 1);
+
+ if(m_outputColorSpace == icSigRgbData)
+ return qRgb(output[0] / 257, output[1] / 257, output[2] / 257);
+
+ return qRgb(0, 0, 0);
+}
+
+QImage *SVGColorProfileElementImpl::correctImage(QImage *input)
+{
+ if(!canLoad())
+ return input;
+
+ for(int y = 0; y < input->height(); y++)
+ {
+ for(int x = 0; x < input->width(); x++)
+ {
+ QRgb pixel = input->pixel(x, y);
+ input->setPixel(x, y, correctPixel(qRed(pixel), qGreen(pixel), qBlue(pixel)));
+ }
+ }
+
+ return input;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorProfileElementImpl.h b/ksvg/impl/SVGColorProfileElementImpl.h
new file mode 100644
index 00000000..2f735f03
--- /dev/null
+++ b/ksvg/impl/SVGColorProfileElementImpl.h
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColorProfileElementImpl_H
+#define SVGColorProfileElementImpl_H
+
+#include <dom/dom_string.h>
+
+// Provided by configure checks....
+#include <config.h>
+#undef QT_VERSION // Needed for 1.08 *grml*
+#include LCMS_HEADER
+
+#include "SVGElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+
+#include "ksvg_lookup.h"
+
+class QImage;
+
+namespace KSVG
+{
+
+class SVGColorProfileElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl
+{
+public:
+ SVGColorProfileElementImpl(DOM::ElementImpl *);
+ virtual ~SVGColorProfileElementImpl();
+
+ void setLocal(const DOM::DOMString &local);
+ DOM::DOMString local() const;
+
+ void setName(const DOM::DOMString &name);
+ DOM::DOMString name() const;
+
+ void setRenderingIntent(unsigned short renderingIntent);
+ unsigned short renderingIntent() const;
+
+ QImage *correctImage(QImage *input);
+ QRgb correctPixel(float r, float g, float b);
+
+private:
+ bool loadColorProfile();
+ void closeColorProfile();
+
+ bool canLoad();
+ bool canLoad(bool remote, bool &tempFile, QString &open, bool verbose);
+
+ DOM::DOMString m_local;
+ DOM::DOMString m_name;
+ unsigned short m_renderingIntent;
+
+ bool m_loaded;
+
+ cmsHPROFILE m_hInput, m_hOutput;
+ cmsHTRANSFORM m_hTrans;
+ int m_intent;
+
+ icColorSpaceSignature m_inputColorSpace, m_outputColorSpace;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Name, Href, RenderingIntent
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGColorProfileElementImpl, "color-profile")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorProfileRuleImpl.cc b/ksvg/impl/SVGColorProfileRuleImpl.cc
new file mode 100644
index 00000000..3cfca560
--- /dev/null
+++ b/ksvg/impl/SVGColorProfileRuleImpl.cc
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGColorProfileRuleImpl.h"
+
+using namespace KSVG;
+
+SVGColorProfileRuleImpl::SVGColorProfileRuleImpl() : SVGCSSRuleImpl()
+{
+}
+
+SVGColorProfileRuleImpl::~SVGColorProfileRuleImpl()
+{
+}
+
+void SVGColorProfileRuleImpl::setSrc(const DOM::DOMString &src)
+{
+ m_src = src;
+}
+
+DOM::DOMString SVGColorProfileRuleImpl::src() const
+{
+ return m_src;
+}
+
+void SVGColorProfileRuleImpl::setName(const DOM::DOMString &name)
+{
+ m_name = name;
+}
+
+DOM::DOMString SVGColorProfileRuleImpl::name() const
+{
+ return m_name;
+}
+
+void SVGColorProfileRuleImpl::setRenderingIntent(unsigned short renderingIntent)
+{
+ m_renderingIntent = renderingIntent;
+}
+
+unsigned short SVGColorProfileRuleImpl::renderingIntent() const
+{
+ return m_renderingIntent;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGColorProfileRuleImpl.h b/ksvg/impl/SVGColorProfileRuleImpl.h
new file mode 100644
index 00000000..976a76a8
--- /dev/null
+++ b/ksvg/impl/SVGColorProfileRuleImpl.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGColorProfileRuleImpl_H
+#define SVGColorProfileRuleImpl_H
+
+#include <dom/dom_string.h>
+
+#include "SVGCSSRuleImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGColorProfileRuleImpl : public SVGCSSRuleImpl
+{
+public:
+ SVGColorProfileRuleImpl();
+ virtual ~SVGColorProfileRuleImpl();
+
+ void setSrc(const DOM::DOMString &src);
+ DOM::DOMString src() const;
+
+ void setName(const DOM::DOMString &name);
+ DOM::DOMString name() const;
+
+ void setRenderingIntent(unsigned short renderingIntent);
+ unsigned short renderingIntent() const;
+
+private:
+ DOM::DOMString m_src;
+ DOM::DOMString m_name;
+ unsigned short m_renderingIntent;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGComponentTransferFunctionElementImpl.cc b/ksvg/impl/SVGComponentTransferFunctionElementImpl.cc
new file mode 100644
index 00000000..0db14aae
--- /dev/null
+++ b/ksvg/impl/SVGComponentTransferFunctionElementImpl.cc
@@ -0,0 +1,105 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedNumberListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGComponentTransferFunctionElementImpl.h"
+
+using namespace KSVG;
+
+SVGComponentTransferFunctionElementImpl::SVGComponentTransferFunctionElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_type = new SVGAnimatedEnumerationImpl();
+ m_type->ref();
+
+ m_tableValues = new SVGAnimatedNumberListImpl();
+ m_tableValues->ref();
+
+ m_slope = new SVGAnimatedNumberImpl();
+ m_slope->ref();
+
+ m_intercept = new SVGAnimatedNumberImpl();
+ m_intercept->ref();
+
+ m_amplitude = new SVGAnimatedNumberImpl();
+ m_amplitude->ref();
+
+ m_exponent = new SVGAnimatedNumberImpl();
+ m_exponent->ref();
+
+ m_offset = new SVGAnimatedNumberImpl();
+ m_offset->ref();
+}
+
+SVGComponentTransferFunctionElementImpl::~SVGComponentTransferFunctionElementImpl()
+{
+ if(m_type)
+ m_type->deref();
+ if(m_tableValues)
+ m_tableValues->deref();
+ if(m_slope)
+ m_slope->deref();
+ if(m_intercept)
+ m_intercept->deref();
+ if(m_amplitude)
+ m_amplitude->deref();
+ if(m_exponent)
+ m_exponent->deref();
+ if(m_offset)
+ m_offset->deref();
+}
+
+SVGAnimatedEnumerationImpl *SVGComponentTransferFunctionElementImpl::type() const
+{
+ return m_type;
+}
+
+SVGAnimatedNumberListImpl *SVGComponentTransferFunctionElementImpl::tableValues() const
+{
+ return m_tableValues;
+}
+
+SVGAnimatedNumberImpl *SVGComponentTransferFunctionElementImpl::slope() const
+{
+ return m_slope;
+}
+
+SVGAnimatedNumberImpl *SVGComponentTransferFunctionElementImpl::intercept() const
+{
+ return m_intercept;
+}
+
+SVGAnimatedNumberImpl *SVGComponentTransferFunctionElementImpl::amplitude() const
+{
+ return m_amplitude;
+}
+
+SVGAnimatedNumberImpl *SVGComponentTransferFunctionElementImpl::exponent() const
+{
+ return m_exponent;
+}
+
+SVGAnimatedNumberImpl *SVGComponentTransferFunctionElementImpl::offset() const
+{
+ return m_offset;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGComponentTransferFunctionElementImpl.h b/ksvg/impl/SVGComponentTransferFunctionElementImpl.h
new file mode 100644
index 00000000..e277d462
--- /dev/null
+++ b/ksvg/impl/SVGComponentTransferFunctionElementImpl.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGComponentTransferFunctionElementImpl_H
+#define SVGComponentTransferFunctionElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGAnimatedNumberListImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGComponentTransferFunctionElementImpl : public SVGElementImpl
+{
+public:
+ SVGComponentTransferFunctionElementImpl(DOM::ElementImpl *);
+ virtual ~SVGComponentTransferFunctionElementImpl();
+
+ SVGAnimatedEnumerationImpl *type() const;
+ SVGAnimatedNumberListImpl *tableValues() const;
+ SVGAnimatedNumberImpl *slope() const;
+ SVGAnimatedNumberImpl *intercept() const;
+ SVGAnimatedNumberImpl *amplitude() const;
+ SVGAnimatedNumberImpl *exponent() const;
+ SVGAnimatedNumberImpl *offset() const;
+
+private:
+ SVGAnimatedEnumerationImpl *m_type;
+ SVGAnimatedNumberListImpl *m_tableValues;
+ SVGAnimatedNumberImpl *m_slope;
+ SVGAnimatedNumberImpl *m_intercept;
+ SVGAnimatedNumberImpl *m_amplitude;
+ SVGAnimatedNumberImpl *m_exponent;
+ SVGAnimatedNumberImpl *m_offset;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGContainerImpl.cc b/ksvg/impl/SVGContainerImpl.cc
new file mode 100644
index 00000000..88fb87a8
--- /dev/null
+++ b/ksvg/impl/SVGContainerImpl.cc
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGRectImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "kdebug.h"
+
+using namespace KSVG;
+
+SVGContainerImpl::SVGContainerImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl)
+{
+}
+
+SVGContainerImpl::~SVGContainerImpl()
+{
+}
+
+SVGRectImpl *SVGContainerImpl::getBBox()
+{
+ // just get the union of the children bboxes
+ QRect rect;
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(elem);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(elem);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(elem);
+
+ bool ok = tests ? tests->ok() : true;
+
+ if(shape && style && ok && style->getVisible() && style->getDisplay())
+ {
+ SVGRectImpl *current = shape->getBBox();
+ rect = rect.unite(current->qrect());
+ current->deref();
+ }
+ }
+
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ *ret = rect;
+ return ret;
+}
+
+void SVGContainerImpl::createItem(KSVGCanvas *c)
+{
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle());
+ if(elem)
+ elem->createItem(c);
+ }
+}
+
+void SVGContainerImpl::removeItem(KSVGCanvas *c)
+{
+ SVGShapeImpl::removeItem(c);
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle());
+ if(elem)
+ elem->removeItem(c);
+ }
+}
+
+void SVGContainerImpl::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ SVGShapeImpl::update(reason, param1, param2);
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+ if(shape)
+ shape->update(reason, param1, param2);
+ }
+}
+
+void SVGContainerImpl::invalidate(KSVGCanvas *c, bool recalc)
+{
+ SVGShapeImpl::invalidate(c, recalc);
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+ if(shape)
+ shape->invalidate(c, recalc);
+ }
+}
+
+void SVGContainerImpl::setReferenced(bool referenced)
+{
+ SVGShapeImpl::setReferenced(referenced);
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+ if(shape)
+ shape->setReferenced(referenced);
+ }
+}
+
+void SVGContainerImpl::draw()
+{
+ SVGShapeImpl::draw();
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+ if(shape)
+ shape->draw();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGContainerImpl.h b/ksvg/impl/SVGContainerImpl.h
new file mode 100644
index 00000000..353a6154
--- /dev/null
+++ b/ksvg/impl/SVGContainerImpl.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGContainerImpl_H
+#define SVGContainerImpl_H
+
+#include "SVGShapeImpl.h"
+
+namespace KSVG
+{
+enum CanvasItemUpdate;
+class KSVGCanvas;
+
+class SVGContainerImpl : public SVGShapeImpl
+{
+public:
+ SVGContainerImpl(DOM::ElementImpl *);
+ virtual ~SVGContainerImpl();
+
+ virtual bool isContainer() const { return true; }
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void removeItem(KSVGCanvas *c);
+
+ virtual void update(CanvasItemUpdate reason, int param1, int param2);
+ virtual void invalidate(KSVGCanvas *c, bool recalc);
+ virtual void setReferenced(bool referenced);
+ virtual void draw();
+
+ virtual SVGRectImpl *getBBox();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCursorElementImpl.cc b/ksvg/impl/SVGCursorElementImpl.cc
new file mode 100644
index 00000000..331f8826
--- /dev/null
+++ b/ksvg/impl/SVGCursorElementImpl.cc
@@ -0,0 +1,104 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGCursorElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+using namespace KSVG;
+
+#include "SVGCursorElementImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGCursorElementImpl::SVGCursorElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGExternalResourcesRequiredImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl();
+ m_y->ref();
+}
+
+SVGCursorElementImpl::~SVGCursorElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+}
+
+SVGAnimatedLengthImpl *SVGCursorElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGCursorElementImpl::y() const
+{
+ return m_y;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGCursorElementImpl::s_hashTable 3
+ x SVGCursorElementImpl::X DontDelete|ReadOnly
+ y SVGCursorElementImpl::Y DontDelete|ReadOnly
+@end
+*/
+
+Value SVGCursorElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return m_x->cache(exec);
+ case Y:
+ return m_y->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGCursorElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ x()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y:
+ y()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGCursorElementImpl.h b/ksvg/impl/SVGCursorElementImpl.h
new file mode 100644
index 00000000..a063acd0
--- /dev/null
+++ b/ksvg/impl/SVGCursorElementImpl.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGCursorElementImpl_H
+#define SVGCursorElementImpl_H
+
+#include "SVGTestsImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGCursorElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGTestsImpl,
+ public SVGExternalResourcesRequiredImpl
+{
+public:
+ SVGCursorElementImpl(DOM::ElementImpl *);
+ virtual ~SVGCursorElementImpl();
+
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDefinitionSrcElementImpl.cc b/ksvg/impl/SVGDefinitionSrcElementImpl.cc
new file mode 100644
index 00000000..cf5d764c
--- /dev/null
+++ b/ksvg/impl/SVGDefinitionSrcElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDefinitionSrcElementImpl.h"
+
+using namespace KSVG;
+
+SVGDefinitionSrcElementImpl::SVGDefinitionSrcElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGDefinitionSrcElementImpl::~SVGDefinitionSrcElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDefinitionSrcElementImpl.h b/ksvg/impl/SVGDefinitionSrcElementImpl.h
new file mode 100644
index 00000000..65fb359c
--- /dev/null
+++ b/ksvg/impl/SVGDefinitionSrcElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDefinitionSrcElementImpl_H
+#define SVGDefinitionSrcElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGDefinitionSrcElementImpl : public SVGElementImpl
+{
+public:
+ SVGDefinitionSrcElementImpl(DOM::ElementImpl *);
+ virtual ~SVGDefinitionSrcElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDefsElementImpl.cc b/ksvg/impl/SVGDefsElementImpl.cc
new file mode 100644
index 00000000..e5d7d398
--- /dev/null
+++ b/ksvg/impl/SVGDefsElementImpl.cc
@@ -0,0 +1,34 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDefsElementImpl.h"
+
+using namespace KSVG;
+
+SVGDefsElementImpl::SVGDefsElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ m_display = false; // implicit display=none
+}
+
+SVGDefsElementImpl::~SVGDefsElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDefsElementImpl.h b/ksvg/impl/SVGDefsElementImpl.h
new file mode 100644
index 00000000..e32f0dc9
--- /dev/null
+++ b/ksvg/impl/SVGDefsElementImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDefsElementImpl_H
+#define SVGDefsElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGDefsElementImpl : public SVGContainerImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGDefsElementImpl(DOM::ElementImpl *);
+ virtual ~SVGDefsElementImpl();
+
+ virtual bool directRender() { return false; }
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGDefsElementImpl, "defs")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDescElementImpl.cc b/ksvg/impl/SVGDescElementImpl.cc
new file mode 100644
index 00000000..cb0958dd
--- /dev/null
+++ b/ksvg/impl/SVGDescElementImpl.cc
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGDescElementImpl.h"
+
+using namespace KSVG;
+
+SVGDescElementImpl::SVGDescElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGLangSpaceImpl(), SVGStylableImpl(this)
+{
+}
+
+SVGDescElementImpl::~SVGDescElementImpl()
+{
+}
+
+void SVGDescElementImpl::createItem(KSVGCanvas *)
+{
+ emit ownerDoc()->gotDescription(collectText());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDescElementImpl.h b/ksvg/impl/SVGDescElementImpl.h
new file mode 100644
index 00000000..c8136eb6
--- /dev/null
+++ b/ksvg/impl/SVGDescElementImpl.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDescElementImpl_H
+#define SVGDescElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+
+namespace KSVG
+{
+
+class SVGDescElementImpl : public SVGElementImpl,
+ public SVGLangSpaceImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGDescElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGDescElementImpl();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGDescElementImpl, "desc")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDocumentImpl.cc b/ksvg/impl/SVGDocumentImpl.cc
new file mode 100644
index 00000000..4bbe2664
--- /dev/null
+++ b/ksvg/impl/SVGDocumentImpl.cc
@@ -0,0 +1,705 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#define USE_VALGRIND 0
+
+#if USE_VALGRIND
+#include <valgrind/calltree.h>
+#endif
+
+#include "SVGEvent.h"
+#include "SVGMatrixImpl.h"
+#include "SVGWindowImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGDocumentImpl.moc"
+#include "SVGSVGElementImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGScriptElementImpl.h"
+#include "SVGTitleElementImpl.h"
+#include "SVGAnimationElementImpl.h"
+
+#include "KSVGReader.h"
+#include "KSVGLoader.h"
+#include "KSVGCanvas.h"
+#include "CanvasItem.h"
+
+#include <qpaintdevicemetrics.h>
+
+using namespace KSVG;
+
+#include "SVGDocumentImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+// A sequence of prime numbers that sets the m_elemDict's hash table size as the
+// number of elements in the dictionary passes each level. This keeps the lookup
+// performance high as the number of elements grows. See the QDict documentation.
+unsigned int SVGDocumentImpl::elemDictHashSizes [] =
+{
+ 101,
+ 211,
+ 401,
+ 809,
+ 1601,
+ 3203,
+ 6421,
+ 12809,
+ 25601,
+ 51203,
+ 102407,
+ 204803,
+ 409609,
+ 819229
+};
+
+const int SVGDocumentImpl::numElemDictHashSizes = sizeof(elemDictHashSizes) / sizeof(elemDictHashSizes[0]);
+
+SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *parentImage) : QObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this))
+{
+ m_animations = anim;
+
+ m_reader = 0;
+ m_loader = 0;
+ m_canvas = 0;
+ m_rootElement = 0;
+ m_lastTarget = 0;
+ m_window = 0;
+
+ m_elemDictHashSizeIndex = 0;
+ m_elemDict.resize(elemDictHashSizes[m_elemDictHashSizeIndex]);
+
+ m_timeScheduler = new SVGTimeScheduler(this);
+ m_ecmaEngine = new KSVGEcma(this);
+ m_ecmaEngine->setup();
+
+ m_finishedParsing = false;
+ m_finishedLoading = false;
+ m_resortZIndicesOnFinishedLoading = false;
+ m_fit = fit;
+
+ m_parentImage = parentImage;
+ if(m_parentImage)
+ m_parentImage->ref();
+}
+
+SVGDocumentImpl::~SVGDocumentImpl()
+{
+ if(rootElement() && rootElement()->hasEventListener(SVGEvent::UNLOAD_EVENT, true))
+ rootElement()->dispatchEvent(SVGEvent::UNLOAD_EVENT, false, false);
+
+ QPtrList<SVGShapeImpl> killList;
+
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(getElementFromHandle(node.handle()));
+ if(shape)
+ killList.append(shape);
+ }
+
+ SVGShapeImpl *rend = 0;
+ for(rend = killList.first(); rend; rend = killList.next())
+ delete rend;
+
+ delete m_timeScheduler;
+ delete m_ecmaEngine;
+ delete m_reader;
+ delete m_loader;
+
+ if(m_window)
+ m_window->deref();
+
+ if(m_parentImage)
+ m_parentImage->deref();
+}
+
+SVGWindowImpl *SVGDocumentImpl::window()
+{
+ if(!m_window)
+ {
+ m_window = new SVGWindowImpl(const_cast<SVGDocumentImpl *>(this));
+ m_window->ref();
+ }
+
+ return m_window;
+}
+
+float SVGDocumentImpl::screenPixelsPerMillimeterX() const
+{
+ if(canvas() && canvas()->drawWindow())
+ {
+ QPaintDeviceMetrics metrics(canvas()->drawWindow());
+ return float(metrics.width()) / float(metrics.widthMM());
+ }
+ else
+ return 90.0;
+}
+
+float SVGDocumentImpl::screenPixelsPerMillimeterY() const
+{
+ if(canvas() && canvas()->drawWindow())
+ {
+ QPaintDeviceMetrics metrics(canvas()->drawWindow());
+ return float(metrics.height()) / float(metrics.heightMM());
+ }
+ else
+ return 90.0;
+}
+
+DOM::DOMString SVGDocumentImpl::title() const
+{
+ DOM::Node n;
+ for(n = rootElement()->firstChild(); !n.isNull(); n = n.nextSibling())
+ {
+ SVGElementImpl *elem = getElementFromHandle(n.handle());
+ if(dynamic_cast<SVGTitleElementImpl *>(elem))
+ return elem->collectText();
+ }
+ return "";
+}
+
+DOM::DOMString SVGDocumentImpl::referrer() const
+{
+ return m_referrer;
+}
+
+DOM::DOMString SVGDocumentImpl::domain() const
+{
+ return m_baseURL.host();
+}
+
+DOM::DOMString SVGDocumentImpl::URL() const
+{
+ return m_baseURL.prettyURL();
+}
+
+void SVGDocumentImpl::setReferrer(const DOM::DOMString &referrer)
+{
+ // TODO : better may be to request for referrer instead of storing it
+ m_referrer = referrer;
+}
+
+void SVGDocumentImpl::setRootElement(SVGSVGElementImpl *elem)
+{
+ m_rootElement = elem;
+}
+
+SVGSVGElementImpl *SVGDocumentImpl::rootElement() const
+{
+ return m_rootElement;
+}
+
+SVGElementImpl *SVGDocumentImpl::createElement(const DOM::DOMString &name, DOM::Element impl, SVGDocumentImpl *doc)
+{
+ DOM::ElementImpl *handle = reinterpret_cast<DOM::ElementImpl *>(impl.handle());
+ SVGElementImpl *element = SVGElementImpl::Factory::self()->create(std::string(name.string().latin1()), handle);
+
+ if(!element)
+ element = new SVGElementImpl(handle);
+
+ element->setOwnerDoc(doc);
+ element->ref();
+ return element;
+}
+
+bool SVGDocumentImpl::open(const ::KURL &url)
+{
+ if(!url.prettyURL().isEmpty())
+ {
+ m_baseURL = url;
+
+ if(!m_loader)
+ m_loader = new KSVGLoader();
+
+ connect(m_loader, SIGNAL(gotResult(QIODevice *)), this, SLOT(slotSVGContent(QIODevice *)));
+ m_loader->getSVGContent(url);
+ }
+ else
+ return false;
+
+ return true;
+}
+
+void SVGDocumentImpl::slotSVGContent(QIODevice *dev)
+{
+ QXmlInputSource *inputSource = new QXmlInputSource(dev);
+
+ if(m_reader)
+ delete m_reader;
+
+ KSVGReader::ParsingArgs args;
+ args.fit = m_fit;
+ args.getURLMode = false;
+
+ QString url = m_baseURL.prettyURL();
+ int pos = url.find('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#'
+ if(pos > -1)
+ args.SVGFragmentId = url.mid(pos + 1);
+
+ m_reader = new KSVGReader(this, m_canvas, args);
+ connect(m_reader, SIGNAL(finished(bool, const QString &)), this, SLOT(slotFinishedParsing(bool, const QString &)));
+ m_t.start();
+
+#if USE_VALGRIND
+ CALLTREE_ZERO_STATS();
+#endif
+
+ m_reader->parse(inputSource);
+ delete dev;
+}
+
+void SVGDocumentImpl::parseSVG(QXmlInputSource *inputSource, bool getURLMode)
+{
+ if(m_reader)
+ delete m_reader;
+
+ KSVGReader::ParsingArgs args;
+ args.fit = m_fit;
+ args.getURLMode = getURLMode;
+ m_reader = new KSVGReader(this, 0, args);
+ connect(m_reader, SIGNAL(finished(bool, const QString &)), this, SLOT(slotFinishedParsing(bool, const QString &)));
+
+#if USE_VALGRIND
+ CALLTREE_ZERO_STATS();
+#endif
+
+ m_reader->parse(inputSource);
+}
+
+void SVGDocumentImpl::finishParsing(bool error, const QString &errorDesc)
+{
+ if(m_reader)
+ m_reader->finishParsing(error, errorDesc);
+}
+
+void SVGDocumentImpl::slotFinishedParsing(bool error, const QString &errorDesc)
+{
+ kdDebug(26000) << k_funcinfo << "total time : " << m_t.elapsed() << endl;
+
+#if USE_VALGRIND
+ CALLTREE_DUMP_STATS();
+#endif
+
+ if(m_animations)
+ m_timeScheduler->startAnimations();
+
+ if(m_canvas && !error && rootElement())
+ executeScripts();
+
+ m_finishedParsing = true;
+
+ emit finishedParsing(error, errorDesc);
+ if(!error)
+ emit finishedRendering();
+
+ checkFinishedLoading();
+}
+
+void SVGDocumentImpl::newImageJob(SVGImageElementImpl *image)
+{
+ kdDebug(26002) << "SVGDocumentImpl::newImageJob, " << image << endl;
+ m_loader->newImageJob(image, m_baseURL);
+}
+
+void SVGDocumentImpl::notifyImageLoading(SVGImageElementImpl *image)
+{
+ m_imagesLoading.append(image);
+}
+
+void SVGDocumentImpl::notifyImageLoaded(SVGImageElementImpl *image)
+{
+ m_imagesLoading.remove(image);
+
+ if(m_imagesLoading.isEmpty())
+ checkFinishedLoading();
+}
+
+void SVGDocumentImpl::checkFinishedLoading()
+{
+ if(m_finishedParsing && m_imagesLoading.isEmpty())
+ {
+ m_finishedLoading = true;
+
+ if(m_resortZIndicesOnFinishedLoading)
+ {
+ // Only resort if we're the 'outermost' document, i.e. we're not an svg image
+ // inside another document. We could resort as each image finishes loading, but it
+ // slows down the parsing phase.
+ if(m_parentImage == 0 && m_canvas && m_rootElement)
+ {
+ m_canvas->setElementItemZIndexRecursive(m_rootElement, 0);
+ m_canvas->update();
+ }
+ }
+
+ emit finishedLoading();
+ }
+}
+
+void SVGDocumentImpl::addForwardReferencingUseElement(SVGUseElementImpl *use)
+{
+ if(!m_forwardReferencingUseElements.contains(use))
+ m_forwardReferencingUseElements.append(use);
+}
+
+void SVGDocumentImpl::slotPaint()
+{
+ rerender();
+}
+
+void SVGDocumentImpl::rerender()
+{
+ m_canvas->update();
+ emit finishedRendering();
+}
+
+void SVGDocumentImpl::attach(KSVG::KSVGCanvas *c)
+{
+ m_canvas = c;
+}
+
+void SVGDocumentImpl::detach()
+{
+ m_canvas = 0;
+}
+
+KSVG::KSVGCanvas *SVGDocumentImpl::canvas() const
+{
+ return m_canvas;
+}
+
+void SVGDocumentImpl::syncCachedMatrices()
+{
+ if(rootElement())
+ {
+ SVGMatrixImpl *parentMatrix = SVGSVGElementImpl::createSVGMatrix();
+ rootElement()->checkCachedScreenCTM(parentMatrix);
+ parentMatrix->deref();
+ }
+}
+
+void SVGDocumentImpl::executeScriptsRecursive(DOM::Node start)
+{
+ DOM::Node node = start.firstChild();
+
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = getElementFromHandle(node.handle());
+
+ SVGContainerImpl *container = dynamic_cast<SVGContainerImpl *>(element);
+ if(container)
+ executeScriptsRecursive(node);
+
+ SVGScriptElementImpl *script = dynamic_cast<SVGScriptElementImpl *>(element);
+
+ if(script)
+ script->executeScript(DOM::Node());
+ }
+}
+
+bool SVGDocumentImpl::executeScriptsRecursiveCheck(DOM::Node start)
+{
+ bool test = true;
+
+ DOM::Node node = start.firstChild();
+
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = getElementFromHandle(node.handle());
+
+ SVGContainerImpl *container = dynamic_cast<SVGContainerImpl *>(element);
+ if(container)
+ {
+ if(!executeScriptsRecursiveCheck(node))
+ return false;
+ }
+
+ SVGScriptElementImpl *script = dynamic_cast<SVGScriptElementImpl *>(element);
+
+ if(script)
+ {
+ if(!script->canExecuteScript())
+ {
+ test = false;
+ break;
+ }
+ }
+ }
+
+ return test;
+}
+
+void SVGDocumentImpl::executeScripts()
+{
+ bool test = executeScriptsRecursiveCheck(*rootElement());
+
+ if(!test)
+ QTimer::singleShot(50, this, SLOT(executeScripts()));
+ else
+ {
+ executeScriptsRecursive(*rootElement());
+
+ // mop: only rerender if an loadevent has been found
+ if(dispatchRecursiveEvent(SVGEvent::LOAD_EVENT, lastChild()))
+ m_canvas->update();
+ }
+}
+
+// Dispatches a non-cancelable, non-bubbles event to every child
+bool SVGDocumentImpl::dispatchRecursiveEvent(SVGEvent::EventId id, DOM::Node start)
+{
+ bool eventExecuted = false;
+
+ // Iterate the tree, backwards, and dispatch the event to every child
+ DOM::Node node = start;
+ for(; !node.isNull(); node = node.previousSibling())
+ {
+ SVGElementImpl *element = getElementFromHandle(node.handle());
+
+ if(element && element->hasChildNodes())
+ {
+ // Dispatch to all children
+ eventExecuted = dispatchRecursiveEvent(id, element->lastChild()) ? true : eventExecuted;
+
+ // Dispatch, locally
+ if(element->hasEventListener(id, true))
+ {
+ element->dispatchEvent(id, false, false);
+ eventExecuted = true;
+ }
+ }
+ else if(element && element->hasEventListener(id, true))
+ {
+ element->dispatchEvent(id, false, false);
+ eventExecuted = true;
+ }
+ }
+
+ return eventExecuted;
+}
+
+SVGEventListener *SVGDocumentImpl::createEventListener(DOM::DOMString type)
+{
+ return m_ecmaEngine->createEventListener(type);
+}
+
+SVGElementImpl *SVGDocumentImpl::recursiveSearch(DOM::Node start, const DOM::DOMString &id)
+{
+ DOM::Node node = start.firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *test = getElementFromHandle(node.handle());
+
+ // Look in containers
+ SVGContainerImpl *container = dynamic_cast<SVGContainerImpl *>(test);
+ if(container)
+ {
+ SVGElementImpl *found = recursiveSearch(node, id);
+ if(found)
+ return found;
+ }
+
+ // Look in SVGSVGElementImpl's
+ SVGSVGElementImpl *svgtest = dynamic_cast<SVGSVGElementImpl *>(test);
+ if(svgtest)
+ {
+ SVGElementImpl *element = svgtest->getElementById(id);
+ if(element)
+ return element;
+ }
+ }
+
+ return 0;
+}
+
+/*
+@namespace KSVG
+@begin SVGDocumentImpl::s_hashTable 9
+ title SVGDocumentImpl::Title DontDelete|ReadOnly
+ referrer SVGDocumentImpl::Referrer DontDelete|ReadOnly
+ domain SVGDocumentImpl::Domain DontDelete|ReadOnly
+ URL SVGDocumentImpl::Url DontDelete|ReadOnly
+ doctype SVGDocumentImpl::DocType DontDelete|ReadOnly
+ implementation SVGDocumentImpl::Implementation DontDelete|ReadOnly
+ rootElement SVGDocumentImpl::RootElement DontDelete|ReadOnly
+ documentElement SVGDocumentImpl::DocumentElement DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDocumentImplProto::s_hashTable 7
+ createTextNode SVGDocumentImpl::CreateTextNode DontDelete|Function 1
+ createElement SVGDocumentImpl::CreateElement DontDelete|Function 1
+ createElementNS SVGDocumentImpl::CreateElementNS DontDelete|Function 2
+ getElementById SVGDocumentImpl::GetElementById DontDelete|Function 1
+ getElementsByTagName SVGDocumentImpl::GetElementsByTagName DontDelete|Function 1
+ getElementsByTagNameNS SVGDocumentImpl::GetElementsByTagNameNS DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGDocument", SVGDocumentImplProto, SVGDocumentImplProtoFunc)
+
+Value SVGDocumentImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Title:
+ return String(title().string());
+ case Referrer:
+ return String(referrer().string());
+ case Domain:
+ return String(domain().string());
+ case Url:
+ return String(URL().string());
+ case DocType:
+ return getDOMNode(exec, doctype());
+ case Implementation:
+ return (new SVGDOMDOMImplementationBridge(implementation()))->cache(exec);
+ case RootElement:
+ case DocumentElement:
+ return m_rootElement->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGDocumentImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDocumentImpl)
+
+ switch(id)
+ {
+ case SVGDocumentImpl::CreateTextNode:
+ return getDOMNode(exec, obj->createTextNode(args[0].toString(exec).string()));
+ case SVGDocumentImpl::CreateElement:
+ case SVGDocumentImpl::CreateElementNS:
+ {
+ SVGElementImpl *newElement = 0;
+
+ if(id == SVGDocumentImpl::CreateElement)
+ newElement = obj->createElement(args[0].toString(exec).qstring(), static_cast<DOM::Document *>(obj)->createElement(args[0].toString(exec).string()), obj);
+ else if(id == SVGDocumentImpl::CreateElementNS)
+ newElement = obj->createElement(args[1].toString(exec).qstring(), static_cast<DOM::Document *>(obj)->createElementNS(args[0].toString(exec).string(), args[1].toString(exec).string()), obj);
+
+ newElement->setOwnerSVGElement(obj->rootElement()); // FIXME: Correct in all situations?
+ newElement->setViewportElement(obj->rootElement());
+ newElement->setAttributes();
+
+ return getDOMNode(exec, *newElement);
+ }
+ case SVGDocumentImpl::GetElementById:
+ {
+ Value ret;
+
+ SVGElementImpl *element = obj->rootElement()->getElementById(args[0].toString(exec).string());
+
+ if(element)
+ ret = getDOMNode(exec, *element);
+ else
+ {
+ element = obj->recursiveSearch(*obj, args[0].toString(exec).string());
+ if(!element)
+ return Null();
+
+ ret = getDOMNode(exec, *element);
+ }
+
+ return ret;
+ }
+ case SVGDocumentImpl::GetElementsByTagName:
+ return (new SVGDOMNodeListBridge(obj->getElementsByTagName(args[0].toString(exec).string())))->cache(exec);
+ case SVGDocumentImpl::GetElementsByTagNameNS:
+ return (new SVGDOMNodeListBridge(obj->getElementsByTagNameNS(args[0].toString(exec).string(), args[1].toString(exec).string())))->cache(exec);
+ default:
+ break;
+ }
+
+ return KJS::Undefined();
+}
+
+SVGElementImpl *SVGDocumentImpl::getElementFromHandle(DOM::NodeImpl *handle) const
+{
+ return m_elemDict[handle];
+}
+
+void SVGDocumentImpl::addToElemDict(DOM::NodeImpl *handle, SVGElementImpl *obj)
+{
+ m_elemDict.insert(handle, obj);
+
+ if(m_elemDict.count()>m_elemDict.size() && m_elemDictHashSizeIndex<numElemDictHashSizes-1)
+ {
+ // Increase the hash table size to maintain good lookup speed.
+ m_elemDictHashSizeIndex++;
+ m_elemDict.resize(elemDictHashSizes[m_elemDictHashSizeIndex]);
+ }
+}
+
+void SVGDocumentImpl::removeFromElemDict(DOM::NodeImpl *handle)
+{
+ m_elemDict.remove(handle);
+}
+
+SVGDocumentImpl *SVGDocumentImpl::getDocumentFromHandle(DOM::NodeImpl *handle) const
+{
+ return m_documentDict[handle];
+}
+
+void SVGDocumentImpl::addToDocumentDict(DOM::NodeImpl *handle, SVGDocumentImpl *obj)
+{
+ m_documentDict.insert(handle, obj);
+}
+
+SVGElementImpl *SVGDocumentImpl::getElementByIdRecursive(SVGSVGElementImpl *start, const DOM::DOMString &elementId, bool dontSearch)
+{
+ SVGElementImpl *element = 0;
+
+ // #1 Look in passed SVGSVGElementImpl
+ if(start)
+ {
+ element = start->getElementById(elementId);
+
+ if(element)
+ return element;
+ }
+
+ // #2 Search in all child SVGSVGElementImpl's
+ element = recursiveSearch(*this, elementId);
+
+ if(element)
+ return element;
+
+ // #3 Search in other documents
+ if(!dontSearch)
+ {
+ QPtrDictIterator<SVGDocumentImpl> it(m_documentDict);
+ for(; it.current(); ++it)
+ {
+ SVGElementImpl *temp = it.current()->getElementByIdRecursive(0, elementId, true);
+ if(temp)
+ return temp;
+ }
+ }
+
+ return element;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGDocumentImpl.h b/ksvg/impl/SVGDocumentImpl.h
new file mode 100644
index 00000000..c4156910
--- /dev/null
+++ b/ksvg/impl/SVGDocumentImpl.h
@@ -0,0 +1,245 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGDocumentImpl_H
+#define SVGDocumentImpl_H
+
+#include <kurl.h>
+
+#include <qxml.h>
+#include <qobject.h>
+#include <qptrdict.h>
+#include <qptrlist.h>
+#include <qdatetime.h>
+#include <qstringlist.h>
+
+#include <kjs/object.h>
+
+#include <dom/dom_doc.h>
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+#include "SVGEvent.h"
+#include "SVGTimeScheduler.h"
+
+class KSVGEcma;
+class KSVGRequest;
+
+namespace KJS
+{
+ class Value;
+ class UString;
+ class ExecState;
+ class Identifier;
+}
+
+namespace KSVG
+{
+
+class SVGTimer;
+class KSVGLoader;
+class KSVGReader;
+class KSVGCanvas;
+class SVGImageElementImpl;
+class SVGSVGElementImpl;
+class SVGWindowImpl;
+class SVGScriptElementImpl;
+class SVGDescElementImpl;
+class SVGTitleElementImpl;
+class SVGUseElementImpl;
+class SVGDocumentImpl : public QObject,
+ public DOM::DomShared,
+ public DOM::Document,
+ public SVGDOMNodeBridge
+{
+Q_OBJECT
+public:
+ SVGDocumentImpl(bool anim = true, bool bFit = false, SVGImageElementImpl *parentImage = 0);
+ virtual ~SVGDocumentImpl();
+
+ float screenPixelsPerMillimeterX() const;
+ float screenPixelsPerMillimeterY() const;
+
+ DOM::DOMString title() const;
+ DOM::DOMString referrer() const;
+ DOM::DOMString domain() const;
+ DOM::DOMString URL() const;
+
+ void setReferrer(const DOM::DOMString &referrer);
+
+ void setRootElement(SVGSVGElementImpl *);
+ SVGSVGElementImpl *rootElement() const;
+
+ SVGImageElementImpl *parentImage() const { return m_parentImage; }
+
+ SVGWindowImpl *window();
+
+ static SVGElementImpl *createElement(const DOM::DOMString &name, DOM::Element impl, SVGDocumentImpl *doc = 0);
+
+ bool open(const KURL &url);
+ void rerender();
+
+ void attach(KSVG::KSVGCanvas *p);
+ void detach();
+
+ bool ready() { return m_finishedParsing; }
+
+ KURL baseUrl() { return m_baseURL; }
+ KSVGCanvas *canvas() const;
+
+ // Ecma stuff
+ KSVGEcma *ecmaEngine() { return m_ecmaEngine; }
+
+ void parseSVG(QXmlInputSource *inputSource, bool getURLMode = false);
+
+ virtual bool implementsCall() const { return true; }
+
+ void executeScriptsRecursive(DOM::Node start);
+ bool executeScriptsRecursiveCheck(DOM::Node start);
+
+ bool dispatchRecursiveEvent(SVGEvent::EventId id, DOM::Node start);
+
+ SVGElementImpl *getElementByIdRecursive(SVGSVGElementImpl *start, const DOM::DOMString &elementId, bool dontSearch = false);
+
+ // Event stuff
+ SVGEventListener *createEventListener(DOM::DOMString type);
+
+ void setLastTarget(SVGElementImpl *elem) { m_lastTarget = elem; }
+ SVGElementImpl *lastTarget() { return m_lastTarget; }
+
+ // Animation stuff
+ SVGTimeScheduler *timeScheduler() const { return m_timeScheduler; }
+
+ // Internal
+ SVGElementImpl *getElementFromHandle(DOM::NodeImpl *handle) const;
+ void addToElemDict(DOM::NodeImpl *handle, SVGElementImpl *obj);
+ void removeFromElemDict(DOM::NodeImpl *handle);
+
+ SVGDocumentImpl *getDocumentFromHandle(DOM::NodeImpl *handle) const;
+ void addToDocumentDict(DOM::NodeImpl *handle, SVGDocumentImpl *obj);
+
+ SVGElementImpl *recursiveSearch(DOM::Node start, const DOM::DOMString &id);
+
+ void finishParsing(bool error, const QString &errorDesc);
+
+ void newImageJob(SVGImageElementImpl *);
+
+ void notifyImageLoading(SVGImageElementImpl *image);
+ void notifyImageLoaded(SVGImageElementImpl *image);
+ void resortZIndicesOnFinishedLoading() { m_resortZIndicesOnFinishedLoading = true; }
+
+ void addForwardReferencingUseElement(SVGUseElementImpl *use);
+ QValueList<SVGUseElementImpl *> forwardReferencingUseElements() const { return m_forwardReferencingUseElements; }
+
+ // Traverse the element hierarchy and update any cached matrices that are
+ // no longer valid.
+ void syncCachedMatrices();
+
+public slots:
+ void slotPaint();
+ void executeScripts();
+
+private slots:
+ void slotSVGContent(QIODevice *);
+ void slotFinishedParsing(bool error, const QString &errorDesc);
+
+// KDE invents public signals :)
+#undef signals
+#define signals public
+signals:
+ void gotDescription(const QString &);
+ void gotTitle(const QString &);
+ void gotURL(const QString &);
+
+ void finishedParsing(bool error, const QString &errorDesc);
+ void finishedRendering();
+ void finishedLoading();
+
+private:
+ void checkFinishedLoading();
+
+ bool m_finishedParsing;
+ bool m_finishedLoading;
+ bool m_animations;
+
+ SVGSVGElementImpl *m_rootElement;
+
+ SVGTimeScheduler *m_timeScheduler;
+
+ // Set if this document is being displayed by an 'image' element reference
+ // rather than as the main document, 0 otherwise.
+ SVGImageElementImpl *m_parentImage;
+
+ KSVGReader *m_reader;
+ KSVGLoader *m_loader;
+ KSVGCanvas *m_canvas;
+
+ KSVGEcma *m_ecmaEngine;
+
+ QPtrDict<SVGElementImpl> m_elemDict;
+ QPtrDict<SVGDocumentImpl> m_documentDict;
+
+ static uint elemDictHashSizes[];
+ static const int numElemDictHashSizes;
+ int m_elemDictHashSizeIndex;
+
+ SVGWindowImpl *m_window;
+ SVGElementImpl *m_lastTarget;
+
+ KURL m_baseURL;
+
+ DOM::DOMString m_referrer;
+
+ bool m_fit;
+
+ QTime m_t;
+
+ QValueList<SVGImageElementImpl *> m_imagesLoading;
+ bool m_resortZIndicesOnFinishedLoading;
+
+ QValueList<SVGUseElementImpl *> m_forwardReferencingUseElements;
+
+public:
+ KSVG_BASECLASS_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Title, Referrer, Domain, Url,
+ DocType, Implementation, RootElement, DocumentElement,
+ // Functions
+ CreateTextNode, CreateElement, CreateElementNS,
+ GetElementById, GetElementsByTagName, GetElementsByTagNameNS
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGDocumentImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDocumentImplProtoFunc, SVGDocumentImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEcma.cc b/ksvg/impl/SVGEcma.cc
new file mode 100644
index 00000000..08870d0c
--- /dev/null
+++ b/ksvg/impl/SVGEcma.cc
@@ -0,0 +1,844 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <typeinfo>
+
+#include <kdebug.h>
+
+#include <dom/dom_exception.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include "SVGEcma.h"
+#include "SVGShapeImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGEcma.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecmaeventlistener.h"
+#include "ksvg_window.h"
+#include "ksvg_ecma.h"
+
+// SVGDOMNodeBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMNodeBridge::s_hashTable 17
+ nodeName SVGDOMNodeBridge::NodeName DontDelete|ReadOnly
+ nodeValue SVGDOMNodeBridge::NodeValue DontDelete
+ nodeType SVGDOMNodeBridge::NodeType DontDelete|ReadOnly
+ parentNode SVGDOMNodeBridge::ParentNode DontDelete|ReadOnly
+ childNodes SVGDOMNodeBridge::ChildNodes DontDelete|ReadOnly
+ firstChild SVGDOMNodeBridge::FirstChild DontDelete|ReadOnly
+ lastChild SVGDOMNodeBridge::LastChild DontDelete|ReadOnly
+ previousSibling SVGDOMNodeBridge::PreviousSibling DontDelete|ReadOnly
+ nextSibling SVGDOMNodeBridge::NextSibling DontDelete|ReadOnly
+ attributes SVGDOMNodeBridge::Attributes DontDelete|ReadOnly
+ namespaceURI SVGDOMNodeBridge::NamespaceURI DontDelete|ReadOnly
+ prefix SVGDOMNodeBridge::Prefix DontDelete
+ localName SVGDOMNodeBridge::LocalName DontDelete|ReadOnly
+ ownerDocument SVGDOMNodeBridge::OwnerDocument DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDOMNodeBridgeProto::s_hashTable 29
+ insertBefore SVGDOMNodeBridge::InsertBefore DontDelete|Function 2
+ replaceChild SVGDOMNodeBridge::ReplaceChild DontDelete|Function 2
+ removeChild SVGDOMNodeBridge::RemoveChild DontDelete|Function 1
+ appendChild SVGDOMNodeBridge::AppendChild DontDelete|Function 1
+ hasAttributes SVGDOMNodeBridge::HasAttributes DontDelete|Function 0
+ hasChildNodes SVGDOMNodeBridge::HasChildNodes DontDelete|Function 0
+ cloneNode SVGDOMNodeBridge::CloneNode DontDelete|Function 1
+ normalize SVGDOMNodeBridge::Normalize DontDelete|Function 0
+ isSupported SVGDOMNodeBridge::IsSupported DontDelete|Function 2
+ addEventListener SVGDOMNodeBridge::AddEventListener DontDelete|Function 3
+ removeEventListener SVGDOMNodeBridge::RemoveEventListener DontDelete|Function 3
+ contains SVGDOMNodeBridge::Contains DontDelete|Function 1
+ getNodeName SVGDOMNodeBridge::GetNodeName DontDelete|Function 0
+ getNodeValue SVGDOMNodeBridge::GetNodeValue DontDelete|Function 0
+ getNodeType SVGDOMNodeBridge::GetNodeType DontDelete|Function 0
+ getParentNode SVGDOMNodeBridge::GetParentNode DontDelete|Function 0
+ getChildNodes SVGDOMNodeBridge::GetChildNodes DontDelete|Function 0
+ getFirstChild SVGDOMNodeBridge::GetFirstChild DontDelete|Function 0
+ getLastChild SVGDOMNodeBridge::GetLastChild DontDelete|Function 0
+ getPreviousSibling SVGDOMNodeBridge::GetPreviousSibling DontDelete|Function 0
+ getNextSibling SVGDOMNodeBridge::GetNextSibling DontDelete|Function 0
+ getAttributes SVGDOMNodeBridge::GetAttributes DontDelete|Function 0
+ getNamespaceURI SVGDOMNodeBridge::GetNamespaceURI DontDelete|Function 0
+ getPrefix SVGDOMNodeBridge::GetPrefix DontDelete|Function 0
+ getLocalName SVGDOMNodeBridge::GetLocalName DontDelete|Function 0
+ getOwnerDocument SVGDOMNodeBridge::GetOwnerDocument DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMNode", SVGDOMNodeBridgeProto, SVGDOMNodeBridgeProtoFunc)
+
+Value SVGDOMNodeBridge::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case NodeName:
+ return getString(m_impl.nodeName());
+ case NodeValue:
+ return getString(m_impl.nodeValue());
+ case NodeType:
+ return Number(m_impl.nodeType());
+ case ParentNode:
+ return getDOMNode(exec, m_impl.parentNode());
+ case ChildNodes:
+ return (new SVGDOMNodeListBridge(m_impl.childNodes()))->cache(exec);
+ case FirstChild:
+ return getDOMNode(exec, m_impl.firstChild());
+ case LastChild:
+ return getDOMNode(exec, m_impl.lastChild());
+ case PreviousSibling:
+ return getDOMNode(exec, m_impl.previousSibling());
+ case NextSibling:
+ return getDOMNode(exec, m_impl.nextSibling());
+// case Attributes: // TODO
+ case NamespaceURI:
+ return getString(m_impl.namespaceURI());
+ case Prefix:
+ return getString(m_impl.prefix());
+ case LocalName:
+ return getString(m_impl.localName());
+ case OwnerDocument:
+ return getDOMNode(exec, m_impl.ownerDocument());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGDOMNodeBridge::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case NodeValue:
+ m_impl.setNodeValue(value.toString(exec).string());
+ break;
+ case Prefix:
+ m_impl.setPrefix(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// Special variantion to update the <text> element,
+// triggered by one of the child nodes
+void updateTextItem(ExecState *exec, const DOM::Node node)
+{
+ DOM::Node parent;
+ while(!(parent = node.parentNode()).isNull())
+ {
+ DOM::DOMString name = parent.nodeName();
+ if(name == "text" || name == "tspan" || name == "tref")
+ {
+ SVGHelperImpl::updateItem(exec, parent);
+ break;
+ }
+ }
+}
+
+// Remove item from canvas
+void removeItem(ExecState *exec, DOM::Node &node)
+{
+ // Get document
+ SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc();
+
+ // Update canvas
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle()));
+ if(shape && shape->item())
+ doc->canvas()->removeItem(shape->item());
+}
+
+// parseXML + getURL() need all these 5 functions to work properly
+void correctHandles(SVGElementImpl *main, DOM::Node &node)
+{
+ DOM::Element old(node.handle());
+ DOM::Element *replace = static_cast<DOM::Element *>(main->ownerDoc()->getElementFromHandle(node.handle()));
+
+ if(replace && node.nodeType() == DOM::Node::ELEMENT_NODE)
+ *replace = old;
+
+ if(node.hasChildNodes())
+ {
+ for(DOM::Node iterate = node.firstChild(); !iterate.isNull(); iterate = iterate.nextSibling())
+ correctHandles(main, iterate);
+ }
+}
+
+void integrateTree(SVGElementImpl *main, DOM::Node &node, DOM::Node &newNode, SVGElementImpl *obj, SVGDocumentImpl *doc)
+{
+ if(!obj)
+ return;
+
+ // Add to global element dicts
+ doc->addToElemDict(newNode.handle(), obj);
+ doc->addToElemDict(node.handle(), obj);
+
+ if(node.hasChildNodes())
+ {
+ DOM::Node iterate2 = newNode.firstChild();
+ for(DOM::Node iterate = node.firstChild(); !iterate.isNull(); iterate = iterate.nextSibling())
+ {
+ integrateTree(main, iterate, iterate2, obj->ownerDoc()->getElementFromHandle(iterate2.handle()), doc);
+ iterate2 = iterate2.nextSibling();
+ }
+ }
+}
+
+void correctDocument(SVGElementImpl *main, DOM::Node &node, SVGElementImpl *obj, SVGDocumentImpl *doc)
+{
+ if(!obj)
+ return;
+
+ // Correct document
+ obj->setOwnerDoc(main->ownerDoc());
+
+ // Correct rootElement
+ if(!obj->ownerSVGElement())
+ obj->setOwnerSVGElement(main->ownerSVGElement());
+
+ // Correct viewportElement
+ if(!obj->viewportElement())
+ obj->setViewportElement(main->viewportElement());
+
+ // Properly (re-)register events in the current active document
+ obj->setupEventListeners(main->ownerDoc(), doc);
+
+ if(node.hasChildNodes())
+ {
+ for(DOM::Node iterate = node.firstChild(); !iterate.isNull(); iterate = iterate.nextSibling())
+ correctDocument(main, iterate, doc->getElementFromHandle(iterate.handle()), doc);
+ }
+}
+
+void registerAdditional(ExecState *exec, SVGDocumentImpl *doc, DOM::Node node)
+{
+ // Register ID in rootElement!
+ SVGElementImpl *resultElement = doc->getElementFromHandle(node.handle());
+ if(resultElement && resultElement->hasAttribute("id"))
+ doc->rootElement()->addToIdMap(resultElement->getAttribute("id").string(), resultElement);
+
+ if(node.hasChildNodes())
+ {
+ for(DOM::Node iterate = node.firstChild(); !iterate.isNull(); iterate = iterate.nextSibling())
+ registerAdditional(exec, doc, iterate);
+ }
+}
+
+Value appendHelper(ExecState *exec, DOM::Node node, DOM::Node newNode)
+{
+ // This is quite tricky code by me (Niko)
+ // Don't even try to modify it.
+ if(!(node.ownerDocument() == newNode.ownerDocument()))
+ {
+ // Get document
+ SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc();
+
+ // Detect ownerDoc() of newNode
+ SVGDocumentImpl *newDoc = doc->getDocumentFromHandle(newNode.ownerDocument().handle());
+
+ // Get some SVGElementImpl's
+ SVGElementImpl *nodeElement = doc->getElementFromHandle(node.handle());
+ SVGElementImpl *newNodeElement = newDoc->getElementFromHandle(newNode.handle());
+
+ // Import node into document
+ DOM::Node result = doc->importNode(newNode, true);
+
+ // Associate the imported node 'result' with the
+ // 'newNodeElement' which belongs to 'newDoc'
+ integrateTree(nodeElement, result, newNode, newNodeElement, doc);
+
+ // Correct handles in SVG* elements
+ correctHandles(nodeElement, result);
+
+ // Correct ownerDoc() etc..
+ correctDocument(nodeElement, newNode, newNodeElement, newDoc);
+
+ // Register ID in global map
+ registerAdditional(exec, doc, result);
+
+ // Recalc style
+ newNodeElement->setAttributes();
+
+ // Append + create + update element
+ Value retVal = getDOMNode(exec, node.appendChild(result));
+
+ doc->syncCachedMatrices();
+ newNodeElement->createItem(doc->canvas());
+ SVGHelperImpl::updateItem(exec, *newNodeElement);
+
+ return retVal;
+ }
+ else
+ {
+ Value retVal = getDOMNode(exec, node.appendChild(newNode));
+
+ // Get document
+ SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc();
+ doc->syncCachedMatrices();
+
+ // Get some SVGElementImpl's
+ SVGElementImpl *nodeElement = doc->getElementFromHandle(newNode.handle());
+ // TODO : extra check needed to see if the new elements parent is already appended
+ // in the doc. Not really nice, should be some other way? (Rob)
+ if(nodeElement && !nodeElement->parentNode().parentNode().isNull())
+ {
+ nodeElement->setAttributes(true);
+ nodeElement->createItem();
+ SVGHelperImpl::updateItem(exec, newNode);
+ }
+
+ return retVal;
+ }
+}
+
+Value SVGDOMNodeBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMNodeBridge)
+ DOM::Node node = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMNodeBridge::InsertBefore:
+ {
+ DOM::Node newChild = toNode(args[0]);
+ DOM::Node beforeChild = toNode(args[1]);
+ Value retVal = getDOMNode(exec, node.insertBefore(newChild, beforeChild));
+
+ // Get document
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+
+ // Get some SVGElementImpl's
+ SVGShapeImpl *newShape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(newChild.handle()));
+ SVGElementImpl *newElement = doc->getElementFromHandle(newChild.handle());
+ SVGShapeImpl *beforeElement = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(beforeChild.handle()));
+ if(newShape && beforeElement && beforeElement->item())
+ {
+ int z = beforeElement->item()->zIndex();
+ newElement->createItem();
+ doc->canvas()->insert(newShape->item(), z);
+ }
+ SVGHelperImpl::updateItem(exec, newChild);
+
+ return retVal;
+ }
+ case SVGDOMNodeBridge::ReplaceChild:
+ {
+ DOM::Node newChild = toNode(args[0]);
+ Value retVal = getDOMNode(exec, node.replaceChild(newChild, toNode(args[1])));
+ SVGHelperImpl::updateItem(exec, newChild);
+ return retVal;
+ }
+ case SVGDOMNodeBridge::RemoveChild:
+ {
+ DOM::Node remove = toNode(args[0]);
+ if(remove.isNull())
+ return Undefined();
+
+ // New removeChild logic:
+ // - remove from DOM tree
+ // - delete element (also deletes it's child element's)
+ removeItem(exec, remove);
+ Value retVal = getDOMNode(exec, node.removeChild(remove));
+ return retVal;
+ }
+ case SVGDOMNodeBridge::AppendChild:
+ return appendHelper(exec, node, toNode(args[0]));
+ case SVGDOMNodeBridge::HasAttributes:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(node.handle());
+
+ if(!element)
+ return Undefined();
+
+ return Boolean(element->hasAttributes());
+ }
+ case SVGDOMNodeBridge::HasChildNodes:
+ return Boolean(node.hasChildNodes());
+ case SVGDOMNodeBridge::CloneNode:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(node.handle());
+ SVGElementImpl *newElement = element->cloneNode(args[0].toBoolean(exec));
+
+ return getDOMNode(exec, *newElement);
+ }
+ case SVGDOMNodeBridge::Normalize:
+ {
+ node.normalize();
+ return Undefined();
+ }
+ case SVGDOMNodeBridge::IsSupported:
+ return Boolean(node.isSupported(args[0].toString(exec).string(), args[1].toString(exec).string()));
+ case SVGDOMNodeBridge::AddEventListener:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(node.handle());
+
+ if(element)
+ {
+ SVGEvent::EventId eventId = SVGEvent::typeToId(args[0].toString(exec).string());
+ if(eventId != SVGEvent::UNKNOWN_EVENT)
+ element->setEventListener(eventId, new KSVGEcmaEventListener(Object::dynamicCast(args[1]), QString::null, doc->ecmaEngine()));
+ }
+ return Undefined();
+ }
+ case SVGDOMNodeBridge::RemoveEventListener:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(node.handle());
+
+ if(element)
+ {
+ SVGEvent::EventId eventId = SVGEvent::typeToId(args[0].toString(exec).string());
+ if(eventId != SVGEvent::UNKNOWN_EVENT)
+ element->removeEventListener((int) eventId);
+ }
+ return Undefined();
+ }
+// case SVGDOMNodeBridge::Contains: // TODO
+ case SVGDOMNodeBridge::GetNodeName:
+ return getString(node.nodeName());
+ case SVGDOMNodeBridge::GetNodeValue:
+ return getString(node.nodeValue());
+ case SVGDOMNodeBridge::GetNodeType:
+ return Number(node.nodeType());
+ case SVGDOMNodeBridge::GetParentNode:
+ return getDOMNode(exec, node.parentNode());
+ case SVGDOMNodeBridge::GetChildNodes:
+ return (new SVGDOMNodeListBridge(node.childNodes()))->cache(exec);
+ case SVGDOMNodeBridge::GetFirstChild:
+ return getDOMNode(exec, node.firstChild());
+ case SVGDOMNodeBridge::GetLastChild:
+ return getDOMNode(exec, node.lastChild());
+ case SVGDOMNodeBridge::GetPreviousSibling:
+ return getDOMNode(exec, node.previousSibling());
+ case SVGDOMNodeBridge::GetNextSibling:
+ return getDOMNode(exec, node.nextSibling());
+// case SVGDOMNodeBridge::GetAttributes: // TODO
+ case SVGDOMNodeBridge::GetNamespaceURI:
+ return getString(node.namespaceURI());
+ case SVGDOMNodeBridge::GetPrefix:
+ return getString(node.prefix());
+ case SVGDOMNodeBridge::GetLocalName:
+ return getString(node.localName());
+ case SVGDOMNodeBridge::GetOwnerDocument:
+ return getDOMNode(exec, node.ownerDocument());
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// SVGDOMElementBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMElementBridge::s_hashTable 2
+ tagName SVGDOMElementBridge::TagName DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDOMElementBridgeProto::s_hashTable 17
+ getAttribute SVGDOMElementBridge::GetAttribute DontDelete|Function 1
+ setAttribute SVGDOMElementBridge::SetAttribute DontDelete|Function 2
+ removeAttribute SVGDOMElementBridge::RemoveAttribute DontDelete|Function 1
+ getAttributeNode SVGDOMElementBridge::GetAttributeNode DontDelete|Function 1
+ setAttributeNode SVGDOMElementBridge::SetAttributeNode DontDelete|Function 2
+ removeAttributeNode SVGDOMElementBridge::RemoveAttributeNode DontDelete|Function 1
+ getElementsByTagName SVGDOMElementBridge::GetElementsByTagName DontDelete|Function 1
+ hasAttribute SVGDOMElementBridge::HasAttribute DontDelete|Function 1
+ getAttributeNS SVGDOMElementBridge::GetAttributeNS DontDelete|Function 2
+ setAttributeNS SVGDOMElementBridge::SetAttributeNS DontDelete|Function 3
+ removeAttributeNS SVGDOMElementBridge::RemoveAttributeNS DontDelete|Function 2
+ getAttributeNodeNS SVGDOMElementBridge::GetAttributeNodeNS DontDelete|Function 2
+ setAttributeNodeNS SVGDOMElementBridge::SetAttributeNodeNS DontDelete|Function 1
+ getElementByTagNameNS SVGDOMElementBridge::GetElementsByTagNameNS DontDelete|Function 2
+ hasAttributeNS SVGDOMElementBridge::HasAttributeNS DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMElement", SVGDOMElementBridgeProto, SVGDOMElementBridgeProtoFunc)
+
+Value SVGDOMElementBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case TagName:
+ return getString(m_impl.tagName());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGDOMElementBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMElementBridge)
+ DOM::Element elem = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMElementBridge::GetAttribute:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(elem.handle());
+ if(element)
+ return String(element->getAttribute(args[0].toString(exec).string()));
+ else
+ return Undefined();
+ }
+ case SVGDOMElementBridge::SetAttribute:
+ {
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(elem.handle());
+ if(element)
+ {
+ element->setAttribute(args[0].toString(exec).string(), args[1].toString(exec).string());
+ element->setAttributeInternal(args[0].toString(exec).string(), args[1].toString(exec).string());
+
+ SVGHelperImpl::updateItem(exec, elem);
+ }
+
+ return Undefined();
+ }
+ case SVGDOMElementBridge::RemoveAttribute:
+ {
+ elem.removeAttribute(args[0].toString(exec).string());
+ return Undefined();
+ }
+ case SVGDOMElementBridge::GetAttributeNode:
+ return getDOMNode(exec, elem.getAttributeNode(args[0].toString(exec).string()));
+ case SVGDOMElementBridge::SetAttributeNode: // TODO: Correct?
+ return getDOMNode(exec, elem.setAttributeNode(toNode(args[0])));
+ case SVGDOMElementBridge::RemoveAttributeNode: // TODO: Correct?
+ return getDOMNode(exec, elem.removeAttributeNode(toNode(args[0])));
+ case SVGDOMElementBridge::GetElementsByTagName:
+ return (new SVGDOMNodeListBridge(elem.getElementsByTagName(args[0].toString(exec).string())))->cache(exec);
+ case SVGDOMElementBridge::GetAttributeNS:
+ {
+ // This just skips NS! (Rob)
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(elem.handle());
+ if(element)
+ return String(element->getAttribute(args[1].toString(exec).string()));
+ else
+ return Undefined();
+ }
+ case SVGDOMElementBridge::SetAttributeNS:
+ {
+ // For now, we strip the NS part (Rob)
+ DOM::DOMString attr = args[1].toString(exec).string();
+ int pos = attr.string().find(':');
+ if(pos > -1)
+ attr = attr.string().mid(pos + 1);
+
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+ SVGElementImpl *element = doc->getElementFromHandle(elem.handle());
+ if(element)
+ {
+ element->setAttribute(attr.string(), args[2].toString(exec).string());
+ element->setAttributeInternal(attr.string(), args[2].toString(exec).string());
+
+ SVGHelperImpl::updateItem(exec, *element);
+ }
+
+ return Undefined();
+ }
+ case SVGDOMElementBridge::RemoveAttributeNS:
+ {
+ elem.removeAttributeNS(args[0].toString(exec).string(), args[1].toString(exec).string());
+ return Undefined();
+ }
+ case SVGDOMElementBridge::GetAttributeNodeNS:
+ return getDOMNode(exec, elem.getAttributeNodeNS(args[0].toString(exec).string(), args[1].toString(exec).string()));
+ case SVGDOMElementBridge::SetAttributeNodeNS: // TODO: Correct?
+ return getDOMNode(exec, elem.setAttributeNodeNS(toNode(args[0])));
+ case SVGDOMElementBridge::GetElementsByTagNameNS:
+ return (new SVGDOMNodeListBridge(elem.getElementsByTagNameNS(args[0].toString(exec).string(), args[1].toString(exec).string())))->cache(exec);
+ case SVGDOMElementBridge::HasAttribute:
+ return Boolean(elem.hasAttribute(args[0].toString(exec).string()));
+ case SVGDOMElementBridge::HasAttributeNS:
+ return Boolean(elem.hasAttributeNS(args[0].toString(exec).string(), args[1].toString(exec).string()));
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+
+// SVGDOMNodeListBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMNodeListBridge::s_hashTable 2
+ length SVGDOMNodeListBridge::Length DontDelete
+@end
+@namespace KSVG
+@begin SVGDOMNodeListBridgeProto::s_hashTable 3
+ getLength SVGDOMNodeListBridge::GetLength DontDelete|Function 0
+ item SVGDOMNodeListBridge::Item DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMNodeList", SVGDOMNodeListBridgeProto, SVGDOMNodeListBridgeProtoFunc)
+
+Value SVGDOMNodeListBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Length:
+ return Number(m_impl.length());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGDOMNodeListBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMNodeListBridge)
+ DOM::NodeList nodeList = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMNodeListBridge::GetLength:
+ return Number(nodeList.length());
+ case SVGDOMNodeListBridge::Item:
+ return getDOMNode(exec, nodeList.item((unsigned long)args[0].toNumber(exec)));
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// SVGDOMCharacterDataBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMCharacterDataBridge::s_hashTable 3
+ data SVGDOMCharacterDataBridge::Data DontDelete
+ length SVGDOMCharacterDataBridge::Length DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDOMCharacterDataBridgeProto::s_hashTable 11
+ getData SVGDOMCharacterDataBridge::GetData DontDelete|Function 0
+ setData SVGDOMCharacterDataBridge::SetData DontDelete|Function 1
+ getLength SVGDOMCharacterDataBridge::GetLength DontDelete|Function 0
+ substringData SVGDOMCharacterDataBridge::SubstringData DontDelete|Function 2
+ appendData SVGDOMCharacterDataBridge::AppendData DontDelete|Function 1
+ insertData SVGDOMCharacterDataBridge::InsertData DontDelete|Function 2
+ deleteData SVGDOMCharacterDataBridge::DeleteData DontDelete|Function 2
+ replaceData SVGDOMCharacterDataBridge::ReplaceData DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMCharacterData", SVGDOMCharacterDataBridgeProto, SVGDOMCharacterDataBridgeProtoFunc)
+
+Value SVGDOMCharacterDataBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Data:
+ return String(m_impl.data());
+ case Length:
+ return Number(m_impl.length());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGDOMCharacterDataBridge::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case Data:
+ m_impl.setData(value.toString(exec).string());
+ updateTextItem(exec, m_impl);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGDOMCharacterDataBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMCharacterDataBridge)
+ DOM::CharacterData node = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMCharacterDataBridge::GetData:
+ return String(node.data());
+ case SVGDOMCharacterDataBridge::SetData:
+ node.setData(args[0].toString(exec).string());
+ updateTextItem(exec, node);
+ return Undefined();
+ case SVGDOMCharacterDataBridge::GetLength:
+ return Number(node.length());
+ case SVGDOMCharacterDataBridge::SubstringData:
+ {
+ DOM::DOMString ret = node.substringData(args[0].toInteger(exec), args[1].toInteger(exec));
+ updateTextItem(exec, node);
+ return String(ret);
+ }
+ case SVGDOMCharacterDataBridge::AppendData:
+ node.appendData(args[0].toString(exec).string());
+ updateTextItem(exec, node);
+ return Undefined();
+ case SVGDOMCharacterDataBridge::InsertData:
+ node.insertData(args[0].toInteger(exec), args[1].toString(exec).string());
+ updateTextItem(exec, node);
+ return Undefined();
+ case SVGDOMCharacterDataBridge::DeleteData:
+ node.deleteData(args[0].toInteger(exec), args[1].toInteger(exec));
+ updateTextItem(exec, node);
+ return Undefined();
+ case SVGDOMCharacterDataBridge::ReplaceData:
+ node.replaceData(args[0].toInteger(exec), args[1].toInteger(exec), args[2].toString(exec).string());
+ updateTextItem(exec, node);
+ return Undefined();
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// SVGDOMTextBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMTextBridge::s_hashTable 2
+ dummy SVGDOMTextBridge::Dummy DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDOMTextBridgeProto::s_hashTable 2
+ splitText SVGDOMTextBridge::SplitText DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMText", SVGDOMTextBridgeProto, SVGDOMTextBridgeProtoFunc)
+
+Value SVGDOMTextBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGDOMTextBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMTextBridge)
+ DOM::Text node = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMTextBridge::SplitText:
+ return getDOMNode(exec, node.splitText(args[0].toInteger(exec)));
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// SVGDOMDOMImplementationBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMDOMImplementationBridge::s_hashTable 2
+ dummy SVGDOMDOMImplementationBridge::Dummy DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGDOMDOMImplementationBridgeProto::s_hashTable 2
+ hasFeature SVGDOMDOMImplementationBridge::HasFeature DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("DOMDOMImplementation", SVGDOMDOMImplementationBridgeProto, SVGDOMDOMImplementationBridgeProtoFunc)
+
+Value SVGDOMDOMImplementationBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGDOMDOMImplementationBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGDOMDOMImplementationBridge)
+ DOM::DOMImplementation node = obj->impl();
+
+ switch(id)
+ {
+ case SVGDOMDOMImplementationBridge::HasFeature:
+ return Boolean(node.hasFeature(args[0].toString(exec).string(), args[1].toString(exec).string()));
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// SVGDOMDocumentFragmentBridge
+
+/*
+@namespace KSVG
+@begin SVGDOMDocumentFragmentBridge::s_hashTable 2
+ dummy SVGDOMDocumentFragmentBridge::Dummy DontDelete|ReadOnly
+@end
+*/
+
+Value SVGDOMDocumentFragmentBridge::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEcma.h b/ksvg/impl/SVGEcma.h
new file mode 100644
index 00000000..adf1ec85
--- /dev/null
+++ b/ksvg/impl/SVGEcma.h
@@ -0,0 +1,250 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGEcma_H
+#define SVGEcma_H
+
+#include <dom/dom_doc.h>
+#include <dom/dom_node.h>
+#include <dom/dom_text.h>
+#include <dom/dom_element.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+// Access DOM::Node via js
+class SVGDOMNodeBridge
+{
+public:
+ SVGDOMNodeBridge(DOM::Node impl) : m_impl(impl) { KSVG_EMPTY_FLAGS }
+ virtual ~SVGDOMNodeBridge() { }
+
+ DOM::Node impl() const { return m_impl; }
+
+ KSVG_BASECLASS_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ NodeName, NodeValue, NodeType, ParentNode,
+ ChildNodes, FirstChild, LastChild, PreviousSibling,
+ NextSibling, Attributes, NamespaceURI, Prefix,
+ LocalName, OwnerDocument,
+ // Functions
+ InsertBefore, ReplaceChild, RemoveChild, AppendChild,
+ HasAttributes, HasChildNodes, CloneNode, Normalize,
+ IsSupported, AddEventListener, RemoveEventListener, Contains,
+ GetNodeName, GetNodeValue, GetNodeType, GetParentNode,
+ GetChildNodes, GetFirstChild, GetLastChild, GetPreviousSibling,
+ GetNextSibling, GetAttributes, GetNamespaceURI, GetPrefix,
+ GetLocalName, GetOwnerDocument
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+
+private:
+ DOM::Node m_impl;
+};
+
+// Access DOM::Element via js
+class SVGDOMElementBridge : public SVGDOMNodeBridge
+{
+public:
+ SVGDOMElementBridge(DOM::Element impl) : SVGDOMNodeBridge(static_cast<DOM::Node>(impl)), m_impl(impl) { }
+ ~SVGDOMElementBridge() { }
+
+ DOM::Element impl() const { return m_impl; }
+
+ KSVG_GET
+ KSVG_FORWARDPUT
+
+ enum
+ {
+ // Properties
+ TagName,
+ // Functions
+ GetAttribute, SetAttribute, RemoveAttribute, GetAttributeNode,
+ SetAttributeNode, RemoveAttributeNode, GetElementsByTagName,
+ GetAttributeNS, SetAttributeNS, RemoveAttributeNS, GetAttributeNodeNS,
+ SetAttributeNodeNS, GetElementsByTagNameNS, HasAttribute, HasAttributeNS
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+private:
+ DOM::Element m_impl;
+};
+
+// Access DOM::NodeList via js
+class SVGDOMNodeListBridge
+{
+public:
+ SVGDOMNodeListBridge(DOM::NodeList impl) : m_impl(impl) { }
+ ~SVGDOMNodeListBridge() { }
+
+ DOM::NodeList impl() const { return m_impl; }
+
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ Length,
+ // Functions
+ GetLength, Item
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+private:
+ DOM::NodeList m_impl;
+};
+
+// Access DOM::CharacterData via js
+class SVGDOMCharacterDataBridge : public SVGDOMNodeBridge
+{
+public:
+ SVGDOMCharacterDataBridge(DOM::CharacterData impl) : SVGDOMNodeBridge(static_cast<DOM::Node>(impl)), m_impl(impl) { KSVG_EMPTY_FLAGS }
+ ~SVGDOMCharacterDataBridge() { }
+
+ DOM::CharacterData impl() const { return m_impl; }
+
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Data, Length,
+ // Functions
+ GetData, SetData, GetLength,
+ SubstringData, AppendData, InsertData, DeleteData, ReplaceData
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+
+private:
+ DOM::CharacterData m_impl;
+};
+
+// Access DOM::Text via js
+class SVGDOMTextBridge : public SVGDOMCharacterDataBridge
+{
+public:
+ SVGDOMTextBridge(DOM::Text impl) : SVGDOMCharacterDataBridge(static_cast<DOM::CharacterData>(impl)), m_impl(impl) { }
+ ~SVGDOMTextBridge() { }
+
+ DOM::Text impl() const { return m_impl; }
+
+ KSVG_GET
+ KSVG_FORWARDPUT
+
+ enum
+ {
+ // Properties
+ Dummy,
+ // Functions
+ SplitText
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+private:
+ DOM::Text m_impl;
+};
+
+// Access DOM::DOMImplementation via js
+class SVGDOMDOMImplementationBridge
+{
+public:
+ SVGDOMDOMImplementationBridge(DOM::DOMImplementation impl) : m_impl(impl) { }
+ ~SVGDOMDOMImplementationBridge() { }
+
+ DOM::DOMImplementation impl() const { return m_impl; }
+
+ KSVG_GET
+ KSVG_FORWARDPUT
+
+ enum
+ {
+ // Properties
+ Dummy,
+ // Functions
+ HasFeature
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+private:
+ DOM::DOMImplementation m_impl;
+};
+
+// Access DOM::DocumentFragment via js
+class SVGDOMDocumentFragmentBridge : public SVGDOMNodeBridge
+{
+public:
+ SVGDOMDocumentFragmentBridge(DOM::DocumentFragment impl) : SVGDOMNodeBridge(static_cast<DOM::Node>(impl)), m_impl(impl) { }
+ ~SVGDOMDocumentFragmentBridge() { }
+
+ DOM::DocumentFragment impl() const { return m_impl; }
+
+ KSVG_GET
+ KSVG_FORWARDPUT
+
+ enum
+ {
+ // Properties
+ Dummy
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+private:
+ DOM::DocumentFragment m_impl;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMNodeBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMNodeBridgeProtoFunc, SVGDOMNodeBridge)
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMElementBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMElementBridgeProtoFunc, SVGDOMElementBridge)
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMNodeListBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMNodeListBridgeProtoFunc, SVGDOMNodeListBridge)
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMCharacterDataBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMCharacterDataBridgeProtoFunc, SVGDOMCharacterDataBridge)
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMTextBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMTextBridgeProtoFunc, SVGDOMTextBridge)
+
+KSVG_DEFINE_PROTOTYPE(SVGDOMDOMImplementationBridgeProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGDOMDOMImplementationBridgeProtoFunc, SVGDOMDOMImplementationBridge)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementImpl.cc b/ksvg/impl/SVGElementImpl.cc
new file mode 100644
index 00000000..2f3d70c6
--- /dev/null
+++ b/ksvg/impl/SVGElementImpl.cc
@@ -0,0 +1,713 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qxml.h>
+
+#include <kdebug.h>
+
+#include "SVGEvent.h"
+#include "SVGEventImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecma.h"
+
+SVGElementImpl::Factory *SVGElementImpl::Factory::m_instance = 0;
+
+SVGElementImpl::SVGElementImpl(DOM::ElementImpl *impl) : DOM::DomShared(), DOM::Element(impl), SVGDOMElementBridge(static_cast<DOM::Element>(*this))
+{
+ KSVG_EMPTY_FLAGS
+
+ m_ownerSVGElement = 0;
+ m_viewportElement = 0;
+ m_ownerDoc = 0;
+
+ m_mouseOver = false;
+ m_focus = false;
+
+ m_eventListeners.setAutoDelete(true);
+ m_attributes.setAutoDelete(true);
+}
+
+SVGElementImpl::~SVGElementImpl()
+{
+ if(m_ownerSVGElement)
+ m_ownerSVGElement->deref();
+}
+
+void SVGElementImpl::setEventListener(int id, SVGEventListener *listener)
+{
+ if(listener)
+ listener->ref();
+
+ removeEventListener(id);
+
+ if(listener)
+ {
+ SVGRegisteredEventListener *rl = new SVGRegisteredEventListener(static_cast<SVGEvent::EventId>(id), listener, false);
+ m_eventListeners.append(rl);
+
+ listener->deref();
+ }
+}
+
+int SVGElementImpl::getEventListeners(bool local)
+{
+ int events = 0;
+
+ QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ for(; it.current(); ++it)
+ events |= (1 << it.current()->id);
+
+ if(local)
+ return events;
+
+ for(DOM::Node node = parentNode(); !node.isNull(); node = node.parentNode())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+
+ if(element)
+ {
+ QPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
+ for(; it.current(); ++it)
+ events |= (1 << it.current()->id);
+ }
+ }
+
+ return events;
+}
+
+void SVGElementImpl::setupEventListeners(SVGDocumentImpl *doc, SVGDocumentImpl *newDoc)
+{
+ if(!doc || !newDoc)
+ return;
+
+ // Changes the document where the eventlisteners are registered
+ // Needed for parseXML'ed elements with events, their listeners
+ // are created in the temporary document fragment and need to be
+ // registered in the main document (Niko)
+ QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ for(; it.current(); ++it)
+ {
+ SVGRegisteredEventListener *current = it.current();
+
+ QString valueOfCurrent = newDoc->ecmaEngine()->valueOfEventListener(current->listener);
+ setEventListener(current->id, doc->createEventListener(valueOfCurrent));
+ }
+}
+
+bool SVGElementImpl::hasEventListener(int id, bool local)
+{
+ // First check if we have the listener, locally
+ QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ for(; it.current(); ++it)
+ {
+ if(it.current()->id == id)
+ return true;
+ }
+
+ // We have no local listeners, if we are just interessted
+ // in those listeners, then return now...
+ if(local)
+ return false;
+
+ // Check every parent element
+ for(DOM::Node node = parentNode(); !node.isNull(); node = node.parentNode())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+
+ if(element)
+ {
+ QPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
+ for(; it.current(); ++it)
+ {
+ if(it.current()->id == id)
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+void SVGElementImpl::removeEventListener(int id)
+{
+ QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ for(; it.current(); ++it)
+ {
+ if(it.current()->id == id)
+ {
+ m_eventListeners.removeRef(it.current());
+ break;
+ }
+ }
+}
+
+void SVGElementImpl::handleLocalEvents(SVGEventImpl *evt, bool useCapture)
+{
+ QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ for(; it.current(); ++it)
+ {
+ if(it.current()->id == evt->id() && it.current()->useCapture == useCapture)
+ {
+ it.current()->listener->handleEvent(evt);
+ break;
+ }
+ }
+}
+
+void SVGElementImpl::defaultEventHandler(SVGEventImpl *)
+{
+}
+
+/*
+@namespace KSVG
+@begin SVGElementImpl::s_hashTable 23
+ id SVGElementImpl::ElementId DontDelete
+ ownerSVGElement SVGElementImpl::OwnerSvgElement DontDelete|ReadOnly
+ viewportElement SVGElementImpl::ViewportElement DontDelete|ReadOnly
+ xmlbase SVGElementImpl::XmlBase DontDelete
+ base SVGElementImpl::XmlBase DontDelete
+ onmouseup SVGElementImpl::OnMouseUp DontDelete
+ onmousedown SVGElementImpl::OnMouseDown DontDelete
+ onmousemove SVGElementImpl::OnMouseMove DontDelete
+ onmouseover SVGElementImpl::OnMouseOver DontDelete
+ onmouseout SVGElementImpl::OnMouseOut DontDelete
+ onclick SVGElementImpl::OnClick DontDelete
+ onmouseclick SVGElementImpl::OnClick DontDelete
+ onactivate SVGElementImpl::OnActivate DontDelete
+ onkeydown SVGElementImpl::OnKeyDown DontDelete
+ onkeyup SVGElementImpl::OnKeyUp DontDelete
+ onkeypress SVGElementImpl::OnKeyPress DontDelete
+ onload SVGElementImpl::OnLoad DontDelete
+ onfocusin SVGElementImpl::OnFocusIn DontDelete
+ onfocusout SVGElementImpl::OnFocusOut DontDelete
+ onerror SVGElementImpl::OnError DontDelete
+ onabort SVGElementImpl::OnAbort DontDelete
+@end
+@namespace KSVG
+@begin SVGElementImplProto::s_hashTable 5
+ getStyle SVGElementImpl::GetStyle DontDelete|Function 0
+ setProperty SVGElementImpl::SetProperty DontDelete|Function 2
+ getPropertyValue SVGElementImpl::GetPropertyValue DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGElement", SVGElementImplProto, SVGElementImplProtoFunc)
+
+Value SVGElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ElementId:
+ return String(id().string());
+ case XmlBase:
+ return String(xmlbase().string());
+ case OwnerSvgElement:
+ return getDOMNode(exec, *ownerSVGElement());
+ case ViewportElement:
+ return getDOMNode(exec, *viewportElement());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case ElementId:
+ setId(value.toString(exec).string());
+ break;
+ case XmlBase:
+ setXmlbase(value.toString(exec).string());
+ break;
+ case OnMouseUp:
+ setEventListener(SVGEvent::MOUSEUP_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnMouseDown:
+ setEventListener(SVGEvent::MOUSEDOWN_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnMouseMove:
+ setEventListener(SVGEvent::MOUSEMOVE_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnMouseOver:
+ setEventListener(SVGEvent::MOUSEOVER_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnMouseOut:
+ setEventListener(SVGEvent::MOUSEOUT_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnClick:
+ setEventListener(SVGEvent::CLICK_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnActivate:
+ setEventListener(SVGEvent::DOMACTIVATE_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnKeyDown:
+ setEventListener(SVGEvent::KEYDOWN_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnKeyUp:
+ setEventListener(SVGEvent::KEYUP_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnKeyPress:
+ setEventListener(SVGEvent::KEYPRESS_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnLoad:
+ setEventListener(SVGEvent::LOAD_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnFocusIn:
+ setEventListener(SVGEvent::DOMFOCUSIN_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnFocusOut:
+ setEventListener(SVGEvent::DOMFOCUSOUT_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnError:
+ setEventListener(SVGEvent::ERROR_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ case OnAbort:
+ setEventListener(SVGEvent::ABORT_EVENT, m_ownerDoc->createEventListener(value.toString(exec).string()));
+ break;
+ default:
+ kdWarning() << k_funcinfo << "unhandled token " << token << endl;
+ }
+}
+
+Value SVGElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGElementImpl)
+
+ switch(id)
+ {
+ case SVGElementImpl::GetStyle:
+ return obj->cache(exec);
+ case SVGElementImpl::SetProperty:
+ {
+ DOM::DOMString attribute = args[0].toString(exec).qstring().lower();
+ DOM::DOMString value = args[1].toString(exec).qstring();
+ obj->setAttribute(attribute, value);
+ break;
+ }
+ case SVGElementImpl::GetPropertyValue:
+ return String(obj->getAttribute(args[0].toString(exec).qstring()));
+ default:
+ break;
+ }
+
+ return Undefined();
+}
+
+QDict<DOM::DOMString> &SVGElementImpl::attributes()
+{
+ return m_attributes;
+}
+
+// khtml overrides
+void SVGElementImpl::setAttribute(const DOM::DOMString &name, const DOM::DOMString &value)
+{
+ m_attributes.replace(name.string(), new DOM::DOMString(value));
+}
+
+// Changes internal value. This will have no effect on getAttribute().
+void SVGElementImpl::setAttributeInternal(const DOM::DOMString &name, const DOM::DOMString &value)
+{
+ ExecState *exec = ownerDoc()->ecmaEngine()->globalExec();
+
+ static_cast<KSVGScriptInterpreter *>(exec->interpreter())->setAttributeSetMode(true);
+ bridge(exec)->put(exec, Identifier(UString(name)), String(value), KJS::Internal);
+ static_cast<KSVGScriptInterpreter *>(exec->interpreter())->setAttributeSetMode(false);
+}
+
+// This gets the actual attribute as set in the svg source
+DOM::DOMString SVGElementImpl::getAttribute(const DOM::DOMString &name) const
+{
+ DOM::DOMString *result = m_attributes[name.string()];
+ if(result)
+ return *result;
+ else
+ return DOM::DOMString();
+}
+
+// This gets the internal, real-time value. This means it can return a default value
+// for an attribute even if its not explicitly set in the svg source.
+DOM::DOMString SVGElementImpl::getAttributeInternal(const DOM::DOMString &name)
+{
+ ExecState *exec = ownerDoc()->ecmaEngine()->globalExec();
+
+ DOM::DOMString retVal;
+
+ static_cast<KSVGScriptInterpreter *>(exec->interpreter())->setAttributeGetMode(true);
+ retVal = bridge(exec)->get(exec, Identifier(UString(name))).toString(exec).string();
+ static_cast<KSVGScriptInterpreter *>(exec->interpreter())->setAttributeGetMode(false);
+
+ return retVal;
+}
+
+bool SVGElementImpl::hasAttribute(const DOM::DOMString &name)
+{
+ return m_attributes.find(name.string()) != 0;
+}
+
+bool SVGElementImpl::hasAttributes()
+{
+ return m_attributes.count() > 0;
+}
+
+void SVGElementImpl::setApplyAttribute(const QString &name, const QString &value)
+{
+ if(hasAttribute(name))
+ {
+ QString cur = getAttribute(name).string();
+ cur = cur.simplifyWhiteSpace();
+
+ if(!cur.endsWith(";"))
+ cur += "; ";
+
+ cur += value;
+
+ setAttribute(name, cur);
+ }
+ else
+ setAttribute(name, value);
+}
+
+void SVGElementImpl::setId(DOM::DOMString id)
+{
+ setAttribute("id", id);
+
+ if(ownerDoc() && ownerDoc()->rootElement() && !id.isEmpty())
+ ownerDoc()->rootElement()->addToIdMap(id.string(), this);
+ else if(m_ownerSVGElement && !id.isEmpty())
+ m_ownerSVGElement->addToIdMap(id.string(), this);
+}
+
+DOM::DOMString SVGElementImpl::id() const
+{
+ return getAttribute("id");
+}
+
+void SVGElementImpl::setXmlbase(DOM::DOMString xmlbase)
+{
+ setAttribute("xml:base", xmlbase);
+}
+
+DOM::DOMString SVGElementImpl::xmlbase() const
+{
+ return getAttribute("xml:base");
+}
+
+void SVGElementImpl::setOwnerSVGElement(SVGSVGElementImpl *owner)
+{
+ if(m_ownerSVGElement)
+ m_ownerSVGElement->deref();
+
+ m_ownerSVGElement = owner;
+
+ if(m_ownerSVGElement)
+ m_ownerSVGElement->ref();
+}
+
+void SVGElementImpl::setViewportElement(SVGElementImpl *viewport)
+{
+ if(m_viewportElement)
+ m_viewportElement->deref();
+
+ m_viewportElement = viewport;
+
+ if(m_viewportElement)
+ m_viewportElement->ref();
+}
+
+SVGSVGElementImpl *SVGElementImpl::ownerSVGElement() const
+{
+ return m_ownerSVGElement;
+}
+
+SVGElementImpl *SVGElementImpl::viewportElement() const
+{
+ return m_viewportElement;
+}
+
+void SVGElementImpl::setAttributes(const QXmlAttributes &attrs)
+{
+ for(int i = 0; i < attrs.length(); i++)
+ {
+ setAttribute(attrs.localName(i), attrs.value(i));
+ setAttributeInternal(attrs.localName(i), attrs.value(i));
+ }
+
+ setAttributes();
+}
+
+void SVGElementImpl::setAttributes()
+{
+ // Finalize style
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
+
+ if(style)
+ style->processStyle();
+}
+
+void SVGElementImpl::setAttributes(bool deep)
+{
+ // Finalize style
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
+
+ if(style)
+ style->processStyle();
+
+ if(deep)
+ {
+ if(hasChildNodes())
+ {
+ DOM::Node n;
+ for(n = firstChild(); !n.isNull(); n = n.nextSibling())
+ {
+ SVGElementImpl *elem = ownerDoc()->getElementFromHandle(n.handle());
+ if(elem)
+ elem->setAttributes(true);
+ }
+ }
+ }
+}
+
+bool SVGElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev)
+{
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
+ if(shape)
+ return shape->prepareMouseEvent(p, a, mev);
+
+ return false;
+}
+
+bool SVGElementImpl::dispatchEvent(int id, bool canBubbleArg, bool cancelableArg)
+{
+ SVGEventImpl *evt = new SVGEventImpl(static_cast<SVGEvent::EventId>(id), canBubbleArg, cancelableArg);
+
+ evt->ref();
+ bool ret = dispatchEvent(evt, true);
+ evt->deref();
+
+ return ret;
+}
+
+bool SVGElementImpl::dispatchEvent(SVGEventImpl *evt, bool tempEvent)
+{
+ evt->setTarget(this);
+
+ // Find out, where to send to -> collect parent nodes
+ QPtrList<SVGElementImpl> nodeChain;
+
+ for(DOM::Element e = *this; !e.isNull(); e = e.parentNode())
+ nodeChain.prepend(ownerDoc()->getElementFromHandle(e.handle()));
+
+ // Trigger any capturing event handlers on our way down
+ evt->setEventPhase(DOM::Event::CAPTURING_PHASE);
+
+ QPtrListIterator<SVGElementImpl> it(nodeChain);
+ for(; it.current() && it.current() != this && !evt->propagationStopped(); ++it)
+ {
+ evt->setCurrentTarget(it.current());
+
+ if(it.current())
+ it.current()->handleLocalEvents(evt, true);
+ }
+
+ // Dispatch to the actual target node
+ it.toLast();
+ if(!evt->propagationStopped())
+ {
+ evt->setEventPhase(DOM::Event::AT_TARGET);
+ evt->setCurrentTarget(it.current());
+
+ if(it.current())
+ it.current()->handleLocalEvents(evt, false);
+ }
+
+ --it;
+
+ // Bubble up again
+ if(evt->bubbles())
+ {
+ evt->setEventPhase(DOM::Event::BUBBLING_PHASE);
+ for(; it.current() && !evt->propagationStopped(); --it)
+ {
+ evt->setCurrentTarget(it.current());
+
+ if(it.current())
+ it.current()->handleLocalEvents(evt, false);
+ }
+ }
+
+ evt->setCurrentTarget(0);
+ evt->setEventPhase(0); // I guess this is correct, the spec does not seem to say
+ // anything about the default event handler phase.
+
+ if(evt->bubbles())
+ {
+ // now we call all default event handlers (this is not part of DOM - it is internal to ksvg)
+ it.toLast();
+ for(; it.current() && !evt->propagationStopped() && !evt->defaultPrevented() && !evt->defaultHandled(); --it)
+ it.current()->defaultEventHandler(evt);
+ }
+
+ // If tempEvent is true, this means that the DOM implementation will not be storing a reference to the event, i.e.
+ // there is no way to retrieve it from javascript if a script does not already have a reference to it in a variable.
+ // So there is no need for the interpreter to keep the event in its cache
+ if(tempEvent)
+ ownerDoc()->ecmaEngine()->finishedWithEvent(evt);
+
+ return !evt->defaultPrevented(); // ### what if defaultPrevented was called before dispatchEvent?
+}
+
+bool SVGElementImpl::dispatchKeyEvent(QKeyEvent *ke)
+{
+ DOM::AbstractView temp;
+
+ SVGEvent::EventId evtId = SVGEvent::UNKNOWN_EVENT;
+
+ if(ke->type() == QEvent::KeyRelease && !ke->isAutoRepeat())
+ evtId = SVGEvent::KEYUP_EVENT;
+ else if(ke->isAutoRepeat())
+ evtId = SVGEvent::KEYPRESS_EVENT;
+ else if(ke->type() == QEvent::KeyPress)
+ evtId = SVGEvent::KEYDOWN_EVENT;
+
+ if(evtId == SVGEvent::KEYUP_EVENT && hasEventListener(SVGEvent::DOMACTIVATE_EVENT, false))
+ dispatchEvent(SVGEvent::DOMACTIVATE_EVENT, true, true);
+
+ if(!hasEventListener(evtId, false))
+ return false;
+
+ SVGEventImpl *evt = new SVGKeyEventImpl(ke, temp, evtId);
+
+ evt->ref();
+ bool ret = dispatchEvent(evt, true);
+ evt->deref();
+
+ // Rerender now! Once! (Niko)
+ ownerDoc()->rerender();
+
+ return ret;
+}
+
+bool SVGElementImpl::dispatchMouseEvent(int id, bool canBubbleArg, bool cancelableArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, unsigned short buttonArg, SVGElementImpl *relatedTargetArg)
+{
+ DOM::AbstractView temp;
+
+ SVGEventImpl *evt = new SVGMouseEventImpl(static_cast<SVGEvent::EventId>(id),
+ canBubbleArg, cancelableArg, temp, detailArg,
+ screenXArg, screenYArg,
+ clientXArg, clientYArg,
+ ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg,
+ buttonArg, relatedTargetArg);
+
+ evt->ref();
+ bool ret = dispatchEvent(evt, true);
+ evt->deref();
+
+ return ret;
+}
+
+void SVGElementImpl::setOwnerDoc(SVGDocumentImpl *doc)
+{
+ if(m_ownerDoc)
+ m_ownerDoc->removeFromElemDict(handle());
+
+ m_ownerDoc = doc;
+
+ if(m_ownerDoc)
+ m_ownerDoc->addToElemDict(handle(), this);
+}
+
+SVGDocumentImpl *SVGElementImpl::ownerDoc() const
+{
+ return m_ownerDoc;
+}
+
+SVGElementImpl *SVGElementImpl::cloneNode(bool deep)
+{
+ DOM::Element impl = static_cast<DOM::Document *>(ownerDoc())->createElementNS("", tagName());
+ SVGElementImpl *newElement = SVGDocumentImpl::createElement(tagName(), impl.cloneNode(false), ownerDoc());
+ newElement->setOwnerSVGElement(ownerSVGElement());
+ newElement->setViewportElement(viewportElement());
+
+ SVGHelperImpl::copyAttributes(this, newElement);
+
+ // Recalc style
+ //newElement->setAttributes();
+
+ if(deep)
+ cloneChildNodes(newElement);
+
+ return newElement;
+}
+
+void SVGElementImpl::cloneChildNodes(SVGElementImpl *clone)
+{
+ DOM::Node n;
+ for(n = firstChild(); !n.isNull(); n = n.nextSibling())
+ {
+ SVGElementImpl *elem = ownerDoc()->getElementFromHandle(n.handle());
+ if(elem)
+ clone->appendChild(*elem->cloneNode(true));
+ else if(n.nodeType() == DOM::Node::TEXT_NODE)
+ clone->appendChild(n.cloneNode(true));
+ }
+}
+
+void SVGElementImpl::gotError(const QString &errorDesc)
+{
+ if(ownerDoc())
+ {
+ ownerDoc()->finishParsing(true, errorDesc);
+ if(hasEventListener(SVGEvent::ERROR_EVENT, true))
+ dispatchEvent(SVGEvent::ERROR_EVENT, false, false);
+ }
+}
+
+QString SVGElementImpl::collectText()
+{
+ QString text;
+
+ if(hasChildNodes())
+ {
+ DOM::Node node = firstChild();
+
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ if(node.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ DOM::Text textNode = node;
+ text += textNode.data().string();
+ }
+ }
+ }
+
+ return text;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementImpl.h b/ksvg/impl/SVGElementImpl.h
new file mode 100644
index 00000000..c69a83e8
--- /dev/null
+++ b/ksvg/impl/SVGElementImpl.h
@@ -0,0 +1,229 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElementImpl_H
+#define SVGElementImpl_H
+
+#include <map>
+#include <string>
+
+#include <qdict.h>
+#include <qptrlist.h>
+
+#include <dom/dom_string.h>
+
+#include "SVGEcma.h"
+
+#include "ksvg_lookup.h"
+
+class QKeyEvent;
+class QXmlAttributes;
+
+namespace KJS
+{
+ class Value;
+ class UString;
+ class ExecState;
+}
+
+namespace KSVG
+{
+
+class KSVGCanvas;
+class SVGEventImpl;
+class SVGDocumentImpl;
+class SVGEventListener;
+class SVGSVGElementImpl;
+class SVGMouseEventImpl;
+class SVGRegisteredEventListener;
+class SVGElementImpl : virtual public DOM::DomShared,
+ public DOM::Element,
+ public SVGDOMElementBridge
+{
+public:
+ SVGElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGElementImpl();
+
+ // Attribute setting
+ // "Override" khtml's functions with ours
+ void setAttribute(const DOM::DOMString &name, const DOM::DOMString &value);
+ void setAttributeInternal(const DOM::DOMString &name, const DOM::DOMString &value);
+ DOM::DOMString getAttribute(const DOM::DOMString &name) const;
+ DOM::DOMString getAttributeInternal(const DOM::DOMString &name);
+ bool hasAttribute(const DOM::DOMString &name);
+ bool hasAttributes();
+
+ QDict<DOM::DOMString> &attributes();
+ void setApplyAttribute(const QString &name, const QString &value);
+
+ void setId(DOM::DOMString);
+ DOM::DOMString id() const;
+
+ void setXmlbase(DOM::DOMString);
+ DOM::DOMString xmlbase() const;
+
+ void setOwnerSVGElement(SVGSVGElementImpl *owner);
+ void setViewportElement(SVGElementImpl *viewport);
+
+ SVGSVGElementImpl *ownerSVGElement() const;
+ SVGElementImpl *viewportElement() const;
+
+ void setAttributes(const QXmlAttributes &);
+ virtual void setAttributes();
+ void setAttributes(bool deep);
+
+ QString collectText();
+
+ void setOwnerDoc(SVGDocumentImpl *doc);
+ SVGDocumentImpl *ownerDoc() const;
+
+ virtual SVGElementImpl *cloneNode(bool deep);
+ void cloneChildNodes(SVGElementImpl *clone);
+
+ // Event stuff
+ bool dispatchEvent(int id, bool canBubbleArg, bool cancelableArg);
+ bool dispatchEvent(SVGEventImpl *evt, bool tempEvent);
+ bool dispatchMouseEvent(int id, bool canBubbleArg, bool cancelableArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, unsigned short buttonArg, SVGElementImpl *relatedTargetArg);
+ bool dispatchKeyEvent(QKeyEvent *ke);
+
+ void setEventListener(int id, SVGEventListener *listener);
+ bool hasEventListener(int id, bool local);
+ int getEventListeners(bool local);
+ void removeEventListener(int id);
+ void setupEventListeners(SVGDocumentImpl *doc, SVGDocumentImpl *newDoc);
+
+ // Use with care! Internal only.
+ const QPtrList<SVGRegisteredEventListener> &eventListeners() { return m_eventListeners; }
+
+ void handleLocalEvents(SVGEventImpl *evt, bool useCapture);
+ virtual void defaultEventHandler(SVGEventImpl *evt);
+
+ bool mouseOver() { return m_mouseOver; }
+ void setMouseOver(bool v) { m_mouseOver = v; }
+
+ bool focus() { return m_focus; }
+ void setFocus(bool v) { m_focus = v; }
+
+ virtual bool prepareMouseEvent(const QPoint &, const QPoint &, SVGMouseEventImpl *);
+
+ virtual void createItem(KSVGCanvas *c = 0) { Q_UNUSED(c); }
+ virtual void removeItem(KSVGCanvas *c) { Q_UNUSED(c); }
+
+ // Element creation
+ typedef SVGElementImpl *(*FactoryFn)(DOM::ElementImpl *impl);
+ class Factory
+ {
+ public:
+ static Factory *self()
+ {
+ if(!m_instance)
+ m_instance = new Factory();
+
+ return m_instance;
+ }
+
+ void announce(SVGElementImpl::FactoryFn factoryFn, const std::string &tag)
+ {
+ if(m_elementMap.find(tag) == m_elementMap.end())
+ m_elementMap[tag] = factoryFn;
+ }
+
+ SVGElementImpl *create(const std::string &tag, DOM::ElementImpl *impl) const
+ {
+ ElementMap::const_iterator it = m_elementMap.find(tag);
+ if(it != m_elementMap.end())
+ return it->second(impl);
+ return 0;
+ }
+
+ private:
+ Factory() { }
+ Factory(const Factory &rhs);
+ Factory &operator=(const Factory &rhs);
+
+ static Factory *m_instance;
+
+ typedef std::map<std::string, SVGElementImpl::FactoryFn> ElementMap;
+ mutable ElementMap m_elementMap;
+ };
+
+ template <class T>
+ class Registrar
+ {
+ public:
+ Registrar(const std::string &tag)
+ {
+ SVGElementImpl::Factory::self()->announce(&factoryFn, tag);
+ }
+
+ static SVGElementImpl *factoryFn(DOM::ElementImpl *impl)
+ {
+ return new T(impl);
+ }
+ };
+
+#define KSVG_REGISTER_ELEMENT(Class, Tag) \
+ static SVGElementImpl::Registrar<Class> Class##Registrar(Tag);
+
+protected:
+ void gotError(const QString &errorDesc);
+
+private:
+ SVGSVGElementImpl *m_ownerSVGElement;
+ SVGElementImpl *m_viewportElement;
+ SVGDocumentImpl *m_ownerDoc;
+
+ bool m_mouseOver : 1;
+ bool m_focus : 1;
+
+ QPtrList<SVGRegisteredEventListener> m_eventListeners;
+ QDict<DOM::DOMString> m_attributes;
+
+public:
+ KSVG_BASECLASS_GET
+ KSVG_PUT
+
+ virtual KJS::ObjectImp *bridge(KJS::ExecState *exec) const; // NEEDS TO BE VIRTUAL HERE
+
+ enum
+ {
+ // Properties
+ ElementId, OwnerSvgElement, ViewportElement, XmlBase,
+ OnMouseUp, OnMouseDown, OnMouseMove, OnMouseOver, OnMouseOut,
+ OnClick, OnActivate, OnKeyDown, OnKeyUp, OnKeyPress, OnLoad,
+ OnFocusIn, OnFocusOut, OnError, OnAbort,
+ // Functions
+ GetStyle,
+ // these do not really belong here, but the css doesnt work yet...
+ SetProperty, GetPropertyValue
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGElementImplProtoFunc, SVGElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementInstanceImpl.cc b/ksvg/impl/SVGElementInstanceImpl.cc
new file mode 100644
index 00000000..97cd28a2
--- /dev/null
+++ b/ksvg/impl/SVGElementInstanceImpl.cc
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGElementImpl.h"
+#include "SVGUseElementImpl.h"
+#include "SVGElementInstanceImpl.h"
+#include "SVGElementInstanceListImpl.h"
+
+using namespace KSVG;
+
+SVGElementInstanceImpl::SVGElementInstanceImpl()//FIXME : events::EventTarget()
+{
+ m_correspondingElement = 0;
+ m_correspondingUseElement = 0;
+ m_parentNode = 0;
+ m_childNodes = 0;
+ m_firstChild = 0;
+ m_lastChild = 0;
+ m_previousSibling = 0;
+ m_nextSibling = 0;
+}
+
+SVGElementInstanceImpl::~SVGElementInstanceImpl()
+{
+ if(m_correspondingElement)
+ m_correspondingElement->deref();
+ if(m_correspondingUseElement)
+ m_correspondingUseElement->deref();
+ if(m_parentNode)
+ m_parentNode->deref();
+ if(m_childNodes)
+ m_childNodes->deref();
+ if(m_firstChild)
+ m_firstChild->deref();
+ if(m_lastChild)
+ m_lastChild->deref();
+ if(m_previousSibling)
+ m_previousSibling->deref();
+ if(m_nextSibling)
+ m_nextSibling->deref();
+}
+
+void SVGElementInstanceImpl::setCorrespondingElement(SVGElementImpl *corresponding)
+{
+ m_correspondingElement = corresponding;
+
+ if(m_correspondingElement)
+ m_correspondingElement->ref();
+}
+
+SVGElementImpl *SVGElementInstanceImpl::correspondingElement() const
+{
+ return m_correspondingElement;
+}
+
+SVGUseElementImpl *SVGElementInstanceImpl::correspondingUseElement() const
+{
+ return m_correspondingUseElement;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceImpl::parentNode() const
+{
+ return m_parentNode;
+}
+
+SVGElementInstanceListImpl *SVGElementInstanceImpl::childNodes() const
+{
+ return m_childNodes;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceImpl::firstChild() const
+{
+ return m_firstChild;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceImpl::lastChild() const
+{
+ return m_lastChild;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceImpl::previousSibling() const
+{
+ return m_previousSibling;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceImpl::nextSibling() const
+{
+ return m_nextSibling;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementInstanceImpl.h b/ksvg/impl/SVGElementInstanceImpl.h
new file mode 100644
index 00000000..d9f3afae
--- /dev/null
+++ b/ksvg/impl/SVGElementInstanceImpl.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElementInstanceImpl_H
+#define SVGElementInstanceImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGElementImpl;
+class SVGUseElementImpl;
+class SVGElementInstanceImpl;
+class SVGElementInstanceListImpl;
+class SVGElementInstanceImpl : public DOM::DomShared
+{
+public:
+ SVGElementInstanceImpl();
+ virtual ~SVGElementInstanceImpl();
+
+ SVGElementImpl *correspondingElement() const;
+ SVGUseElementImpl *correspondingUseElement() const;
+ SVGElementInstanceImpl *parentNode() const;
+ SVGElementInstanceListImpl *childNodes() const;
+ SVGElementInstanceImpl *firstChild() const;
+ SVGElementInstanceImpl *lastChild() const;
+ SVGElementInstanceImpl *previousSibling() const;
+ SVGElementInstanceImpl *nextSibling() const;
+
+ void setCorrespondingElement(SVGElementImpl *);
+
+private:
+ SVGElementImpl *m_correspondingElement;
+ SVGUseElementImpl *m_correspondingUseElement;
+ SVGElementInstanceImpl *m_parentNode;
+ SVGElementInstanceListImpl *m_childNodes;
+ SVGElementInstanceImpl *m_firstChild;
+ SVGElementInstanceImpl *m_lastChild;
+ SVGElementInstanceImpl *m_previousSibling;
+ SVGElementInstanceImpl *m_nextSibling;
+
+public:
+ //KSVG_FORWARDGET
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementInstanceListImpl.cc b/ksvg/impl/SVGElementInstanceListImpl.cc
new file mode 100644
index 00000000..187255ab
--- /dev/null
+++ b/ksvg/impl/SVGElementInstanceListImpl.cc
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGElementInstanceImpl.h"
+#include "SVGElementInstanceListImpl.h"
+
+using namespace KSVG;
+
+SVGElementInstanceListImpl::SVGElementInstanceListImpl()
+{
+}
+
+SVGElementInstanceListImpl::~SVGElementInstanceListImpl()
+{
+}
+
+unsigned long SVGElementInstanceListImpl::length() const
+{
+ return m_length;
+}
+
+SVGElementInstanceImpl *SVGElementInstanceListImpl::item(unsigned long /*index*/)
+{
+ return 0;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGElementInstanceListImpl.h b/ksvg/impl/SVGElementInstanceListImpl.h
new file mode 100644
index 00000000..c9ac0dd2
--- /dev/null
+++ b/ksvg/impl/SVGElementInstanceListImpl.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGElementInstanceListImpl_H
+#define SVGElementInstanceListImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGElementInstanceImpl;
+class SVGElementInstanceListImpl : public DOM::DomShared
+{
+public:
+ SVGElementInstanceListImpl();
+ virtual ~SVGElementInstanceListImpl();
+
+ unsigned long length() const;
+ SVGElementInstanceImpl *item(unsigned long index);
+
+private:
+ unsigned long m_length;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEllipseElementImpl.cc b/ksvg/impl/SVGEllipseElementImpl.cc
new file mode 100644
index 00000000..9908941a
--- /dev/null
+++ b/ksvg/impl/SVGEllipseElementImpl.cc
@@ -0,0 +1,200 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include "SVGRectImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGEllipseElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+using namespace KSVG;
+
+#include "SVGEllipseElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGEllipseElementImpl::SVGEllipseElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_cx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_cx->ref();
+ m_cx->baseVal()->setValueAsString("-1");
+
+ m_cy = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_cy->ref();
+ m_cy->baseVal()->setValueAsString("-1");
+
+ m_rx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_rx->ref();
+ m_rx->baseVal()->setValueAsString("-1");
+
+ m_ry = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_ry->ref();
+ m_ry->baseVal()->setValueAsString("-1");
+}
+
+SVGEllipseElementImpl::~SVGEllipseElementImpl()
+{
+ if(m_cx)
+ m_cx->deref();
+ if(m_cy)
+ m_cy->deref();
+ if(m_rx)
+ m_rx->deref();
+ if(m_ry)
+ m_ry->deref();
+}
+
+SVGAnimatedLengthImpl *SVGEllipseElementImpl::cx()
+{
+ return m_cx;
+}
+
+SVGAnimatedLengthImpl *SVGEllipseElementImpl::cy()
+{
+ return m_cy;
+}
+
+SVGAnimatedLengthImpl *SVGEllipseElementImpl::rx()
+{
+ return m_rx;
+}
+
+SVGAnimatedLengthImpl *SVGEllipseElementImpl::ry()
+{
+ return m_ry;
+}
+
+/*
+@namespace KSVG
+@begin SVGEllipseElementImpl::s_hashTable 5
+ cx SVGEllipseElementImpl::Cx DontDelete|ReadOnly
+ cy SVGEllipseElementImpl::Cy DontDelete|ReadOnly
+ rx SVGEllipseElementImpl::Rx DontDelete|ReadOnly
+ ry SVGEllipseElementImpl::Ry DontDelete|ReadOnly
+@end
+*/
+
+Value SVGEllipseElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Cx:
+ if(!attributeMode)
+ return m_cx->cache(exec);
+ else
+ return Number(m_cx->baseVal()->value());
+ case Cy:
+ if(!attributeMode)
+ return m_cy->cache(exec);
+ else
+ return Number(m_cy->baseVal()->value());
+ case Rx:
+ if(!attributeMode)
+ return m_rx->cache(exec);
+ else
+ return Number(m_rx->baseVal()->value());
+ case Ry:
+ if(!attributeMode)
+ return m_ry->cache(exec);
+ else
+ return Number(m_ry->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGEllipseElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Cx:
+ cx()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Cy:
+ cy()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Rx:
+ rx()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(rx()->baseVal()->value() < 0) // A negative value is an error
+ gotError("Negative value for attribute rx of element <ellipse> is illegal");
+ break;
+ case Ry:
+ ry()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(ry()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute ry of element <ellipse> is illegal"));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGEllipseElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_cx->baseVal()->value() - m_rx->baseVal()->value());
+ ret->setY(m_cy->baseVal()->value() - m_ry->baseVal()->value());
+ ret->setWidth(m_rx->baseVal()->value() * 2.0);
+ ret->setHeight(m_ry->baseVal()->value() * 2.0);
+ return ret;
+}
+
+void SVGEllipseElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Cx))
+ KSVG_SET_ALT_ATTRIBUTE(Cx, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Cy))
+ KSVG_SET_ALT_ATTRIBUTE(Cy, "0")
+}
+
+void SVGEllipseElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createEllipse(this);
+ c->insert(m_item);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEllipseElementImpl.h b/ksvg/impl/SVGEllipseElementImpl.h
new file mode 100644
index 00000000..131098ba
--- /dev/null
+++ b/ksvg/impl/SVGEllipseElementImpl.h
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGEllipseElementImpl_H
+#define SVGEllipseElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGAnimatedLengthImpl;
+class SVGEllipseElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGEllipseElementImpl(DOM::ElementImpl *);
+ virtual ~SVGEllipseElementImpl();
+
+ SVGAnimatedLengthImpl *cx();
+ SVGAnimatedLengthImpl *cy();
+ SVGAnimatedLengthImpl *rx();
+ SVGAnimatedLengthImpl *ry();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void setAttributes();
+
+ virtual SVGRectImpl *getBBox();
+
+private:
+ SVGAnimatedLengthImpl *m_cx;
+ SVGAnimatedLengthImpl *m_cy;
+ SVGAnimatedLengthImpl *m_rx;
+ SVGAnimatedLengthImpl *m_ry;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Cx, Cy, Rx, Ry
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGEllipseElementImpl, "ellipse")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEventImpl.cc b/ksvg/impl/SVGEventImpl.cc
new file mode 100644
index 00000000..418e0044
--- /dev/null
+++ b/ksvg/impl/SVGEventImpl.cc
@@ -0,0 +1,992 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ Additional copyright:
+ (C) 2001 Peter Kelly <pmk@post.com>
+ (C) 2001 Tobias Anton <anton@stud.fbi.fh-darmstadt.de>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGEventImpl.h"
+
+#include <kdebug.h>
+
+using namespace KSVG;
+
+#include "ksvg_scriptinterpreter.h"
+#include "SVGEventImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGEventImpl::SVGEventImpl()
+{
+ m_canBubble = false;
+ m_cancelable = false;
+
+ m_propagationStopped = false;
+ m_defaultPrevented = false;
+ m_id = SVGEvent::UNKNOWN_EVENT;
+ m_eventPhase = 0;
+ m_createTime = QDateTime::currentDateTime();
+ m_defaultHandled = false;
+
+ m_target = 0;
+ m_currentTarget = 0;
+}
+
+SVGEventImpl::SVGEventImpl(SVGEvent::EventId _id, bool canBubbleArg, bool cancelableArg)
+{
+ DOM::DOMString t = SVGEvent::idToType(_id);
+ m_type = t.implementation();
+
+ m_canBubble = canBubbleArg;
+ m_cancelable = cancelableArg;
+
+ m_propagationStopped = false;
+ m_defaultPrevented = false;
+ m_id = _id;
+ m_eventPhase = 0;
+ m_createTime = QDateTime::currentDateTime();
+ m_defaultHandled = false;
+
+ m_target = 0;
+ m_currentTarget = 0;
+}
+
+SVGEventImpl::~SVGEventImpl()
+{
+}
+
+DOM::DOMString SVGEventImpl::type() const
+{
+ return m_type;
+}
+
+SVGElementImpl *SVGEventImpl::target() const
+{
+ return m_target;
+}
+
+void SVGEventImpl::setTarget(SVGElementImpl *_target)
+{
+ m_target = _target;
+}
+
+SVGElementImpl *SVGEventImpl::currentTarget() const
+{
+ return m_currentTarget;
+}
+
+void SVGEventImpl::setCurrentTarget(SVGElementImpl *_currentTarget)
+{
+ m_currentTarget = _currentTarget;
+}
+
+unsigned short SVGEventImpl::eventPhase() const
+{
+ return m_eventPhase;
+}
+
+void SVGEventImpl::setEventPhase(unsigned short _eventPhase)
+{
+ m_eventPhase = _eventPhase;
+}
+
+bool SVGEventImpl::bubbles() const
+{
+ return m_canBubble;
+}
+
+bool SVGEventImpl::cancelable() const
+{
+ return m_cancelable;
+}
+
+DOM::DOMTimeStamp SVGEventImpl::timeStamp()
+{
+ QDateTime epoch(QDate(1970, 1, 1), QTime(0, 0));
+
+ // ### kjs does not yet support long long (?) so the value wraps around
+ return epoch.secsTo(m_createTime) * 1000 + m_createTime.time().msec();
+}
+
+void SVGEventImpl::stopPropagation()
+{
+ m_propagationStopped = true;
+}
+
+void SVGEventImpl::preventDefault()
+{
+ if(m_cancelable)
+ m_defaultPrevented = true;
+}
+
+void SVGEventImpl::initEvent(const DOM::DOMString &eventTypeArg, bool canBubbleArg, bool cancelableArg)
+{
+ // ### ensure this is not called after we have been dispatched (also for subclasses)
+ m_type = eventTypeArg.implementation();
+ m_id = SVGEvent::typeToId(eventTypeArg);
+
+ m_canBubble = canBubbleArg;
+ m_cancelable = cancelableArg;
+}
+
+void SVGEventImpl::setDefaultHandled()
+{
+ m_defaultHandled = true;
+}
+
+/*
+@namespace KSVG
+@begin SVGEventImpl::s_hashTable 11
+ type SVGEventImpl::Type DontDelete|ReadOnly
+ target SVGEventImpl::Target DontDelete|ReadOnly
+ currentTarget SVGEventImpl::CurrentTarget DontDelete|ReadOnly
+ eventPhase SVGEventImpl::EventPhase DontDelete|ReadOnly
+ bubbles SVGEventImpl::Bubbles DontDelete|ReadOnly
+ cancelable SVGEventImpl::Cancelable DontDelete|ReadOnly
+ timeStamp SVGEventImpl::TimeStamp DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGEventImplProto::s_hashTable 13
+ getType SVGEventImpl::GetType DontDelete|Function 0
+ getTarget SVGEventImpl::GetTarget DontDelete|Function 0
+ getCurrentTarget SVGEventImpl::GetCurrentTarget DontDelete|Function 0
+ getCurrentNode SVGEventImpl::GetCurrentNode DontDelete|Function 0
+ getEventphase SVGEventImpl::GetEventPhase DontDelete|Function 0
+ getBubbles SVGEventImpl::GetBubbles DontDelete|Function 0
+ getCancelable SVGEventImpl::GetCancelable DontDelete|Function 0
+ getTimeStamp SVGEventImpl::GetTimeStamp DontDelete|Function 0
+ stopPropagation SVGEventImpl::StopPropagation DontDelete|Function 0
+ preventDefault SVGEventImpl::PreventDefault DontDelete|Function 0
+ initEvent SVGEventImpl::InitEvent DontDelete|Function 3
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGEvent", SVGEventImplProto, SVGEventImplProtoFunc)
+
+Value SVGEventImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Type:
+ return String(type());
+ case Target:
+ return getDOMNode(exec, *target());
+ case CurrentTarget:
+ return getDOMNode(exec, *currentTarget());
+ case EventPhase:
+ return Number(eventPhase());
+ case Bubbles:
+ return Boolean(bubbles());
+ case Cancelable:
+ return Boolean(cancelable());
+// case TimeStamp: // TODO
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+Value SVGEventImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGEventImpl)
+
+ switch(id)
+ {
+ case SVGEventImpl::GetType:
+ return String(obj->type());
+ case SVGEventImpl::GetTarget:
+ return getDOMNode(exec, *obj->target());
+ case SVGEventImpl::GetCurrentTarget:
+ case SVGEventImpl::GetCurrentNode:
+ return getDOMNode(exec, *obj->currentTarget());
+ case SVGEventImpl::GetEventPhase:
+ return Number(obj->eventPhase());
+ case SVGEventImpl::GetBubbles:
+ return Boolean(obj->bubbles());
+ case SVGEventImpl::GetCancelable:
+ return Boolean(obj->cancelable());
+// case SVGEventImpl::GetTimeStamp: // TODO
+ case SVGEventImpl::StopPropagation:
+ {
+ obj->stopPropagation();
+ return Undefined();
+ }
+ case SVGEventImpl::PreventDefault:
+ {
+ obj->preventDefault();
+ return Undefined();
+ }
+ case SVGEventImpl::InitEvent:
+ {
+ obj->initEvent(args[0].toString(exec).string(), args[1].toBoolean(exec), args[2].toBoolean(exec));
+ return Undefined();
+ }
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+
+
+
+
+SVGUIEventImpl::SVGUIEventImpl() : SVGEventImpl()
+{
+ m_detail = 0;
+}
+
+SVGUIEventImpl::SVGUIEventImpl(SVGEvent::EventId _id, bool canBubbleArg, bool cancelableArg, DOM::AbstractView &viewArg, long detailArg)
+: SVGEventImpl(_id, canBubbleArg, cancelableArg)
+{
+ m_view = viewArg;
+ m_detail = detailArg;
+}
+
+SVGUIEventImpl::~SVGUIEventImpl()
+{
+}
+
+DOM::AbstractView SVGUIEventImpl::view() const
+{
+ return m_view;
+}
+
+long SVGUIEventImpl::detail() const
+{
+ return m_detail;
+}
+
+void SVGUIEventImpl::initUIEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg)
+{
+ SVGEventImpl::initEvent(typeArg, canBubbleArg, cancelableArg);
+
+ m_view = viewArg;
+ m_detail = detailArg;
+}
+
+/*
+@namespace KSVG
+@begin SVGUIEventImpl::s_hashTable 3
+ view SVGUIEventImpl::View DontDelete|ReadOnly
+ detail SVGUIEventImpl::Detail DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGUIEventImplProto::s_hashTable 5
+ getView SVGUIEventImpl::GetView DontDelete|Function 0
+ getDetail SVGUIEventImpl::GetDetail DontDelete|Function 0
+ initUIEvent SVGUIEventImpl::InitUIEvent DontDelete|Function 5
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGUIEvent", SVGUIEventImplProto, SVGUIEventImplProtoFunc)
+
+Value SVGUIEventImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+// case View: // TODO
+ case Detail:
+ return Number(detail());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+Value SVGUIEventImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &)
+{
+ KSVG_CHECK_THIS(SVGUIEventImpl)
+
+ switch(id)
+ {
+// case SVGUIEventImpl::GetView: // TODO
+ case SVGUIEventImpl::GetDetail:
+ return Number(obj->detail());
+// case SVGUIEventImpl::InitUIEvent: // TODO
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+SVGKeyEventImpl::SVGKeyEventImpl() : SVGUIEventImpl()
+{
+ qKeyEvent = 0;
+}
+
+SVGKeyEventImpl::SVGKeyEventImpl(QKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id) : SVGUIEventImpl(_id, true, true, view, 0)
+{
+ qKeyEvent = new QKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count());
+
+ // Events are supposed to be accepted by default in Qt!
+ // This line made QLineEdit's keyevents be ignored, so they were sent to the khtmlview
+ // (and e.g. space would make it scroll down)
+ //qKeyEvent->ignore();
+
+ m_detail = key->count();
+
+ m_numPad = false;
+ m_keyVal = 0;
+ m_virtKeyVal = DOM_VK_UNDEFINED;
+ m_inputGenerated = true;
+
+ switch(key->key())
+ {
+ case Qt::Key_Enter:
+ m_numPad = true;
+ /* fall through */
+ case Qt::Key_Return:
+ m_virtKeyVal = DOM_VK_ENTER;
+ break;
+ case Qt::Key_NumLock:
+ m_numPad = true;
+ m_virtKeyVal = DOM_VK_NUM_LOCK;
+ break;
+ case Qt::Key_Alt:
+ m_virtKeyVal = DOM_VK_RIGHT_ALT;
+ // ### DOM_VK_LEFT_ALT;
+ break;
+ case Qt::Key_Control:
+ m_virtKeyVal = DOM_VK_LEFT_CONTROL;
+ // ### DOM_VK_RIGHT_CONTROL
+ break;
+ case Qt::Key_Shift:
+ m_virtKeyVal = DOM_VK_LEFT_SHIFT;
+ // ### DOM_VK_RIGHT_SHIFT
+ break;
+ case Qt::Key_Meta:
+ m_virtKeyVal = DOM_VK_LEFT_META;
+ // ### DOM_VK_RIGHT_META
+ break;
+ case Qt::Key_CapsLock:
+ m_virtKeyVal = DOM_VK_CAPS_LOCK;
+ break;
+ case Qt::Key_Delete:
+ m_virtKeyVal = DOM_VK_DELETE;
+ break;
+ case Qt::Key_End:
+ m_virtKeyVal = DOM_VK_END;
+ break;
+ case Qt::Key_Escape:
+ m_virtKeyVal = DOM_VK_ESCAPE;
+ break;
+ case Qt::Key_Home:
+ m_virtKeyVal = DOM_VK_HOME;
+ break;
+ case Qt::Key_Insert:
+ m_virtKeyVal = DOM_VK_INSERT;
+ break;
+ case Qt::Key_Pause:
+ m_virtKeyVal = DOM_VK_PAUSE;
+ break;
+ case Qt::Key_Print:
+ m_virtKeyVal = DOM_VK_PRINTSCREEN;
+ break;
+ case Qt::Key_ScrollLock:
+ m_virtKeyVal = DOM_VK_SCROLL_LOCK;
+ break;
+ case Qt::Key_Left:
+ m_virtKeyVal = DOM_VK_LEFT;
+ break;
+ case Qt::Key_Right:
+ m_virtKeyVal = DOM_VK_RIGHT;
+ break;
+ case Qt::Key_Up:
+ m_virtKeyVal = DOM_VK_UP;
+ break;
+ case Qt::Key_Down:
+ m_virtKeyVal = DOM_VK_DOWN;
+ break;
+ case Qt::Key_Next:
+ m_virtKeyVal = DOM_VK_PAGE_DOWN;
+ break;
+ case Qt::Key_Prior:
+ m_virtKeyVal = DOM_VK_PAGE_UP;
+ break;
+ case Qt::Key_F1:
+ m_virtKeyVal = DOM_VK_F1;
+ break;
+ case Qt::Key_F2:
+ m_virtKeyVal = DOM_VK_F2;
+ break;
+ case Qt::Key_F3:
+ m_virtKeyVal = DOM_VK_F3;
+ break;
+ case Qt::Key_F4:
+ m_virtKeyVal = DOM_VK_F4;
+ break;
+ case Qt::Key_F5:
+ m_virtKeyVal = DOM_VK_F5;
+ break;
+ case Qt::Key_F6:
+ m_virtKeyVal = DOM_VK_F6;
+ break;
+ case Qt::Key_F7:
+ m_virtKeyVal = DOM_VK_F7;
+ break;
+ case Qt::Key_F8:
+ m_virtKeyVal = DOM_VK_F8;
+ break;
+ case Qt::Key_F9:
+ m_virtKeyVal = DOM_VK_F9;
+ break;
+ case Qt::Key_F10:
+ m_virtKeyVal = DOM_VK_F10;
+ break;
+ case Qt::Key_F11:
+ m_virtKeyVal = DOM_VK_F11;
+ break;
+ case Qt::Key_F12:
+ m_virtKeyVal = DOM_VK_F12;
+ break;
+ case Qt::Key_F13:
+ m_virtKeyVal = DOM_VK_F13;
+ break;
+ case Qt::Key_F14:
+ m_virtKeyVal = DOM_VK_F14;
+ break;
+ case Qt::Key_F15:
+ m_virtKeyVal = DOM_VK_F15;
+ break;
+ case Qt::Key_F16:
+ m_virtKeyVal = DOM_VK_F16;
+ break;
+ case Qt::Key_F17:
+ m_virtKeyVal = DOM_VK_F17;
+ break;
+ case Qt::Key_F18:
+ m_virtKeyVal = DOM_VK_F18;
+ break;
+ case Qt::Key_F19:
+ m_virtKeyVal = DOM_VK_F19;
+ break;
+ case Qt::Key_F20:
+ m_virtKeyVal = DOM_VK_F20;
+ break;
+ case Qt::Key_F21:
+ m_virtKeyVal = DOM_VK_F21;
+ break;
+ case Qt::Key_F22:
+ m_virtKeyVal = DOM_VK_F22;
+ break;
+ case Qt::Key_F23:
+ m_virtKeyVal = DOM_VK_F23;
+ break;
+ case Qt::Key_F24:
+ m_virtKeyVal = DOM_VK_F24;
+ break;
+ default:
+ m_virtKeyVal = DOM_VK_UNDEFINED;
+ break;
+ }
+
+ // m_keyVal should contain the unicode value
+ // of the pressed key if available.
+ if (!key->text().isNull())
+ m_keyVal = key->text().unicode()[0];
+
+ // m_numPad = ???
+
+ // key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together.
+ m_modifier = key->state();
+
+ // key->text() returns the unicode sequence as a QString
+ m_outputString = DOM::DOMString(key->text());
+}
+
+SVGKeyEventImpl::SVGKeyEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ unsigned short detailArg,
+ DOM::DOMString &outputStringArg,
+ unsigned long keyValArg,
+ unsigned long virtKeyValArg,
+ bool inputGeneratedArg,
+ bool numPadArg)
+: SVGUIEventImpl(_id, canBubbleArg, cancelableArg, viewArg, detailArg)
+{
+ qKeyEvent = 0;
+ m_keyVal = keyValArg;
+ m_virtKeyVal = virtKeyValArg;
+ m_inputGenerated = inputGeneratedArg;
+ m_outputString = outputStringArg;
+ m_numPad = numPadArg;
+ m_modifier = 0;
+}
+
+SVGKeyEventImpl::~SVGKeyEventImpl()
+{
+ delete qKeyEvent;
+}
+
+bool SVGKeyEventImpl::checkModifier(unsigned long modifierArg)
+{
+ return ((m_modifier && modifierArg) == modifierArg);
+}
+
+void SVGKeyEventImpl::initKeyEvent(DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg,
+ DOM::DOMString &outputStringArg,
+ unsigned long keyValArg,
+ unsigned long virtKeyValArg,
+ bool inputGeneratedArg,
+ bool numPadArg)
+{
+ SVGUIEventImpl::initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
+
+ m_outputString = outputStringArg;
+ m_keyVal = keyValArg;
+ m_virtKeyVal = virtKeyValArg;
+ m_inputGenerated = inputGeneratedArg;
+ m_numPad = numPadArg;
+}
+
+void SVGKeyEventImpl::initModifier(unsigned long modifierArg, bool valueArg)
+{
+ if(valueArg)
+ m_modifier |= modifierArg;
+ else
+ m_modifier &= (modifierArg ^ 0xFFFFFFFF);
+}
+
+bool SVGKeyEventImpl::inputGenerated() const
+{
+ return m_inputGenerated;
+}
+
+unsigned long SVGKeyEventImpl::keyVal() const
+{
+ return m_keyVal;
+}
+
+DOM::DOMString SVGKeyEventImpl::outputString() const
+{
+ return m_outputString;
+}
+
+/*
+@namespace KSVG
+@begin SVGKeyEventImpl::s_hashTable 7
+ keyVal SVGKeyEventImpl::KeyVal DontDelete|ReadOnly
+ keyCode SVGKeyEventImpl::KeyVal DontDelete|ReadOnly
+ charCode SVGKeyEventImpl::KeyVal DontDelete|ReadOnly
+ outputString SVGKeyEventImpl::OutputString DontDelete|ReadOnly
+ virtKeyVal SVGKeyEventImpl::VirtKeyVal DontDelete|ReadOnly
+# todo visibleOutputGenerated numPad
+@end
+@namespace KSVG
+@begin SVGKeyEventImplProto::s_hashTable 7
+ checkModifier SVGKeyEventImpl::CheckModifier DontDelete|Function 1
+ getKeyCode SVGKeyEventImpl::GetKeyVal DontDelete|Function 0
+ getCharCode SVGKeyEventImpl::GetKeyVal DontDelete|Function 0
+ getKeyVal SVGKeyEventImpl::GetKeyVal DontDelete|Function 0
+ getCharCode SVGKeyEventImpl::GetCharCode DontDelete|Function 0
+# todo initModifier
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGKeyEvent", SVGKeyEventImplProto, SVGKeyEventImplProtoFunc)
+
+Value SVGKeyEventImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case KeyVal:
+ return Number(keyVal());
+ case VirtKeyVal:
+ return Number(virtKeyVal());
+ case OutputString:
+ return String(outputString());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGKeyEventImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGKeyEventImpl)
+
+ switch(id)
+ {
+ case SVGKeyEventImpl::CheckModifier:
+ return Boolean((static_cast<KSVGBridge<SVGKeyEventImpl> *>(static_cast<ObjectImp *>(thisObj.imp()))->impl())->checkModifier(args[0].toUInt32(exec)));
+ case SVGKeyEventImpl::GetKeyVal:
+ case SVGKeyEventImpl::GetCharCode:
+ return Number((static_cast<KSVGBridge<SVGKeyEventImpl> *>(static_cast<ObjectImp *>(thisObj.imp()))->impl())->keyVal());
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+
+
+// -----------------------------------------------------------------------------
+
+SVGMouseEventImpl::SVGMouseEventImpl() : SVGUIEventImpl()
+{
+ m_screenX = 0;
+ m_screenY = 0;
+ m_clientX = 0;
+ m_clientY = 0;
+ m_ctrlKey = false;
+ m_altKey = false;
+ m_shiftKey = false;
+ m_metaKey = false;
+ m_button = 0;
+}
+
+SVGMouseEventImpl::SVGMouseEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ bool ctrlKeyArg,
+ bool altKeyArg,
+ bool shiftKeyArg,
+ bool metaKeyArg,
+ unsigned short buttonArg,
+ SVGElementImpl *relatedTargetArg)
+: SVGUIEventImpl(_id, canBubbleArg, cancelableArg, viewArg, detailArg)
+{
+ m_screenX = screenXArg;
+ m_screenY = screenYArg;
+ m_clientX = clientXArg;
+ m_clientY = clientYArg;
+ m_ctrlKey = ctrlKeyArg;
+ m_altKey = altKeyArg;
+ m_shiftKey = shiftKeyArg;
+ m_metaKey = metaKeyArg;
+ m_button = buttonArg;
+ m_relatedTarget = relatedTargetArg;
+}
+
+SVGMouseEventImpl::~SVGMouseEventImpl()
+{
+}
+
+long SVGMouseEventImpl::screenX() const
+{
+ return m_screenX;
+}
+
+long SVGMouseEventImpl::screenY() const
+{
+ return m_screenY;
+}
+
+long SVGMouseEventImpl::clientX() const
+{
+ return m_clientX;
+}
+
+long SVGMouseEventImpl::clientY() const
+{
+ return m_clientY;
+}
+
+bool SVGMouseEventImpl::ctrlKey() const
+{
+ return m_ctrlKey;
+}
+
+bool SVGMouseEventImpl::shiftKey() const
+{
+ return m_shiftKey;
+}
+
+bool SVGMouseEventImpl::altKey() const
+{
+ return m_altKey;
+}
+
+bool SVGMouseEventImpl::metaKey() const
+{
+ return m_metaKey;
+}
+
+unsigned short SVGMouseEventImpl::button() const
+{
+ return m_button;
+}
+
+SVGElementImpl *SVGMouseEventImpl::relatedTarget() const
+{
+ return m_relatedTarget;
+}
+
+DOM::DOMString SVGMouseEventImpl::url() const
+{
+ return m_url;
+}
+
+void SVGMouseEventImpl::setURL(DOM::DOMString url)
+{
+ m_url = url;
+}
+
+void SVGMouseEventImpl::initMouseEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ bool ctrlKeyArg,
+ bool altKeyArg,
+ bool shiftKeyArg,
+ bool metaKeyArg,
+ unsigned short buttonArg,
+ SVGElementImpl *relatedTargetArg)
+{
+ SVGUIEventImpl::initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
+
+ m_screenX = screenXArg;
+ m_screenY = screenYArg;
+ m_clientX = clientXArg;
+ m_clientY = clientYArg;
+ m_ctrlKey = ctrlKeyArg;
+ m_altKey = altKeyArg;
+ m_shiftKey = shiftKeyArg;
+ m_metaKey = metaKeyArg;
+ m_button = buttonArg;
+ m_relatedTarget = relatedTargetArg;
+}
+
+/*
+@namespace KSVG
+@begin SVGMouseEventImpl::s_hashTable 11
+ screenX SVGMouseEventImpl::ScreenX DontDelete|ReadOnly
+ screenY SVGMouseEventImpl::ScreenY DontDelete|ReadOnly
+ clientX SVGMouseEventImpl::ClientX DontDelete|ReadOnly
+ clientY SVGMouseEventImpl::ClientY DontDelete|ReadOnly
+ ctrlKey SVGMouseEventImpl::CtrlKey DontDelete|ReadOnly
+ shiftKey SVGMouseEventImpl::ShiftKey DontDelete|ReadOnly
+ altKey SVGMouseEventImpl::AltKey DontDelete|ReadOnly
+ metaKey SVGMouseEventImpl::MetaKey DontDelete|ReadOnly
+ button SVGMouseEventImpl::Button DontDelete|ReadOnly
+ relatedTarget SVGMouseEventImpl::RelatedTarget DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGMouseEventImplProto::s_hashTable 13
+ getScreenX SVGMouseEventImpl::GetScreenX DontDelete|Function 0
+ getScreenY SVGMouseEventImpl::GetScreenY DontDelete|Function 0
+ getClientX SVGMouseEventImpl::GetClientX DontDelete|Function 0
+ getClientY SVGMouseEventImpl::GetClientY DontDelete|Function 0
+ getCtrlKey SVGMouseEventImpl::GetCtrlKey DontDelete|Function 0
+ getShiftKey SVGMouseEventImpl::GetShiftKey DontDelete|Function 0
+ getAltKey SVGMouseEventImpl::GetAltKey DontDelete|Function 0
+ getMetaKey SVGMouseEventImpl::GetMetaKey DontDelete|Function 0
+ getButton SVGMouseEventImpl::GetButton DontDelete|Function 0
+ getRelatedTarget SVGMouseEventImpl::GetRelatedTarget DontDelete|Function 0
+ initMouseEvent SVGMouseEventImpl::InitMouseEvent DontDelete|Function 15
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGMouseEvent", SVGMouseEventImplProto, SVGMouseEventImplProtoFunc)
+
+Value SVGMouseEventImpl::getValueProperty(ExecState *exec, int token) const
+{
+ kdDebug(26004) << k_funcinfo << endl;
+ switch(token)
+ {
+ case ScreenX:
+ return Number(screenX());
+ case ScreenY:
+ return Number(screenY());
+ case ClientX:
+ return Number(clientX());
+ case ClientY:
+ return Number(clientY());
+ case CtrlKey:
+ return Number(ctrlKey());
+ case ShiftKey:
+ return Number(shiftKey());
+ case AltKey:
+ return Number(altKey());
+ case MetaKey:
+ return Number(metaKey());
+ case Button:
+ return Number(button());
+ case RelatedTarget:
+ return getDOMNode(exec, *relatedTarget());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+Value SVGMouseEventImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &)
+{
+ kdDebug(26004) << k_funcinfo << endl;
+ KSVG_CHECK_THIS(SVGMouseEventImpl)
+
+ switch(id)
+ {
+ case SVGMouseEventImpl::GetScreenX:
+ return Number(obj->screenX());
+ case SVGMouseEventImpl::GetScreenY:
+ return Number(obj->screenY());
+ case SVGMouseEventImpl::GetClientX:
+ return Number(obj->clientX());
+ case SVGMouseEventImpl::GetClientY:
+ return Number(obj->clientY());
+ case SVGMouseEventImpl::GetCtrlKey:
+ return Number(obj->ctrlKey());
+ case SVGMouseEventImpl::GetShiftKey:
+ return Number(obj->shiftKey());
+ case SVGMouseEventImpl::GetAltKey:
+ return Number(obj->altKey());
+ case SVGMouseEventImpl::GetMetaKey:
+ return Number(obj->metaKey());
+ case SVGMouseEventImpl::GetButton:
+ return Number(obj->button());
+ case SVGMouseEventImpl::GetRelatedTarget:
+ return getDOMNode(exec, *obj->relatedTarget());
+// case SVGMouseEventImpl::InitMouseEvent: // TODO
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+
+
+
+SVGMutationEventImpl::SVGMutationEventImpl() : SVGEventImpl()
+{
+ m_attrChange = 0;
+}
+
+SVGMutationEventImpl::SVGMutationEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ SVGElementImpl *relatedNodeArg,
+ const DOM::DOMString &prevValueArg,
+ const DOM::DOMString &newValueArg,
+ const DOM::DOMString &attrNameArg,
+ unsigned short attrChangeArg)
+: SVGEventImpl(_id, canBubbleArg, cancelableArg)
+{
+ m_relatedNode = relatedNodeArg;
+ m_prevValue = prevValueArg.implementation();
+ m_newValue = newValueArg.implementation();
+ m_attrName = attrNameArg.implementation();
+ m_attrChange = attrChangeArg;
+}
+
+SVGMutationEventImpl::~SVGMutationEventImpl()
+{
+}
+
+SVGElementImpl *SVGMutationEventImpl::relatedNode() const
+{
+ return m_relatedNode;
+}
+
+DOM::DOMString SVGMutationEventImpl::prevValue() const
+{
+ return m_prevValue;
+}
+
+DOM::DOMString SVGMutationEventImpl::newValue() const
+{
+ return m_newValue;
+}
+
+DOM::DOMString SVGMutationEventImpl::attrName() const
+{
+ return m_attrName;
+}
+
+unsigned short SVGMutationEventImpl::attrChange() const
+{
+ return m_attrChange;
+}
+
+void SVGMutationEventImpl::initMutationEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ SVGElementImpl *relatedNodeArg,
+ const DOM::DOMString &prevValueArg,
+ const DOM::DOMString &newValueArg,
+ const DOM::DOMString &attrNameArg,
+ unsigned short attrChangeArg)
+{
+ SVGEventImpl::initEvent(typeArg, canBubbleArg, cancelableArg);
+
+ m_relatedNode = relatedNodeArg;
+ m_prevValue = prevValueArg.implementation();
+ m_newValue = newValueArg.implementation();
+ m_attrName = attrNameArg.implementation();
+ m_attrChange = attrChangeArg;
+}
+
+
+
+
+
+SVGRegisteredEventListener::SVGRegisteredEventListener(SVGEvent::EventId _id, SVGEventListener *_listener, bool _useCapture)
+{
+ id = _id;
+ listener = _listener;
+ useCapture = _useCapture;
+
+ listener->ref();
+}
+
+SVGRegisteredEventListener::~SVGRegisteredEventListener()
+{
+ listener->deref();
+}
+
+bool SVGRegisteredEventListener::operator==(const SVGRegisteredEventListener &other)
+{
+ return (id == other.id &&
+ listener == other.listener &&
+ useCapture == other.useCapture);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGEventImpl.h b/ksvg/impl/SVGEventImpl.h
new file mode 100644
index 00000000..a123b09e
--- /dev/null
+++ b/ksvg/impl/SVGEventImpl.h
@@ -0,0 +1,468 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ Additional copyright:
+ (C) 2001 Peter Kelly <pmk@post.com>
+ (C) 2001 Tobias Anton <anton@stud.fbi.fh-darmstadt.de>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGEventImpl_H
+#define SVGEventImpl_H
+
+#include <qevent.h>
+#include <qdatetime.h>
+
+#include <dom/dom_misc.h>
+#include <dom/dom_node.h>
+#include <dom/dom2_views.h>
+#include <dom/dom_string.h>
+
+#include "SVGEvent.h"
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+// @ecma-checked 07/07/02@
+class SVGEventImpl : public DOM::DomShared
+{
+public:
+ SVGEventImpl();
+ SVGEventImpl(SVGEvent::EventId _id, bool canBubbleArg, bool cancelableArg);
+ virtual ~SVGEventImpl();
+
+ SVGEvent::EventId id() { return m_id; }
+
+ DOM::DOMString type() const;
+
+ SVGElementImpl *target() const;
+ void setTarget(SVGElementImpl *_target);
+
+ SVGElementImpl *currentTarget() const;
+ void setCurrentTarget(SVGElementImpl *_currentTarget);
+
+ unsigned short eventPhase() const;
+ void setEventPhase(unsigned short _eventPhase);
+
+ bool bubbles() const;
+ bool cancelable() const;
+
+ DOM::DOMTimeStamp timeStamp();
+
+ void stopPropagation();
+ void preventDefault();
+ void initEvent(const DOM::DOMString &eventTypeArg, bool canBubbleArg, bool cancelableArg);
+
+ virtual bool isUIEvent() { return false; }
+ virtual bool isMouseEvent() { return false; }
+ virtual bool isMutationEvent() { return false; }
+ virtual bool isKeyEvent() { return false; }
+
+ virtual DOM::DOMString eventModuleName() { return ""; }
+
+ virtual bool propagationStopped() { return m_propagationStopped; }
+ virtual bool defaultPrevented() { return m_defaultPrevented; }
+
+ void setDefaultHandled();
+ bool defaultHandled() const { return m_defaultHandled; }
+
+protected:
+ DOM::DOMString m_type;
+ bool m_canBubble;
+ bool m_cancelable;
+
+ bool m_propagationStopped;
+ bool m_defaultPrevented;
+ bool m_defaultHandled;
+
+ SVGEvent::EventId m_id;
+ SVGElementImpl *m_currentTarget;
+ SVGElementImpl *m_target;
+
+ unsigned short m_eventPhase;
+ QDateTime m_createTime;
+
+public:
+ KSVG_BASECLASS_GET
+
+ enum
+ {
+ // Properties
+ Type, Target, CurrentTarget, EventPhase,
+ Bubbles, Cancelable, TimeStamp,
+ // Functions
+ GetType, GetTarget, GetCurrentTarget, GetEventPhase,
+ GetBubbles, GetCancelable, GetTimeStamp,
+ StopPropagation, PreventDefault, InitEvent,
+ GetCurrentNode // Out-Of-Spec
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+class SVGEventListener : public DOM::DomShared
+{
+public:
+ SVGEventListener() { }
+ virtual ~SVGEventListener() { }
+
+ virtual void handleEvent(SVGEventImpl *) { }
+ virtual DOM::DOMString eventListenerType() { return ""; }
+};
+
+// @ecma-checked 07/07/02@
+class SVGUIEventImpl : public SVGEventImpl
+{
+public:
+ SVGUIEventImpl();
+ SVGUIEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ long detailArg);
+
+ virtual ~SVGUIEventImpl();
+
+ DOM::AbstractView view() const;
+ long detail() const;
+
+ void initUIEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg);
+
+ virtual bool isUIEvent() { return true; }
+ virtual DOM::DOMString eventModuleName() { return "UIEvents"; }
+
+protected:
+ DOM::AbstractView m_view;
+ long m_detail;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ View, Detail,
+ // Functions
+ GetView, GetDetail, InitUIEvent
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+// @ecma-checked 07/07/02@
+// Introduced in DOM Level 2: - internal
+class SVGMouseEventImpl : public SVGUIEventImpl
+{
+public:
+ SVGMouseEventImpl();
+ SVGMouseEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ bool ctrlKeyArg,
+ bool altKeyArg,
+ bool shiftKeyArg,
+ bool metaKeyArg,
+ unsigned short buttonArg,
+ SVGElementImpl *relatedTargetArg);
+
+ virtual ~SVGMouseEventImpl();
+
+ long screenX() const;
+ long screenY() const;
+ long clientX() const;
+ long clientY() const;
+ bool ctrlKey() const;
+ bool shiftKey() const;
+ bool altKey() const;
+ bool metaKey() const;
+
+ unsigned short button() const;
+
+ SVGElementImpl *relatedTarget() const;
+
+ void initMouseEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg,
+ long screenXArg,
+ long screenYArg,
+ long clientXArg,
+ long clientYArg,
+ bool ctrlKeyArg,
+ bool altKeyArg,
+ bool shiftKeyArg,
+ bool metaKeyArg,
+ unsigned short buttonArg,
+ SVGElementImpl *relatedTargetArg);
+
+ virtual bool isMouseEvent() { return true; }
+ virtual DOM::DOMString eventModuleName() { return "MouseEvents"; }
+
+ // KSVG extensions
+ DOM::DOMString url() const;
+ void setURL(DOM::DOMString url);
+
+protected:
+ long m_screenX;
+ long m_screenY;
+ long m_clientX;
+ long m_clientY;
+ bool m_ctrlKey;
+ bool m_altKey;
+ bool m_shiftKey;
+ bool m_metaKey;
+ unsigned short m_button;
+ SVGElementImpl *m_relatedTarget;
+
+ // KSVG extension
+ DOM::DOMString m_url;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ ScreenX, ScreenY, ClientX, ClientY, CtrlKey,
+ ShiftKey, AltKey, MetaKey, Button, RelatedTarget,
+ // Functions
+ GetScreenX, GetScreenY, GetClientX, GetClientY, GetCtrlKey,
+ GetShiftKey, GetAltKey, GetMetaKey, GetButton, GetRelatedTarget,
+ InitMouseEvent
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+class SVGKeyEventImpl : public SVGUIEventImpl
+{
+public:
+ SVGKeyEventImpl();
+ SVGKeyEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ unsigned short detailArg,
+ DOM::DOMString &outputStringArg,
+ unsigned long keyValArg,
+ unsigned long virtKeyValArg,
+ bool inputGeneratedArg,
+ bool numPadArg);
+
+ SVGKeyEventImpl(QKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id);
+
+ virtual bool isKeyEvent() { return true; }
+
+ virtual ~SVGKeyEventImpl();
+
+ enum KeyCodes
+ {
+ DOM_VK_UNDEFINED = 0x0,
+ DOM_VK_RIGHT_ALT = 0x01,
+ DOM_VK_LEFT_ALT = 0x02,
+ DOM_VK_LEFT_CONTROL = 0x03,
+ DOM_VK_RIGHT_CONTROL = 0x04,
+ DOM_VK_LEFT_SHIFT = 0x05,
+ DOM_VK_RIGHT_SHIFT = 0x06,
+ DOM_VK_LEFT_META = 0x07,
+ DOM_VK_RIGHT_META = 0x08,
+ DOM_VK_CAPS_LOCK = 0x09,
+ DOM_VK_DELETE = 0x0A,
+ DOM_VK_END = 0x0B,
+ DOM_VK_ENTER = 0x0C,
+ DOM_VK_ESCAPE = 0x0D,
+ DOM_VK_HOME = 0x0E,
+ DOM_VK_INSERT = 0x0F,
+ DOM_VK_NUM_LOCK = 0x10,
+ DOM_VK_PAUSE = 0x11,
+ DOM_VK_PRINTSCREEN = 0x12,
+ DOM_VK_SCROLL_LOCK = 0x13,
+ DOM_VK_LEFT = 0x14,
+ DOM_VK_RIGHT = 0x15,
+ DOM_VK_UP = 0x16,
+ DOM_VK_DOWN = 0x17,
+ DOM_VK_PAGE_DOWN = 0x18,
+ DOM_VK_PAGE_UP = 0x19,
+ DOM_VK_F1 = 0x1A,
+ DOM_VK_F2 = 0x1B,
+ DOM_VK_F3 = 0x1C,
+ DOM_VK_F4 = 0x1D,
+ DOM_VK_F5 = 0x1E,
+ DOM_VK_F6 = 0x1F,
+ DOM_VK_F7 = 0x20,
+ DOM_VK_F8 = 0x21,
+ DOM_VK_F9 = 0x22,
+ DOM_VK_F10 = 0x23,
+ DOM_VK_F11 = 0x24,
+ DOM_VK_F12 = 0x25,
+ DOM_VK_F13 = 0x26,
+ DOM_VK_F14 = 0x27,
+ DOM_VK_F15 = 0x28,
+ DOM_VK_F16 = 0x29,
+ DOM_VK_F17 = 0x2A,
+ DOM_VK_F18 = 0x2B,
+ DOM_VK_F19 = 0x2C,
+ DOM_VK_F20 = 0x2D,
+ DOM_VK_F21 = 0x2E,
+ DOM_VK_F22 = 0x2F,
+ DOM_VK_F23 = 0x30,
+ DOM_VK_F24 = 0x31
+ };
+
+
+ bool checkModifier(unsigned long modiferArg);
+
+ void initKeyEvent(DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ const DOM::AbstractView &viewArg,
+ long detailArg,
+ DOM::DOMString &outputStringArg,
+ unsigned long keyValArg,
+ unsigned long virtKeyValArg,
+ bool inputGeneratedArg,
+ bool numPadArg);
+
+ void initModifier(unsigned long modifierArg, bool valueArg);
+
+ bool inputGenerated() const;
+
+ unsigned long keyVal() const;
+
+ bool numPad() const { return m_numPad; }
+ DOM::DOMString outputString() const;
+
+ unsigned long virtKeyVal() const { return m_virtKeyVal; }
+
+ QKeyEvent *qKeyEvent;
+
+private:
+ unsigned long m_keyVal;
+ unsigned long m_virtKeyVal;
+ bool m_inputGenerated;
+ DOM::DOMString m_outputString;
+ bool m_numPad;
+
+ // bitfield containing state of modifiers. not part of the dom.
+ unsigned long m_modifier;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ KeyVal, VirtKeyVal, OutputString,
+ // Functions
+ CheckModifier, GetKeyVal, GetCharCode
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+class SVGMutationEventImpl : public SVGEventImpl
+{
+public:
+ SVGMutationEventImpl();
+ SVGMutationEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ SVGElementImpl *relatedNodeArg,
+ const DOM::DOMString &prevValueArg,
+ const DOM::DOMString &newValueArg,
+ const DOM::DOMString &attrNameArg,
+ unsigned short attrChangeArg);
+ ~SVGMutationEventImpl();
+
+ SVGElementImpl *relatedNode() const;
+ DOM::DOMString prevValue() const;
+ DOM::DOMString newValue() const;
+ DOM::DOMString attrName() const;
+ unsigned short attrChange() const;
+
+ void initMutationEvent(const DOM::DOMString &typeArg,
+ bool canBubbleArg,
+ bool cancelableArg,
+ SVGElementImpl *relatedNodeArg,
+ const DOM::DOMString &prevValueArg,
+ const DOM::DOMString &newValueArg,
+ const DOM::DOMString &attrNameArg,
+ unsigned short attrChangeArg);
+
+ virtual bool isMutationEvent() { return true; }
+ virtual DOM::DOMString eventModuleName() { return "MutationEvents"; }
+
+protected:
+ SVGElementImpl *m_relatedNode;
+ DOM::DOMString m_prevValue;
+ DOM::DOMString m_newValue;
+ DOM::DOMString m_attrName;
+ unsigned short m_attrChange;
+
+public:
+ KSVG_FORWARDGET
+};
+
+class SVGRegisteredEventListener
+{
+public:
+ SVGRegisteredEventListener(SVGEvent::EventId _id, SVGEventListener *_listener, bool _useCapture);
+ ~SVGRegisteredEventListener();
+
+ bool operator==(const SVGRegisteredEventListener &other);
+
+ SVGEvent::EventId id;
+ SVGEventListener *listener;
+ bool useCapture;
+
+private:
+ SVGRegisteredEventListener(const SVGRegisteredEventListener &);
+ SVGRegisteredEventListener &operator=(const SVGRegisteredEventListener &);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGEventImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGEventImplProtoFunc, SVGEventImpl)
+
+KSVG_DEFINE_PROTOTYPE(SVGUIEventImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGUIEventImplProtoFunc, SVGUIEventImpl)
+
+KSVG_DEFINE_PROTOTYPE(SVGMouseEventImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGMouseEventImplProtoFunc, SVGMouseEventImpl)
+
+KSVG_DEFINE_PROTOTYPE(SVGKeyEventImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGKeyEventImplProtoFunc, SVGKeyEventImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGExternalResourcesRequiredImpl.cc b/ksvg/impl/SVGExternalResourcesRequiredImpl.cc
new file mode 100644
index 00000000..90fd9141
--- /dev/null
+++ b/ksvg/impl/SVGExternalResourcesRequiredImpl.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGAnimatedBooleanImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+using namespace KSVG;
+
+#include "SVGExternalResourcesRequiredImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGExternalResourcesRequiredImpl::SVGExternalResourcesRequiredImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_externalResourcesRequired = new SVGAnimatedBooleanImpl();
+ m_externalResourcesRequired->ref();
+}
+
+SVGExternalResourcesRequiredImpl::~SVGExternalResourcesRequiredImpl()
+{
+ if(m_externalResourcesRequired)
+ m_externalResourcesRequired->deref();
+}
+
+SVGAnimatedBooleanImpl *SVGExternalResourcesRequiredImpl::externalResourcesRequired() const
+{
+ return m_externalResourcesRequired;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGExternalResourcesRequiredImpl::s_hashTable 2
+ externalResourcesRequired SVGExternalResourcesRequiredImpl::ExternalResourcesRequired DontDelete|ReadOnly
+@end
+*/
+
+Value SVGExternalResourcesRequiredImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ExternalResourcesRequired:
+ return m_externalResourcesRequired->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGExternalResourcesRequiredImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+ switch(token)
+ {
+ case ExternalResourcesRequired:
+ m_externalResourcesRequired->setBaseVal(value.toBoolean(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGExternalResourcesRequiredImpl.h b/ksvg/impl/SVGExternalResourcesRequiredImpl.h
new file mode 100644
index 00000000..9c5b93eb
--- /dev/null
+++ b/ksvg/impl/SVGExternalResourcesRequiredImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGExternalResourcesRequiredImpl_H
+#define SVGExternalResourcesRequiredImpl_H
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedBooleanImpl;
+class SVGExternalResourcesRequiredImpl
+{
+public:
+ SVGExternalResourcesRequiredImpl();
+ ~SVGExternalResourcesRequiredImpl();
+
+ SVGAnimatedBooleanImpl *externalResourcesRequired() const;
+
+private:
+ SVGAnimatedBooleanImpl *m_externalResourcesRequired;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ ExternalResourcesRequired
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEBlendElementImpl.cc b/ksvg/impl/SVGFEBlendElementImpl.cc
new file mode 100644
index 00000000..8b29cad5
--- /dev/null
+++ b/ksvg/impl/SVGFEBlendElementImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEBlendElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+SVGFEBlendElementImpl::SVGFEBlendElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_in2 = new SVGAnimatedStringImpl();
+ m_in2->ref();
+
+ m_mode = new SVGAnimatedEnumerationImpl();
+ m_mode->ref();
+}
+
+SVGFEBlendElementImpl::~SVGFEBlendElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_in2)
+ m_in2->deref();
+ if(m_mode)
+ m_mode->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEBlendElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedStringImpl *SVGFEBlendElementImpl::in2() const
+{
+ return m_in2;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEBlendElementImpl::mode() const
+{
+ return m_mode;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEBlendElementImpl.h b/ksvg/impl/SVGFEBlendElementImpl.h
new file mode 100644
index 00000000..36aab059
--- /dev/null
+++ b/ksvg/impl/SVGFEBlendElementImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEBlendElementImpl_H
+#define SVGFEBlendElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFEBlendElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEBlendElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEBlendElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedStringImpl *in2() const;
+ SVGAnimatedEnumerationImpl *mode() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedStringImpl *m_in2;
+ SVGAnimatedEnumerationImpl *m_mode;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEColorMatrixElementImpl.cc b/ksvg/impl/SVGFEColorMatrixElementImpl.cc
new file mode 100644
index 00000000..14c68a56
--- /dev/null
+++ b/ksvg/impl/SVGFEColorMatrixElementImpl.cc
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGFEColorMatrixElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEColorMatrixElementImpl::SVGFEColorMatrixElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_type = new SVGAnimatedEnumerationImpl();
+ m_type->ref();
+
+ m_values = new SVGAnimatedNumberListImpl();
+ m_values->ref();
+}
+
+SVGFEColorMatrixElementImpl::~SVGFEColorMatrixElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_type)
+ m_type->deref();
+ if(m_values)
+ m_values->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEColorMatrixElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEColorMatrixElementImpl::type() const
+{
+ return m_type;
+}
+
+SVGAnimatedNumberListImpl *SVGFEColorMatrixElementImpl::values() const
+{
+ return m_values;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEColorMatrixElementImpl.h b/ksvg/impl/SVGFEColorMatrixElementImpl.h
new file mode 100644
index 00000000..b637690b
--- /dev/null
+++ b/ksvg/impl/SVGFEColorMatrixElementImpl.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEColorMatrixElementImpl_H
+#define SVGFEColorMatrixElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGAnimatedNumberListImpl;
+class SVGFEColorMatrixElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEColorMatrixElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEColorMatrixElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedEnumerationImpl *type() const;
+ SVGAnimatedNumberListImpl *values() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedEnumerationImpl *m_type;
+ SVGAnimatedNumberListImpl *m_values;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEComponentTransferElementImpl.cc b/ksvg/impl/SVGFEComponentTransferElementImpl.cc
new file mode 100644
index 00000000..71ee4629
--- /dev/null
+++ b/ksvg/impl/SVGFEComponentTransferElementImpl.cc
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGFEComponentTransferElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEComponentTransferElementImpl::SVGFEComponentTransferElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+}
+
+SVGFEComponentTransferElementImpl::~SVGFEComponentTransferElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEComponentTransferElementImpl::in1() const
+{
+ return m_in1;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEComponentTransferElementImpl.h b/ksvg/impl/SVGFEComponentTransferElementImpl.h
new file mode 100644
index 00000000..21c0fd88
--- /dev/null
+++ b/ksvg/impl/SVGFEComponentTransferElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEComponentTransferElementImpl_H
+#define SVGFEComponentTransferElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGFEComponentTransferElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEComponentTransferElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEComponentTransferElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFECompositeElementImpl.cc b/ksvg/impl/SVGFECompositeElementImpl.cc
new file mode 100644
index 00000000..e8b91b95
--- /dev/null
+++ b/ksvg/impl/SVGFECompositeElementImpl.cc
@@ -0,0 +1,105 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGFECompositeElementImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+SVGFECompositeElementImpl::SVGFECompositeElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_in2 = new SVGAnimatedStringImpl();
+ m_in2->ref();
+
+ m_operator = new SVGAnimatedEnumerationImpl();
+ m_operator->ref();
+
+ m_k1 = new SVGAnimatedNumberImpl();
+ m_k1->ref();
+
+ m_k2 = new SVGAnimatedNumberImpl();
+ m_k2->ref();
+
+ m_k3 = new SVGAnimatedNumberImpl();
+ m_k3->ref();
+
+ m_k4 = new SVGAnimatedNumberImpl();
+ m_k4->ref();
+}
+
+SVGFECompositeElementImpl::~SVGFECompositeElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_in2)
+ m_in2->deref();
+ if(m_operator)
+ m_operator->deref();
+ if(m_k1)
+ m_k1->deref();
+ if(m_k2)
+ m_k2->deref();
+ if(m_k3)
+ m_k3->deref();
+ if(m_k4)
+ m_k4->deref();
+}
+
+SVGAnimatedStringImpl *SVGFECompositeElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedStringImpl *SVGFECompositeElementImpl::in2() const
+{
+ return m_in2;
+}
+
+SVGAnimatedEnumerationImpl *SVGFECompositeElementImpl::Operator() const
+{
+ return m_operator;
+}
+
+SVGAnimatedNumberImpl *SVGFECompositeElementImpl::k1() const
+{
+ return m_k1;
+}
+
+SVGAnimatedNumberImpl *SVGFECompositeElementImpl::k2() const
+{
+ return m_k2;
+}
+
+SVGAnimatedNumberImpl *SVGFECompositeElementImpl::k3() const
+{
+ return m_k3;
+}
+
+SVGAnimatedNumberImpl *SVGFECompositeElementImpl::k4() const
+{
+ return m_k4;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFECompositeElementImpl.h b/ksvg/impl/SVGFECompositeElementImpl.h
new file mode 100644
index 00000000..10796ec1
--- /dev/null
+++ b/ksvg/impl/SVGFECompositeElementImpl.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFECompositeElementImpl_H
+#define SVGFECompositeElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFECompositeElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFECompositeElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFECompositeElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedStringImpl *in2() const;
+ SVGAnimatedEnumerationImpl *Operator() const;
+ SVGAnimatedNumberImpl *k1() const;
+ SVGAnimatedNumberImpl *k2() const;
+ SVGAnimatedNumberImpl *k3() const;
+ SVGAnimatedNumberImpl *k4() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedStringImpl *m_in2;
+ SVGAnimatedEnumerationImpl *m_operator;
+ SVGAnimatedNumberImpl *m_k1;
+ SVGAnimatedNumberImpl *m_k2;
+ SVGAnimatedNumberImpl *m_k3;
+ SVGAnimatedNumberImpl *m_k4;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEConvolveMatrixElementImpl.cc b/ksvg/impl/SVGFEConvolveMatrixElementImpl.cc
new file mode 100644
index 00000000..88eb00ee
--- /dev/null
+++ b/ksvg/impl/SVGFEConvolveMatrixElementImpl.cc
@@ -0,0 +1,149 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedIntegerImpl.h"
+#include "SVGAnimatedBooleanImpl.h"
+#include "SVGAnimatedIntegerImpl.h"
+#include "SVGAnimatedNumberListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGFEConvolveMatrixElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEConvolveMatrixElementImpl::SVGFEConvolveMatrixElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_orderX = new SVGAnimatedIntegerImpl();
+ m_orderX->ref();
+
+ m_orderY = new SVGAnimatedIntegerImpl();
+ m_orderY->ref();
+
+ m_kernelMatrix = new SVGAnimatedNumberListImpl();
+ m_kernelMatrix->ref();
+
+ m_divisor = new SVGAnimatedNumberImpl();
+ m_divisor->ref();
+
+ m_bias = new SVGAnimatedNumberImpl();
+ m_bias->ref();
+
+ m_targetX = new SVGAnimatedIntegerImpl();
+ m_targetX->ref();
+
+ m_targetY = new SVGAnimatedIntegerImpl();
+ m_targetY->ref();
+
+ m_edgeMode = new SVGAnimatedEnumerationImpl();
+ m_edgeMode->ref();
+
+ m_kernelUnitLengthX = new SVGAnimatedLengthImpl();
+ m_kernelUnitLengthX->ref();
+
+ m_kernelUnitLengthY = new SVGAnimatedLengthImpl();
+ m_kernelUnitLengthY->ref();
+
+ m_preserveAlpha = new SVGAnimatedBooleanImpl();
+ m_preserveAlpha->ref();
+}
+
+SVGFEConvolveMatrixElementImpl::~SVGFEConvolveMatrixElementImpl()
+{
+ if(m_orderX)
+ m_orderX->deref();
+ if(m_orderY)
+ m_orderY->deref();
+ if(m_kernelMatrix)
+ m_kernelMatrix->deref();
+ if(m_divisor)
+ m_divisor->deref();
+ if(m_bias)
+ m_bias->deref();
+ if(m_targetX)
+ m_targetX->deref();
+ if(m_targetY)
+ m_targetY->deref();
+ if(m_edgeMode)
+ m_edgeMode->deref();
+ if(m_kernelUnitLengthX)
+ m_kernelUnitLengthX->deref();
+ if(m_kernelUnitLengthY)
+ m_kernelUnitLengthY->deref();
+ if(m_preserveAlpha)
+ m_preserveAlpha->deref();
+}
+
+SVGAnimatedIntegerImpl *SVGFEConvolveMatrixElementImpl::orderX() const
+{
+ return m_orderX;
+}
+
+SVGAnimatedIntegerImpl *SVGFEConvolveMatrixElementImpl::orderY() const
+{
+ return m_orderY;
+}
+
+SVGAnimatedNumberListImpl *SVGFEConvolveMatrixElementImpl::kernelMatrix() const
+{
+ return m_kernelMatrix;
+}
+
+SVGAnimatedNumberImpl *SVGFEConvolveMatrixElementImpl::divisor() const
+{
+ return m_divisor;
+}
+
+SVGAnimatedNumberImpl *SVGFEConvolveMatrixElementImpl::bias() const
+{
+ return m_bias;
+}
+
+SVGAnimatedIntegerImpl *SVGFEConvolveMatrixElementImpl::targetX() const
+{
+ return m_targetX;
+}
+
+SVGAnimatedIntegerImpl *SVGFEConvolveMatrixElementImpl::targetY() const
+{
+ return m_targetY;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEConvolveMatrixElementImpl::edgeMode() const
+{
+ return m_edgeMode;
+}
+
+SVGAnimatedLengthImpl *SVGFEConvolveMatrixElementImpl::kernelUnitLengthX() const
+{
+ return m_kernelUnitLengthX;
+}
+
+SVGAnimatedLengthImpl *SVGFEConvolveMatrixElementImpl::kernelUnitLengthY() const
+{
+ return m_kernelUnitLengthY;
+}
+
+SVGAnimatedBooleanImpl *SVGFEConvolveMatrixElementImpl::preserveAlpha() const
+{
+ return m_preserveAlpha;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEConvolveMatrixElementImpl.h b/ksvg/impl/SVGFEConvolveMatrixElementImpl.h
new file mode 100644
index 00000000..e26518d5
--- /dev/null
+++ b/ksvg/impl/SVGFEConvolveMatrixElementImpl.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEConvolveMatrixElementImpl_H
+#define SVGFEConvolveMatrixElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedIntegerImpl;
+class SVGAnimatedIntegerImpl;
+class SVGAnimatedBooleanImpl;
+class SVGAnimatedNumberListImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFEConvolveMatrixElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEConvolveMatrixElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEConvolveMatrixElementImpl();
+
+ SVGAnimatedIntegerImpl *orderX() const;
+ SVGAnimatedIntegerImpl *orderY() const;
+ SVGAnimatedNumberListImpl *kernelMatrix() const;
+ SVGAnimatedNumberImpl *divisor() const;
+ SVGAnimatedNumberImpl *bias() const;
+ SVGAnimatedIntegerImpl *targetX() const;
+ SVGAnimatedIntegerImpl *targetY() const;
+ SVGAnimatedEnumerationImpl *edgeMode() const;
+ SVGAnimatedLengthImpl *kernelUnitLengthX() const;
+ SVGAnimatedLengthImpl *kernelUnitLengthY() const;
+ SVGAnimatedBooleanImpl *preserveAlpha() const;
+
+private:
+ SVGAnimatedIntegerImpl *m_orderX;
+ SVGAnimatedIntegerImpl *m_orderY;
+ SVGAnimatedNumberListImpl *m_kernelMatrix;
+ SVGAnimatedNumberImpl *m_divisor;
+ SVGAnimatedNumberImpl *m_bias;
+ SVGAnimatedIntegerImpl *m_targetX;
+ SVGAnimatedIntegerImpl *m_targetY;
+ SVGAnimatedEnumerationImpl *m_edgeMode;
+ SVGAnimatedLengthImpl *m_kernelUnitLengthX;
+ SVGAnimatedLengthImpl *m_kernelUnitLengthY;
+ SVGAnimatedBooleanImpl *m_preserveAlpha;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDiffuseLightingElementImpl.cc b/ksvg/impl/SVGFEDiffuseLightingElementImpl.cc
new file mode 100644
index 00000000..0b5c2565
--- /dev/null
+++ b/ksvg/impl/SVGFEDiffuseLightingElementImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFEDiffuseLightingElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEDiffuseLightingElementImpl::SVGFEDiffuseLightingElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_surfaceScale = new SVGAnimatedNumberImpl();
+ m_surfaceScale->ref();
+
+ m_diffuseConstant = new SVGAnimatedNumberImpl();
+ m_diffuseConstant->ref();
+}
+
+SVGFEDiffuseLightingElementImpl::~SVGFEDiffuseLightingElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_surfaceScale)
+ m_surfaceScale->deref();
+ if(m_diffuseConstant)
+ m_diffuseConstant->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEDiffuseLightingElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedNumberImpl *SVGFEDiffuseLightingElementImpl::surfaceScale() const
+{
+ return m_surfaceScale;
+}
+
+SVGAnimatedNumberImpl *SVGFEDiffuseLightingElementImpl::diffuseConstant() const
+{
+ return m_diffuseConstant;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDiffuseLightingElementImpl.h b/ksvg/impl/SVGFEDiffuseLightingElementImpl.h
new file mode 100644
index 00000000..0be4f7f1
--- /dev/null
+++ b/ksvg/impl/SVGFEDiffuseLightingElementImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDiffuseLightingElementImpl_H
+#define SVGFEDiffuseLightingElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGFEDiffuseLightingElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEDiffuseLightingElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEDiffuseLightingElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedNumberImpl *surfaceScale() const;
+ SVGAnimatedNumberImpl *diffuseConstant() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedNumberImpl *m_surfaceScale;
+ SVGAnimatedNumberImpl *m_diffuseConstant;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDisplacementMapElementImpl.cc b/ksvg/impl/SVGFEDisplacementMapElementImpl.cc
new file mode 100644
index 00000000..92665ec7
--- /dev/null
+++ b/ksvg/impl/SVGFEDisplacementMapElementImpl.cc
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGFEDisplacementMapElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEDisplacementMapElementImpl::SVGFEDisplacementMapElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_in2 = new SVGAnimatedStringImpl();
+ m_in2->ref();
+
+ m_scale = new SVGAnimatedNumberImpl();
+ m_scale->ref();
+
+ m_xChannelSelector = new SVGAnimatedEnumerationImpl();
+ m_xChannelSelector->ref();
+
+ m_yChannelSelector = new SVGAnimatedEnumerationImpl();
+ m_yChannelSelector->ref();
+}
+
+SVGFEDisplacementMapElementImpl::~SVGFEDisplacementMapElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_in2)
+ m_in2->deref();
+ if(m_scale)
+ m_scale->deref();
+ if(m_xChannelSelector)
+ m_xChannelSelector->deref();
+ if(m_yChannelSelector)
+ m_yChannelSelector->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEDisplacementMapElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedStringImpl *SVGFEDisplacementMapElementImpl::in2() const
+{
+ return m_in2;
+}
+
+SVGAnimatedNumberImpl *SVGFEDisplacementMapElementImpl::scale() const
+{
+ return m_scale;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEDisplacementMapElementImpl::xChannelSelector() const
+{
+ return m_xChannelSelector;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEDisplacementMapElementImpl::yChannelSelector() const
+{
+ return m_yChannelSelector;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDisplacementMapElementImpl.h b/ksvg/impl/SVGFEDisplacementMapElementImpl.h
new file mode 100644
index 00000000..3774b6cc
--- /dev/null
+++ b/ksvg/impl/SVGFEDisplacementMapElementImpl.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDisplacementMapElementImpl_H
+#define SVGFEDisplacementMapElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFEDisplacementMapElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEDisplacementMapElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEDisplacementMapElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedStringImpl *in2() const;
+ SVGAnimatedNumberImpl *scale() const;
+ SVGAnimatedEnumerationImpl *xChannelSelector() const;
+ SVGAnimatedEnumerationImpl *yChannelSelector() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedStringImpl *m_in2;
+ SVGAnimatedNumberImpl *m_scale;
+ SVGAnimatedEnumerationImpl *m_xChannelSelector;
+ SVGAnimatedEnumerationImpl *m_yChannelSelector;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDistantLightElementImpl.cc b/ksvg/impl/SVGFEDistantLightElementImpl.cc
new file mode 100644
index 00000000..b40885e0
--- /dev/null
+++ b/ksvg/impl/SVGFEDistantLightElementImpl.cc
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFEDistantLightElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEDistantLightElementImpl::SVGFEDistantLightElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_azimuth = new SVGAnimatedNumberImpl();
+ m_azimuth->ref();
+
+ m_elevation = new SVGAnimatedNumberImpl();
+ m_elevation->ref();
+}
+
+SVGFEDistantLightElementImpl::~SVGFEDistantLightElementImpl()
+{
+ if(m_azimuth)
+ m_azimuth->deref();
+ if(m_elevation)
+ m_elevation->deref();
+}
+
+SVGAnimatedNumberImpl *SVGFEDistantLightElementImpl::azimuth() const
+{
+ return m_azimuth;
+}
+
+SVGAnimatedNumberImpl *SVGFEDistantLightElementImpl::elevation() const
+{
+ return m_elevation;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEDistantLightElementImpl.h b/ksvg/impl/SVGFEDistantLightElementImpl.h
new file mode 100644
index 00000000..4d995a44
--- /dev/null
+++ b/ksvg/impl/SVGFEDistantLightElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEDistantLightElementImpl_H
+#define SVGFEDistantLightElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGFEDistantLightElementImpl : public SVGElementImpl
+{
+public:
+ SVGFEDistantLightElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEDistantLightElementImpl();
+
+ SVGAnimatedNumberImpl *azimuth() const;
+ SVGAnimatedNumberImpl *elevation() const;
+
+private:
+ SVGAnimatedNumberImpl *m_azimuth;
+ SVGAnimatedNumberImpl *m_elevation;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFloodElementImpl.cc b/ksvg/impl/SVGFEFloodElementImpl.cc
new file mode 100644
index 00000000..7cbecafd
--- /dev/null
+++ b/ksvg/impl/SVGFEFloodElementImpl.cc
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFloodElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+SVGFEFloodElementImpl::SVGFEFloodElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGStylableImpl(this), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+}
+
+SVGFEFloodElementImpl::~SVGFEFloodElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEFloodElementImpl::in1() const
+{
+ return m_in1;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFloodElementImpl.h b/ksvg/impl/SVGFEFloodElementImpl.h
new file mode 100644
index 00000000..858959a9
--- /dev/null
+++ b/ksvg/impl/SVGFEFloodElementImpl.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFloodElementImpl_H
+#define SVGFEFloodElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGFEFloodElementImpl : public SVGElementImpl,
+ public SVGStylableImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEFloodElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEFloodElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncAElementImpl.cc b/ksvg/impl/SVGFEFuncAElementImpl.cc
new file mode 100644
index 00000000..c7a535fa
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncAElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncAElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncAElementImpl::SVGFEFuncAElementImpl(DOM::ElementImpl *impl) : SVGComponentTransferFunctionElementImpl(impl)
+{
+}
+
+SVGFEFuncAElementImpl::~SVGFEFuncAElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncAElementImpl.h b/ksvg/impl/SVGFEFuncAElementImpl.h
new file mode 100644
index 00000000..7999c7e2
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncAElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncAElementImpl_H
+#define SVGFEFuncAElementImpl_H
+
+#include "SVGComponentTransferFunctionElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncAElementImpl : public SVGComponentTransferFunctionElementImpl
+{
+public:
+ SVGFEFuncAElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEFuncAElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncBElementImpl.cc b/ksvg/impl/SVGFEFuncBElementImpl.cc
new file mode 100644
index 00000000..4b0bbf71
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncBElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncBElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncBElementImpl::SVGFEFuncBElementImpl(DOM::ElementImpl *impl) : SVGComponentTransferFunctionElementImpl(impl)
+{
+}
+
+SVGFEFuncBElementImpl::~SVGFEFuncBElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncBElementImpl.h b/ksvg/impl/SVGFEFuncBElementImpl.h
new file mode 100644
index 00000000..7236debb
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncBElementImpl.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncBElementImpl_H
+#define SVGFEFuncBElementImpl_H
+
+#include "SVGComponentTransferFunctionElementImpl.h"
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncBElementImpl : public SVGComponentTransferFunctionElementImpl
+{
+public:
+ SVGFEFuncBElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEFuncBElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncGElementImpl.cc b/ksvg/impl/SVGFEFuncGElementImpl.cc
new file mode 100644
index 00000000..8a60fbee
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncGElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncGElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncGElementImpl::SVGFEFuncGElementImpl(DOM::ElementImpl *impl) : SVGComponentTransferFunctionElementImpl(impl)
+{
+}
+
+SVGFEFuncGElementImpl::~SVGFEFuncGElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncGElementImpl.h b/ksvg/impl/SVGFEFuncGElementImpl.h
new file mode 100644
index 00000000..44baec8d
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncGElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncGElementImpl_H
+#define SVGFEFuncGElementImpl_H
+
+#include "SVGComponentTransferFunctionElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncGElementImpl : public SVGComponentTransferFunctionElementImpl
+{
+public:
+ SVGFEFuncGElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEFuncGElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncRElementImpl.cc b/ksvg/impl/SVGFEFuncRElementImpl.cc
new file mode 100644
index 00000000..fe1b2d44
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncRElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEFuncRElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEFuncRElementImpl::SVGFEFuncRElementImpl(DOM::ElementImpl *impl) : SVGComponentTransferFunctionElementImpl(impl)
+{
+}
+
+SVGFEFuncRElementImpl::~SVGFEFuncRElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEFuncRElementImpl.h b/ksvg/impl/SVGFEFuncRElementImpl.h
new file mode 100644
index 00000000..17aa7812
--- /dev/null
+++ b/ksvg/impl/SVGFEFuncRElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEFuncRElementImpl_H
+#define SVGFEFuncRElementImpl_H
+
+#include "SVGComponentTransferFunctionElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEFuncRElementImpl : public SVGComponentTransferFunctionElementImpl
+{
+public:
+ SVGFEFuncRElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEFuncRElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEGaussianBlurElementImpl.cc b/ksvg/impl/SVGFEGaussianBlurElementImpl.cc
new file mode 100644
index 00000000..bcc2e0bf
--- /dev/null
+++ b/ksvg/impl/SVGFEGaussianBlurElementImpl.cc
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFEGaussianBlurElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEGaussianBlurElementImpl::SVGFEGaussianBlurElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_stdDeviationX = new SVGAnimatedNumberImpl();
+ m_stdDeviationX->ref();
+
+ m_stdDeviationY = new SVGAnimatedNumberImpl();
+ m_stdDeviationY->ref();
+}
+
+SVGFEGaussianBlurElementImpl::~SVGFEGaussianBlurElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_stdDeviationX)
+ m_stdDeviationX->deref();
+ if(m_stdDeviationY)
+ m_stdDeviationY->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEGaussianBlurElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedNumberImpl *SVGFEGaussianBlurElementImpl::stdDeviationX() const
+{
+ return m_stdDeviationX;
+}
+
+SVGAnimatedNumberImpl *SVGFEGaussianBlurElementImpl::stdDeviationY() const
+{
+ return m_stdDeviationY;
+}
+
+void SVGFEGaussianBlurElementImpl::setStdDeviation(float /*stdDeviationX*/, float /*stdDeviationY*/)
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEGaussianBlurElementImpl.h b/ksvg/impl/SVGFEGaussianBlurElementImpl.h
new file mode 100644
index 00000000..97707edb
--- /dev/null
+++ b/ksvg/impl/SVGFEGaussianBlurElementImpl.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEGaussianBlurElementImpl_H
+#define SVGFEGaussianBlurElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGFEGaussianBlurElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEGaussianBlurElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEGaussianBlurElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedNumberImpl *stdDeviationX() const;
+ SVGAnimatedNumberImpl *stdDeviationY() const;
+ void setStdDeviation(float stdDeviationX, float stdDeviationY);
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedNumberImpl *m_stdDeviationX;
+ SVGAnimatedNumberImpl *m_stdDeviationY;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEImageElementImpl.cc b/ksvg/impl/SVGFEImageElementImpl.cc
new file mode 100644
index 00000000..f41e482d
--- /dev/null
+++ b/ksvg/impl/SVGFEImageElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEImageElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEImageElementImpl::SVGFEImageElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGFilterPrimitiveStandardAttributesImpl()
+{
+}
+
+SVGFEImageElementImpl::~SVGFEImageElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEImageElementImpl.h b/ksvg/impl/SVGFEImageElementImpl.h
new file mode 100644
index 00000000..3d03e77d
--- /dev/null
+++ b/ksvg/impl/SVGFEImageElementImpl.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEImageElementImpl_H
+#define SVGFEImageElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEImageElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEImageElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEImageElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMergeElementImpl.cc b/ksvg/impl/SVGFEMergeElementImpl.cc
new file mode 100644
index 00000000..6eca907a
--- /dev/null
+++ b/ksvg/impl/SVGFEMergeElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFEMergeElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEMergeElementImpl::SVGFEMergeElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+}
+
+SVGFEMergeElementImpl::~SVGFEMergeElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMergeElementImpl.h b/ksvg/impl/SVGFEMergeElementImpl.h
new file mode 100644
index 00000000..f4b6aaaf
--- /dev/null
+++ b/ksvg/impl/SVGFEMergeElementImpl.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMergeElementImpl_H
+#define SVGFEMergeElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGFEMergeElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEMergeElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEMergeElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMergeNodeElementImpl.cc b/ksvg/impl/SVGFEMergeNodeElementImpl.cc
new file mode 100644
index 00000000..1191df3b
--- /dev/null
+++ b/ksvg/impl/SVGFEMergeNodeElementImpl.cc
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGFEMergeNodeElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEMergeNodeElementImpl::SVGFEMergeNodeElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+}
+
+SVGFEMergeNodeElementImpl::~SVGFEMergeNodeElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEMergeNodeElementImpl::in1() const
+{
+ return m_in1;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMergeNodeElementImpl.h b/ksvg/impl/SVGFEMergeNodeElementImpl.h
new file mode 100644
index 00000000..5b380757
--- /dev/null
+++ b/ksvg/impl/SVGFEMergeNodeElementImpl.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMergeNodeElementImpl_H
+#define SVGFEMergeNodeElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGFEMergeNodeElementImpl : public SVGElementImpl
+{
+public:
+ SVGFEMergeNodeElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEMergeNodeElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMorphologyElementImpl.cc b/ksvg/impl/SVGFEMorphologyElementImpl.cc
new file mode 100644
index 00000000..e7f1a100
--- /dev/null
+++ b/ksvg/impl/SVGFEMorphologyElementImpl.cc
@@ -0,0 +1,75 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGFEMorphologyElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEMorphologyElementImpl::SVGFEMorphologyElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_operator = new SVGAnimatedEnumerationImpl();
+ m_operator->ref();
+
+ m_radiusX = new SVGAnimatedLengthImpl();
+ m_radiusX->ref();
+
+ m_radiusY = new SVGAnimatedLengthImpl();
+ m_radiusY->ref();
+}
+
+SVGFEMorphologyElementImpl::~SVGFEMorphologyElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_operator)
+ m_operator->deref();
+ if(m_radiusX)
+ m_radiusX->deref();
+ if(m_radiusY)
+ m_radiusY->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEMorphologyElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedEnumerationImpl *SVGFEMorphologyElementImpl::Operator() const
+{
+ return m_operator;
+}
+
+SVGAnimatedLengthImpl *SVGFEMorphologyElementImpl::radiusX() const
+{
+ return m_radiusX;
+}
+
+SVGAnimatedLengthImpl *SVGFEMorphologyElementImpl::radiusY() const
+{
+ return m_radiusY;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEMorphologyElementImpl.h b/ksvg/impl/SVGFEMorphologyElementImpl.h
new file mode 100644
index 00000000..7941e772
--- /dev/null
+++ b/ksvg/impl/SVGFEMorphologyElementImpl.h
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMorphologyElementImpl_H
+#define SVGFEMorphologyElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFEMorphologyElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEMorphologyElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGFEMorphologyElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedEnumerationImpl *Operator() const;
+ SVGAnimatedLengthImpl *radiusX() const;
+ SVGAnimatedLengthImpl *radiusY() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedEnumerationImpl *m_operator;
+ SVGAnimatedLengthImpl *m_radiusX;
+ SVGAnimatedLengthImpl *m_radiusY;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEOffsetElementImpl.cc b/ksvg/impl/SVGFEOffsetElementImpl.cc
new file mode 100644
index 00000000..8c8bfbeb
--- /dev/null
+++ b/ksvg/impl/SVGFEOffsetElementImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFEOffsetElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEOffsetElementImpl::SVGFEOffsetElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_dx = new SVGAnimatedNumberImpl();
+ m_dx->ref();
+
+ m_dy = new SVGAnimatedNumberImpl();
+ m_dy->ref();
+}
+
+SVGFEOffsetElementImpl::~SVGFEOffsetElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_dx)
+ m_dx->deref();
+ if(m_dy)
+ m_dy->deref();
+}
+
+SVGAnimatedStringImpl *SVGFEOffsetElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedNumberImpl *SVGFEOffsetElementImpl::dx() const
+{
+ return m_dx;
+}
+
+SVGAnimatedNumberImpl *SVGFEOffsetElementImpl::dy() const
+{
+ return m_dy;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEOffsetElementImpl.h b/ksvg/impl/SVGFEOffsetElementImpl.h
new file mode 100644
index 00000000..e8c3448a
--- /dev/null
+++ b/ksvg/impl/SVGFEOffsetElementImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEOffsetElementImpl_H
+#define SVGFEOffsetElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGFEOffsetElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFEOffsetElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGFEOffsetElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedNumberImpl *dx() const;
+ SVGAnimatedNumberImpl *dy() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedNumberImpl *m_dx;
+ SVGAnimatedNumberImpl *m_dy;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEPointLightElementImpl.cc b/ksvg/impl/SVGFEPointLightElementImpl.cc
new file mode 100644
index 00000000..ad95d20a
--- /dev/null
+++ b/ksvg/impl/SVGFEPointLightElementImpl.cc
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFEPointLightElementImpl.h"
+
+using namespace KSVG;
+
+SVGFEPointLightElementImpl::SVGFEPointLightElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_x = new SVGAnimatedNumberImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedNumberImpl();
+ m_y->ref();
+
+ m_z = new SVGAnimatedNumberImpl();
+ m_z->ref();
+}
+
+SVGFEPointLightElementImpl::~SVGFEPointLightElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_z)
+ m_z->deref();
+}
+
+SVGAnimatedNumberImpl *SVGFEPointLightElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedNumberImpl *SVGFEPointLightElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedNumberImpl *SVGFEPointLightElementImpl::z() const
+{
+ return m_z;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFEPointLightElementImpl.h b/ksvg/impl/SVGFEPointLightElementImpl.h
new file mode 100644
index 00000000..6d66c98b
--- /dev/null
+++ b/ksvg/impl/SVGFEPointLightElementImpl.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEPointLightElementImpl_H
+#define SVGFEPointLightElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGFEPointLightElementImpl : public SVGElementImpl
+{
+public:
+ SVGFEPointLightElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFEPointLightElementImpl();
+
+ SVGAnimatedNumberImpl *x() const;
+ SVGAnimatedNumberImpl *y() const;
+ SVGAnimatedNumberImpl *z() const;
+
+private:
+ SVGAnimatedNumberImpl *m_x;
+ SVGAnimatedNumberImpl *m_y;
+ SVGAnimatedNumberImpl *m_z;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFESpecularLightingElementImpl.cc b/ksvg/impl/SVGFESpecularLightingElementImpl.cc
new file mode 100644
index 00000000..9974e146
--- /dev/null
+++ b/ksvg/impl/SVGFESpecularLightingElementImpl.cc
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFESpecularLightingElementImpl.h"
+
+using namespace KSVG;
+
+SVGFESpecularLightingElementImpl::SVGFESpecularLightingElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+
+ m_surfaceScale = new SVGAnimatedNumberImpl();
+ m_surfaceScale->ref();
+
+ m_specularConstant = new SVGAnimatedNumberImpl();
+ m_specularConstant->ref();
+
+ m_specularExponent = new SVGAnimatedNumberImpl();
+ m_specularExponent->ref();
+}
+
+SVGFESpecularLightingElementImpl::~SVGFESpecularLightingElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+ if(m_surfaceScale)
+ m_surfaceScale->deref();
+ if(m_specularConstant)
+ m_specularConstant->deref();
+ if(m_specularExponent)
+ m_specularExponent->deref();
+}
+
+SVGAnimatedStringImpl *SVGFESpecularLightingElementImpl::in1() const
+{
+ return m_in1;
+}
+
+SVGAnimatedNumberImpl *SVGFESpecularLightingElementImpl::surfaceScale() const
+{
+ return m_surfaceScale;
+}
+
+SVGAnimatedNumberImpl *SVGFESpecularLightingElementImpl::specularConstant() const
+{
+ return m_specularConstant;
+}
+
+SVGAnimatedNumberImpl *SVGFESpecularLightingElementImpl::specularExponent() const
+{
+ return m_specularExponent;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFESpecularLightingElementImpl.h b/ksvg/impl/SVGFESpecularLightingElementImpl.h
new file mode 100644
index 00000000..527e7f5b
--- /dev/null
+++ b/ksvg/impl/SVGFESpecularLightingElementImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFESpecularLightingElementImpl_H
+#define SVGFESpecularLightingElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGAnimatedNumberImpl;
+class SVGFESpecularLightingElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFESpecularLightingElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFESpecularLightingElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+ SVGAnimatedNumberImpl *surfaceScale() const;
+ SVGAnimatedNumberImpl *specularConstant() const;
+ SVGAnimatedNumberImpl *specularExponent() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+ SVGAnimatedNumberImpl *m_surfaceScale;
+ SVGAnimatedNumberImpl *m_specularConstant;
+ SVGAnimatedNumberImpl *m_specularExponent;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFESpotLightElementImpl.cc b/ksvg/impl/SVGFESpotLightElementImpl.cc
new file mode 100644
index 00000000..96950eda
--- /dev/null
+++ b/ksvg/impl/SVGFESpotLightElementImpl.cc
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGFESpotLightElementImpl.h"
+
+using namespace KSVG;
+
+SVGFESpotLightElementImpl::SVGFESpotLightElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_x = new SVGAnimatedNumberImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedNumberImpl();
+ m_y->ref();
+
+ m_z = new SVGAnimatedNumberImpl();
+ m_z->ref();
+
+ m_pointsAtX = new SVGAnimatedNumberImpl();
+ m_pointsAtX->ref();
+
+ m_pointsAtY = new SVGAnimatedNumberImpl();
+ m_pointsAtY->ref();
+
+ m_pointsAtZ = new SVGAnimatedNumberImpl();
+ m_pointsAtZ->ref();
+
+ m_specularExponent = new SVGAnimatedNumberImpl();
+ m_specularExponent->ref();
+
+ m_limitingConeAngle = new SVGAnimatedNumberImpl();
+ m_limitingConeAngle->ref();
+}
+
+SVGFESpotLightElementImpl::~SVGFESpotLightElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_z)
+ m_z->deref();
+ if(m_pointsAtX)
+ m_pointsAtX->deref();
+ if(m_pointsAtY)
+ m_pointsAtY->deref();
+ if(m_pointsAtZ)
+ m_pointsAtZ->deref();
+ if(m_specularExponent)
+ m_specularExponent->deref();
+ if(m_limitingConeAngle)
+ m_limitingConeAngle->deref();
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::z() const
+{
+ return m_z;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::pointsAtX() const
+{
+ return m_pointsAtX;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::pointsAtY() const
+{
+ return m_pointsAtY;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::pointsAtZ() const
+{
+ return m_pointsAtZ;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::specularExponent() const
+{
+ return m_specularExponent;
+}
+
+SVGAnimatedNumberImpl *SVGFESpotLightElementImpl::limitingConeAngle() const
+{
+ return m_limitingConeAngle;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFESpotLightElementImpl.h b/ksvg/impl/SVGFESpotLightElementImpl.h
new file mode 100644
index 00000000..3c808698
--- /dev/null
+++ b/ksvg/impl/SVGFESpotLightElementImpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFESpotLightElementImpl_H
+#define SVGFESpotLightElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGFESpotLightElementImpl : public SVGElementImpl
+{
+public:
+ SVGFESpotLightElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFESpotLightElementImpl();
+
+ SVGAnimatedNumberImpl *x() const;
+ SVGAnimatedNumberImpl *y() const;
+ SVGAnimatedNumberImpl *z() const;
+ SVGAnimatedNumberImpl *pointsAtX() const;
+ SVGAnimatedNumberImpl *pointsAtY() const;
+ SVGAnimatedNumberImpl *pointsAtZ() const;
+ SVGAnimatedNumberImpl *specularExponent() const;
+ SVGAnimatedNumberImpl *limitingConeAngle() const;
+
+private:
+ SVGAnimatedNumberImpl *m_x;
+ SVGAnimatedNumberImpl *m_y;
+ SVGAnimatedNumberImpl *m_z;
+ SVGAnimatedNumberImpl *m_pointsAtX;
+ SVGAnimatedNumberImpl *m_pointsAtY;
+ SVGAnimatedNumberImpl *m_pointsAtZ;
+ SVGAnimatedNumberImpl *m_specularExponent;
+ SVGAnimatedNumberImpl *m_limitingConeAngle;
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFETileElementImpl.cc b/ksvg/impl/SVGFETileElementImpl.cc
new file mode 100644
index 00000000..2a794302
--- /dev/null
+++ b/ksvg/impl/SVGFETileElementImpl.cc
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFETileElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+SVGFETileElementImpl::SVGFETileElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_in1 = new SVGAnimatedStringImpl();
+ m_in1->ref();
+}
+
+SVGFETileElementImpl::~SVGFETileElementImpl()
+{
+ if(m_in1)
+ m_in1->deref();
+}
+
+SVGAnimatedStringImpl *SVGFETileElementImpl::in1() const
+{
+ return m_in1;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFETileElementImpl.h b/ksvg/impl/SVGFETileElementImpl.h
new file mode 100644
index 00000000..29cd4167
--- /dev/null
+++ b/ksvg/impl/SVGFETileElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFETileElementImpl_H
+#define SVGFETileElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGFETileElementImpl : public SVGElementImpl,
+ public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFETileElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFETileElementImpl();
+
+ SVGAnimatedStringImpl *in1() const;
+
+private:
+ SVGAnimatedStringImpl *m_in1;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFETurbulenceElementImpl.cc b/ksvg/impl/SVGFETurbulenceElementImpl.cc
new file mode 100644
index 00000000..79c68de3
--- /dev/null
+++ b/ksvg/impl/SVGFETurbulenceElementImpl.cc
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedIntegerImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGFETurbulenceElementImpl.h"
+
+using namespace KSVG;
+
+SVGFETurbulenceElementImpl::SVGFETurbulenceElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_baseFrequencyX = new SVGAnimatedNumberImpl();
+ m_baseFrequencyX->ref();
+
+ m_baseFrequencyY = new SVGAnimatedNumberImpl();
+ m_baseFrequencyY->ref();
+
+ m_numOctaves = new SVGAnimatedIntegerImpl();
+ m_numOctaves->ref();
+
+ m_seed = new SVGAnimatedNumberImpl();
+ m_seed->ref();
+
+ m_stitchTiles = new SVGAnimatedEnumerationImpl();
+ m_stitchTiles->ref();
+
+ m_type = new SVGAnimatedEnumerationImpl();
+ m_type->ref();
+}
+
+SVGFETurbulenceElementImpl::~SVGFETurbulenceElementImpl()
+{
+ if(m_baseFrequencyX)
+ m_baseFrequencyX->deref();
+
+ if(m_baseFrequencyY)
+ m_baseFrequencyY->deref();
+
+ if(m_numOctaves)
+ m_numOctaves->deref();
+
+ if(m_seed)
+ m_seed->deref();
+
+ if(m_stitchTiles)
+ m_stitchTiles->deref();
+
+ if(m_type)
+ m_type->deref();
+}
+
+SVGAnimatedNumberImpl *SVGFETurbulenceElementImpl::baseFrequencyX() const
+{
+ return m_baseFrequencyX;
+}
+
+SVGAnimatedNumberImpl *SVGFETurbulenceElementImpl::baseFrequencyY() const
+{
+ return m_baseFrequencyY;
+}
+
+SVGAnimatedIntegerImpl *SVGFETurbulenceElementImpl::numOctaves() const
+{
+ return m_numOctaves;
+}
+
+SVGAnimatedNumberImpl *SVGFETurbulenceElementImpl::seed() const
+{
+ return m_seed;
+}
+
+SVGAnimatedEnumerationImpl *SVGFETurbulenceElementImpl::stitchTiles() const
+{
+ return m_stitchTiles;
+}
+
+SVGAnimatedEnumerationImpl *SVGFETurbulenceElementImpl::type() const
+{
+ return m_type;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFETurbulenceElementImpl.h b/ksvg/impl/SVGFETurbulenceElementImpl.h
new file mode 100644
index 00000000..1275f8ca
--- /dev/null
+++ b/ksvg/impl/SVGFETurbulenceElementImpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFETurbulenceElementImpl_H
+#define SVGFETurbulenceElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGAnimatedIntegerImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFETurbulenceElementImpl : public SVGElementImpl, public SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFETurbulenceElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFETurbulenceElementImpl();
+
+ SVGAnimatedNumberImpl *baseFrequencyX() const;
+ SVGAnimatedNumberImpl *baseFrequencyY() const;
+ SVGAnimatedIntegerImpl *numOctaves() const;
+ SVGAnimatedNumberImpl *seed() const;
+ SVGAnimatedEnumerationImpl *stitchTiles() const;
+ SVGAnimatedEnumerationImpl *type() const;
+
+private:
+ SVGAnimatedNumberImpl *m_baseFrequencyX;
+ SVGAnimatedNumberImpl *m_baseFrequencyY;
+ SVGAnimatedIntegerImpl *m_numOctaves;
+ SVGAnimatedNumberImpl *m_seed;
+ SVGAnimatedEnumerationImpl *m_stitchTiles;
+ SVGAnimatedEnumerationImpl *m_type;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFilterElementImpl.cc b/ksvg/impl/SVGFilterElementImpl.cc
new file mode 100644
index 00000000..eb83ad4b
--- /dev/null
+++ b/ksvg/impl/SVGFilterElementImpl.cc
@@ -0,0 +1,119 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFilterElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedIntegerImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+SVGFilterElementImpl::SVGFilterElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this)
+{
+ m_filterUnits = new SVGAnimatedEnumerationImpl();
+ m_filterUnits->ref();
+
+ m_primitiveUnits = new SVGAnimatedEnumerationImpl();
+ m_primitiveUnits->ref();
+
+ m_x = new SVGAnimatedLengthImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl();
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl();
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl();
+ m_height->ref();
+
+ m_filterResX = new SVGAnimatedIntegerImpl();
+ m_filterResX->ref();
+
+ m_filterResY = new SVGAnimatedIntegerImpl();
+ m_filterResY->ref();
+}
+
+SVGFilterElementImpl::~SVGFilterElementImpl()
+{
+ if(m_filterUnits)
+ m_filterUnits->deref();
+ if(m_primitiveUnits)
+ m_primitiveUnits->deref();
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_filterResX)
+ m_filterResX->deref();
+ if(m_filterResY)
+ m_filterResY->deref();
+}
+
+SVGAnimatedEnumerationImpl *SVGFilterElementImpl::filterUnits() const
+{
+ return m_filterUnits;
+}
+
+SVGAnimatedEnumerationImpl *SVGFilterElementImpl::primitiveUnits() const
+{
+ return m_primitiveUnits;
+}
+
+SVGAnimatedLengthImpl *SVGFilterElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGFilterElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGFilterElementImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGFilterElementImpl::height() const
+{
+ return m_height;
+}
+
+SVGAnimatedIntegerImpl *SVGFilterElementImpl::filterResX() const
+{
+ return m_filterResX;
+}
+
+SVGAnimatedIntegerImpl *SVGFilterElementImpl::filterResY() const
+{
+ return m_filterResY;
+}
+
+void SVGFilterElementImpl::setFilterRes(unsigned long /*filterResX*/, unsigned long /*filterResY*/)
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFilterElementImpl.h b/ksvg/impl/SVGFilterElementImpl.h
new file mode 100644
index 00000000..ad12a9e9
--- /dev/null
+++ b/ksvg/impl/SVGFilterElementImpl.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFilterElementImpl_H
+#define SVGFilterElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGAnimatedIntegerImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGFilterElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGFilterElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFilterElementImpl();
+
+ SVGAnimatedEnumerationImpl *filterUnits() const;
+ SVGAnimatedEnumerationImpl *primitiveUnits() const;
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+ SVGAnimatedIntegerImpl *filterResX() const;
+ SVGAnimatedIntegerImpl *filterResY() const;
+ void setFilterRes(unsigned long filterResX, unsigned long filterResY);
+
+private:
+ SVGAnimatedEnumerationImpl *m_filterUnits;
+ SVGAnimatedEnumerationImpl *m_primitiveUnits;
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+ SVGAnimatedIntegerImpl *m_filterResX;
+ SVGAnimatedIntegerImpl *m_filterResY;
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.cc b/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.cc
new file mode 100644
index 00000000..3f403009
--- /dev/null
+++ b/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.cc
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGFilterPrimitiveStandardAttributesImpl.h"
+
+using namespace KSVG;
+
+SVGFilterPrimitiveStandardAttributesImpl::SVGFilterPrimitiveStandardAttributesImpl()
+{
+ m_x = new SVGAnimatedLengthImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl();
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl();
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl();
+ m_height->ref();
+
+ m_result = new SVGAnimatedStringImpl();
+ m_result->ref();
+}
+
+SVGFilterPrimitiveStandardAttributesImpl::~SVGFilterPrimitiveStandardAttributesImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_result)
+ m_result->deref();
+}
+
+SVGAnimatedLengthImpl *SVGFilterPrimitiveStandardAttributesImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGFilterPrimitiveStandardAttributesImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGFilterPrimitiveStandardAttributesImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGFilterPrimitiveStandardAttributesImpl::height() const
+{
+ return m_height;
+}
+
+SVGAnimatedStringImpl *SVGFilterPrimitiveStandardAttributesImpl::result() const
+{
+ return m_result;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.h b/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.h
new file mode 100644
index 00000000..45bcd4d0
--- /dev/null
+++ b/ksvg/impl/SVGFilterPrimitiveStandardAttributesImpl.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPrimitiveStandardAttributesImpl_H
+#define SVGPrimitiveStandardAttributesImpl_H
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGAnimatedStringImpl;
+class SVGFilterPrimitiveStandardAttributesImpl
+{
+public:
+ SVGFilterPrimitiveStandardAttributesImpl();
+ virtual ~SVGFilterPrimitiveStandardAttributesImpl();
+
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+ SVGAnimatedStringImpl *result() const;
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+ SVGAnimatedStringImpl *m_result;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFitToViewBoxImpl.cc b/ksvg/impl/SVGFitToViewBoxImpl.cc
new file mode 100644
index 00000000..fee367b9
--- /dev/null
+++ b/ksvg/impl/SVGFitToViewBoxImpl.cc
@@ -0,0 +1,141 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include "SVGPreserveAspectRatio.h"
+
+#include "SVGRectImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGFitToViewBoxImpl.lut.h"
+
+SVGFitToViewBoxImpl::SVGFitToViewBoxImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_viewBox = new SVGAnimatedRectImpl();
+ m_viewBox->ref();
+
+ m_preserveAspectRatio = new SVGAnimatedPreserveAspectRatioImpl();
+ m_preserveAspectRatio->ref();
+}
+
+SVGFitToViewBoxImpl::~SVGFitToViewBoxImpl()
+{
+ if(m_viewBox)
+ m_viewBox->deref();
+ if(m_preserveAspectRatio)
+ m_preserveAspectRatio->deref();
+}
+
+SVGAnimatedRectImpl *SVGFitToViewBoxImpl::viewBox() const
+{
+ return m_viewBox;
+}
+
+SVGAnimatedPreserveAspectRatioImpl *SVGFitToViewBoxImpl::preserveAspectRatio() const
+{
+ return m_preserveAspectRatio;
+}
+
+void SVGFitToViewBoxImpl::parseViewBox(const QString &s)
+{
+ // Set default if preserveAspectRatio wasnt parsed earlier (Rob)
+ if(m_preserveAspectRatio->baseVal()->align() == SVG_PRESERVEASPECTRATIO_UNKNOWN)
+ m_preserveAspectRatio->baseVal()->setAlign(SVG_PRESERVEASPECTRATIO_XMIDYMID);
+ if(m_preserveAspectRatio->baseVal()->meetOrSlice() == SVG_MEETORSLICE_UNKNOWN)
+ m_preserveAspectRatio->baseVal()->setMeetOrSlice(SVG_MEETORSLICE_MEET);
+
+ // allow for viewbox def with ',' or whitespace
+ QString viewbox(s);
+ QStringList points = QStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace());
+
+ viewBox()->baseVal()->setX(points[0].toFloat());
+ viewBox()->baseVal()->setY(points[1].toFloat());
+ viewBox()->baseVal()->setWidth(points[2].toFloat());
+ viewBox()->baseVal()->setHeight(points[3].toFloat());
+}
+
+SVGMatrixImpl *SVGFitToViewBoxImpl::viewBoxToViewTransform(float viewWidth, float viewHeight) const
+{
+ if(viewBox()->baseVal()->width() == 0 || viewBox()->baseVal()->height() == 0)
+ return SVGSVGElementImpl::createSVGMatrix();
+ else
+ return preserveAspectRatio()->baseVal()->getCTM(viewBox()->baseVal()->x(),
+ viewBox()->baseVal()->y(), viewBox()->baseVal()->width(), viewBox()->baseVal()->height(),
+ 0, 0, viewWidth, viewHeight);
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGFitToViewBoxImpl::s_hashTable 3
+ viewBox SVGFitToViewBoxImpl::ViewBox DontDelete
+ preserveAspectRatio SVGFitToViewBoxImpl::PreserveAspectRatio DontDelete
+@end
+*/
+
+Value SVGFitToViewBoxImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ViewBox:
+ return m_viewBox->cache(exec);
+ case PreserveAspectRatio:
+ return m_preserveAspectRatio->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGFitToViewBoxImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case ViewBox:
+ parseViewBox(value.toString(exec).qstring());
+ break;
+ case PreserveAspectRatio:
+ if(preserveAspectRatio())
+ preserveAspectRatio()->baseVal()->parsePreserveAspectRatio(value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFitToViewBoxImpl.h b/ksvg/impl/SVGFitToViewBoxImpl.h
new file mode 100644
index 00000000..b511d63e
--- /dev/null
+++ b/ksvg/impl/SVGFitToViewBoxImpl.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFitToViewBoxImpl_H
+#define SVGFitToViewBoxImpl_H
+
+#include "ksvg_lookup.h"
+
+class QString;
+
+namespace KSVG
+{
+
+class SVGAnimatedRectImpl;
+class SVGAnimatedPreserveAspectRatioImpl;
+class SVGMatrixImpl;
+class SVGFitToViewBoxImpl
+{
+public:
+ SVGFitToViewBoxImpl();
+ ~SVGFitToViewBoxImpl();
+
+ SVGAnimatedRectImpl *viewBox() const;
+ SVGAnimatedPreserveAspectRatioImpl *preserveAspectRatio() const;
+
+ void parseViewBox(const QString &);
+
+ SVGMatrixImpl *viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+
+protected:
+ SVGAnimatedRectImpl *m_viewBox;
+ SVGAnimatedPreserveAspectRatioImpl *m_preserveAspectRatio;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ ViewBox, PreserveAspectRatio
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontElementImpl.cc b/ksvg/impl/SVGFontElementImpl.cc
new file mode 100644
index 00000000..30d4f63f
--- /dev/null
+++ b/ksvg/impl/SVGFontElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontElementImpl::SVGFontElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this)
+{
+}
+
+SVGFontElementImpl::~SVGFontElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontElementImpl.h b/ksvg/impl/SVGFontElementImpl.h
new file mode 100644
index 00000000..3a753797
--- /dev/null
+++ b/ksvg/impl/SVGFontElementImpl.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontElementImpl_H
+#define SVGFontElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontElementImpl : public SVGElementImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGFontElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontElementImpl();
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceElementImpl.cc b/ksvg/impl/SVGFontFaceElementImpl.cc
new file mode 100644
index 00000000..d53e70ad
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceElementImpl::SVGFontFaceElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGFontFaceElementImpl::~SVGFontFaceElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceElementImpl.h b/ksvg/impl/SVGFontFaceElementImpl.h
new file mode 100644
index 00000000..0479ccea
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceElementImpl_H
+#define SVGFontFaceElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceElementImpl : public SVGElementImpl
+{
+public:
+ SVGFontFaceElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontFaceElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceFormatElementImpl.cc b/ksvg/impl/SVGFontFaceFormatElementImpl.cc
new file mode 100644
index 00000000..48651a68
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceFormatElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceFormatElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceFormatElementImpl::SVGFontFaceFormatElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGFontFaceFormatElementImpl::~SVGFontFaceFormatElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceFormatElementImpl.h b/ksvg/impl/SVGFontFaceFormatElementImpl.h
new file mode 100644
index 00000000..380e29b1
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceFormatElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceFormatElementImpl_H
+#define SVGFontFaceFormatElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceFormatElementImpl : public SVGElementImpl
+{
+public:
+ SVGFontFaceFormatElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontFaceFormatElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceNameElementImpl.cc b/ksvg/impl/SVGFontFaceNameElementImpl.cc
new file mode 100644
index 00000000..276f3ae3
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceNameElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceNameElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceNameElementImpl::SVGFontFaceNameElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGFontFaceNameElementImpl::~SVGFontFaceNameElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceNameElementImpl.h b/ksvg/impl/SVGFontFaceNameElementImpl.h
new file mode 100644
index 00000000..797ee17e
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceNameElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceNameElementImpl_H
+#define SVGFontFaceNameElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceNameElementImpl : public SVGElementImpl
+{
+public:
+ SVGFontFaceNameElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontFaceNameElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceSrcElementImpl.cc b/ksvg/impl/SVGFontFaceSrcElementImpl.cc
new file mode 100644
index 00000000..bdc40611
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceSrcElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceSrcElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceSrcElementImpl::SVGFontFaceSrcElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGFontFaceSrcElementImpl::~SVGFontFaceSrcElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceSrcElementImpl.h b/ksvg/impl/SVGFontFaceSrcElementImpl.h
new file mode 100644
index 00000000..f858e829
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceSrcElementImpl.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceSrcElementImpl_H
+#define SVGFontFaceSrcElementImpl_H
+
+#include "ksvg_lookup.h"
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceSrcElementImpl : public SVGElementImpl
+{
+public:
+ SVGFontFaceSrcElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontFaceSrcElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceUriElementImpl.cc b/ksvg/impl/SVGFontFaceUriElementImpl.cc
new file mode 100644
index 00000000..cef5a30f
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceUriElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGFontFaceUriElementImpl.h"
+
+using namespace KSVG;
+
+SVGFontFaceUriElementImpl::SVGFontFaceUriElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGFontFaceUriElementImpl::~SVGFontFaceUriElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGFontFaceUriElementImpl.h b/ksvg/impl/SVGFontFaceUriElementImpl.h
new file mode 100644
index 00000000..2b670a82
--- /dev/null
+++ b/ksvg/impl/SVGFontFaceUriElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFontFaceUriElementImpl_H
+#define SVGFontFaceUriElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGFontFaceUriElementImpl : public SVGElementImpl
+{
+public:
+ SVGFontFaceUriElementImpl(DOM::ElementImpl *);
+ virtual ~SVGFontFaceUriElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGForeignObjectElementImpl.cc b/ksvg/impl/SVGForeignObjectElementImpl.cc
new file mode 100644
index 00000000..ff605cf0
--- /dev/null
+++ b/ksvg/impl/SVGForeignObjectElementImpl.cc
@@ -0,0 +1,121 @@
+/*
+ Copyright (C) 2001-20032 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGRectImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGForeignObjectElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGForeignObjectElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGForeignObjectElementImpl::SVGForeignObjectElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ m_x = new SVGAnimatedLengthImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl();
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl();
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl();
+ m_height->ref();
+}
+
+SVGForeignObjectElementImpl::~SVGForeignObjectElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+}
+
+SVGRectImpl *SVGForeignObjectElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_x->baseVal()->value());
+ ret->setY(m_y->baseVal()->value());
+ ret->setWidth(m_width->baseVal()->value());
+ ret->setHeight(m_height->baseVal()->value());
+ return ret;
+}
+
+SVGAnimatedLengthImpl *SVGForeignObjectElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGForeignObjectElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGForeignObjectElementImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGForeignObjectElementImpl::height() const
+{
+ return m_height;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGForeignObjectElementImpl::s_hashTable 5
+ x SVGForeignObjectElementImpl::X DontDelete|ReadOnly
+ y SVGForeignObjectElementImpl::Y DontDelete|ReadOnly
+ width SVGForeignObjectElementImpl::Width DontDelete|ReadOnly
+ height SVGForeignObjectElementImpl::Height DontDelete|ReadOnly
+@end
+*/
+
+Value SVGForeignObjectElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return m_x->cache(exec);
+ case Y:
+ return m_y->cache(exec);
+ case Width:
+ return m_width->cache(exec);
+ case Height:
+ return m_height->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGForeignObjectElementImpl.h b/ksvg/impl/SVGForeignObjectElementImpl.h
new file mode 100644
index 00000000..3fea4877
--- /dev/null
+++ b/ksvg/impl/SVGForeignObjectElementImpl.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGForeignObjectElementImpl_H
+#define SVGForeignObjectElementImpl_H
+
+#include "SVGTestsImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGForeignObjectElementImpl : public SVGElementImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGForeignObjectElementImpl(DOM::ElementImpl *);
+ virtual ~SVGForeignObjectElementImpl();
+
+ virtual SVGRectImpl *getBBox();
+
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+public:
+ KSVG_GET
+ KSVG_FORWARDPUT
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGElementImpl.cc b/ksvg/impl/SVGGElementImpl.cc
new file mode 100644
index 00000000..9f355540
--- /dev/null
+++ b/ksvg/impl/SVGGElementImpl.cc
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGAElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+SVGGElementImpl::SVGGElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+}
+
+SVGGElementImpl::~SVGGElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGElementImpl.h b/ksvg/impl/SVGGElementImpl.h
new file mode 100644
index 00000000..ca4a9b4e
--- /dev/null
+++ b/ksvg/impl/SVGGElementImpl.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGElementImpl_H
+#define SVGGElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGGElementImpl : public SVGContainerImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGGElementImpl(DOM::ElementImpl *);
+ virtual ~SVGGElementImpl();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGGElementImpl, "g")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGlyphElementImpl.cc b/ksvg/impl/SVGGlyphElementImpl.cc
new file mode 100644
index 00000000..dd201466
--- /dev/null
+++ b/ksvg/impl/SVGGlyphElementImpl.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGGlyphElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGGlyphElementImpl.lut.h"
+
+SVGGlyphElementImpl::SVGGlyphElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGStylableImpl(this)
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGGlyphElementImpl::~SVGGlyphElementImpl()
+{
+}
+
+QString SVGGlyphElementImpl::d() const
+{
+ return m_d;
+}
+
+/*
+@namespace KSVG
+@begin SVGGlyphElementImpl::s_hashTable 11
+ unicode SVGGlyphElementImpl::Unicode DontDelete|ReadOnly
+ glyph-name SVGGlyphElementImpl::GlyphName DontDelete|ReadOnly
+ d SVGGlyphElementImpl::D DontDelete|ReadOnly
+ orientation SVGGlyphElementImpl::Orientation DontDelete|ReadOnly
+ arabic-form SVGGlyphElementImpl::ArabicForm DontDelete|ReadOnly
+ lang SVGGlyphElementImpl::Lang DontDelete|ReadOnly
+ horiz-adv-x SVGGlyphElementImpl::HorizAdvX DontDelete|ReadOnly
+ vert-origin-x SVGGlyphElementImpl::VertOriginX DontDelete|ReadOnly
+ vert-origin-y SVGGlyphElementImpl::VertOriginY DontDelete|ReadOnly
+ vert-adv-y SVGGlyphElementImpl::VertAdvY DontDelete|ReadOnly
+@end
+*/
+
+Value SVGGlyphElementImpl::getValueProperty(ExecState *, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGGlyphElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case D:
+ m_d = value.toString(exec).qstring();
+ break;
+ case Unicode:
+ case GlyphName:
+ case Orientation:
+ case ArabicForm:
+ case Lang:
+ case HorizAdvX:
+ case VertOriginX:
+ case VertOriginY:
+ case VertAdvY:
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGlyphElementImpl.h b/ksvg/impl/SVGGlyphElementImpl.h
new file mode 100644
index 00000000..35781b2c
--- /dev/null
+++ b/ksvg/impl/SVGGlyphElementImpl.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGlyphElementImpl_H
+#define SVGGlyphElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+
+namespace KSVG
+{
+
+class SVGGlyphElementImpl : public SVGElementImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGGlyphElementImpl(DOM::ElementImpl *);
+ virtual ~SVGGlyphElementImpl();
+
+ QString d() const;
+
+private:
+ QString m_d;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Unicode, GlyphName, D, Orientation, ArabicForm,
+ Lang, HorizAdvX, VertOriginX, VertOriginY, VertAdvY
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGGlyphElementImpl, "glyph")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGlyphRefElementImpl.cc b/ksvg/impl/SVGGlyphRefElementImpl.cc
new file mode 100644
index 00000000..438fa0b0
--- /dev/null
+++ b/ksvg/impl/SVGGlyphRefElementImpl.cc
@@ -0,0 +1,134 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGSVGElementImpl.h"
+#include "SVGGlyphRefElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGGlyphRefElementImpl.lut.h"
+#include "ksvg_lookup.h"
+
+SVGGlyphRefElementImpl::SVGGlyphRefElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGStylableImpl(this)
+{
+}
+
+SVGGlyphRefElementImpl::~SVGGlyphRefElementImpl()
+{
+}
+
+void SVGGlyphRefElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+}
+
+DOM::DOMString SVGGlyphRefElementImpl::format()
+{
+ return "";
+}
+
+DOM::DOMString SVGGlyphRefElementImpl::glyphRef()
+{
+ return "";
+}
+
+float SVGGlyphRefElementImpl::x() const
+{
+ return m_x;
+}
+
+float SVGGlyphRefElementImpl::y() const
+{
+ return m_y;
+}
+
+float SVGGlyphRefElementImpl::dx() const
+{
+ return m_dx;
+}
+
+float SVGGlyphRefElementImpl::dy() const
+{
+ return m_dy;
+}
+
+/*
+@namespace KSVG
+@begin SVGGlyphRefElementImpl::s_hashTable 7
+ glyphRef SVGGlyphRefElementImpl::GlyphRef DontDelete|ReadOnly
+ format SVGGlyphRefElementImpl::Format DontDelete|ReadOnly
+ x SVGGlyphRefElementImpl::X DontDelete|ReadOnly
+ y SVGGlyphRefElementImpl::Y DontDelete|ReadOnly
+ dx SVGGlyphRefElementImpl::Dx DontDelete|ReadOnly
+ dy SVGGlyphRefElementImpl::Dy DontDelete|ReadOnly
+@end
+*/
+
+Value SVGGlyphRefElementImpl::getValueProperty(ExecState *, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case GlyphRef: return String(m_glyphRef);
+ case Format: return String(m_format);
+ case X: return Number(m_x);
+ case Y: return Number(m_y);
+ case Dx: return Number(m_dx);
+ case Dy: return Number(m_dy);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGGlyphRefElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case GlyphRef:
+ m_glyphRef = value.toString(exec).string();
+ break;
+ case Format:
+ m_format = value.toString(exec).string();
+ break;
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case Dx:
+ m_dx = value.toNumber(exec);
+ break;
+ case Dy:
+ m_dy = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGlyphRefElementImpl.h b/ksvg/impl/SVGGlyphRefElementImpl.h
new file mode 100644
index 00000000..6a292a64
--- /dev/null
+++ b/ksvg/impl/SVGGlyphRefElementImpl.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGlyphRefElementImpl_H
+#define SVGGlyphRefElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGStylableImpl.h"
+
+namespace KSVG
+{
+
+class SVGGlyphRefElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGGlyphRefElementImpl(DOM::ElementImpl *);
+ virtual ~SVGGlyphRefElementImpl();
+ virtual void setAttributes();
+
+ DOM::DOMString glyphRef();
+ DOM::DOMString format();
+
+ float x() const;
+ float y() const;
+ float dx() const;
+ float dy() const;
+
+private:
+ DOM::DOMString m_glyphRef;
+ DOM::DOMString m_format;
+ float m_x;
+ float m_y;
+ float m_dx;
+ float m_dy;
+
+public:
+ KSVG_BRIDGE
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ GlyphRef, Format, X, Y, Dx, Dy
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGGlyphRefElementImpl, "glyphRef")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGradientElementImpl.cc b/ksvg/impl/SVGGradientElementImpl.cc
new file mode 100644
index 00000000..180b230a
--- /dev/null
+++ b/ksvg/impl/SVGGradientElementImpl.cc
@@ -0,0 +1,264 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGradientElement.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGStopElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGSVGElementImpl.h"
+
+#include "KSVGCanvas.h"
+#include "CanvasItems.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGUnitConverter.h"
+
+using namespace KSVG;
+
+#include "SVGGradientElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+#include "ksvg_cacheimpl.h"
+
+SVGGradientElementImpl::SVGGradientElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGPaintServerImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_gradientUnits = new SVGAnimatedEnumerationImpl();
+ m_gradientUnits->ref();
+
+ m_gradientTransform = new SVGAnimatedTransformListImpl();
+ m_gradientTransform->ref();
+
+ m_spreadMethod = new SVGAnimatedEnumerationImpl();
+ m_spreadMethod->ref();
+
+ m_converter = new SVGUnitConverter();
+}
+
+SVGGradientElementImpl::~SVGGradientElementImpl()
+{
+ if(m_gradientUnits)
+ m_gradientUnits->deref();
+ if(m_gradientTransform)
+ m_gradientTransform->deref();
+ if(m_spreadMethod)
+ m_spreadMethod->deref();
+ delete m_converter;
+}
+
+SVGAnimatedEnumerationImpl *SVGGradientElementImpl::gradientUnits() const
+{
+ return m_gradientUnits;
+}
+
+SVGAnimatedTransformListImpl *SVGGradientElementImpl::gradientTransform() const
+{
+ return m_gradientTransform;
+}
+
+SVGAnimatedEnumerationImpl *SVGGradientElementImpl::spreadMethod() const
+{
+ return m_spreadMethod;
+}
+
+/*
+@namespace KSVG
+@begin SVGGradientElementImpl::s_hashTable 5
+ gradientUnits SVGGradientElementImpl::GradientUnits DontDelete|ReadOnly
+ gradientTransform SVGGradientElementImpl::GradientTransform DontDelete|ReadOnly
+ spreadMethod SVGGradientElementImpl::SpreadMethod DontDelete|ReadOnly
+@end
+*/
+
+Value SVGGradientElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case GradientUnits:
+ return m_gradientUnits->cache(exec);
+ case GradientTransform:
+ return m_gradientTransform->cache(exec);
+ case SpreadMethod:
+ return m_spreadMethod->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGGradientElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case GradientUnits:
+ if(value.toString(exec).qstring() == "userSpaceOnUse")
+ m_gradientUnits->setBaseVal(SVGGradientElement::SVG_UNIT_TYPE_USERSPACEONUSE);
+ else
+ m_gradientUnits->setBaseVal(SVGGradientElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ break;
+ case GradientTransform:
+ m_gradientTransform->baseVal()->clear();
+ SVGHelperImpl::parseTransformAttribute(m_gradientTransform->baseVal(), value.toString(exec).qstring());
+ break;
+ case SpreadMethod:
+ {
+ QString spreadMethod = value.toString(exec).qstring();
+
+ if(spreadMethod == "repeat")
+ m_spreadMethod->setBaseVal(SVG_SPREADMETHOD_REPEAT);
+ else if(spreadMethod == "reflect")
+ m_spreadMethod->setBaseVal(SVG_SPREADMETHOD_REFLECT);
+ else
+ m_spreadMethod->setBaseVal(SVG_SPREADMETHOD_PAD);
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGGradientElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+ setAttributesFromHref();
+
+ // Spec: if attribute not specified, use "pad"
+ if(KSVG_TOKEN_NOT_PARSED(SpreadMethod))
+ KSVG_SET_ALT_ATTRIBUTE(SpreadMethod, "pad")
+
+ // Spec: if attribute not specified, use objectBoundingBox
+ if(KSVG_TOKEN_NOT_PARSED(GradientUnits))
+ KSVG_SET_ALT_ATTRIBUTE(GradientUnits, "objectBoundingBox")
+}
+
+void SVGGradientElementImpl::setAttributesFromHref()
+{
+ QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+
+ if(!_href.isEmpty())
+ {
+ SVGGradientElementImpl *refGradient = dynamic_cast<SVGGradientElementImpl *>(ownerSVGElement()->getElementById(_href));
+
+ if(refGradient)
+ {
+ QMap<QString, DOM::DOMString> refAttributes = refGradient->gradientAttributes();
+ QMap<QString, DOM::DOMString>::iterator it;
+
+ for(it = refAttributes.begin(); it != refAttributes.end(); ++it)
+ {
+ QString name = it.key();
+ DOM::DOMString value = it.data();
+
+ if(!hasAttribute(name))
+ {
+ setAttribute(name, value);
+ setAttributeInternal(name, value);
+ }
+ }
+ }
+ }
+}
+
+SVGGradientElementImpl *SVGGradientElementImpl::stopsSource()
+{
+ // Spec:
+ // If this element has no defined gradient stops, and the referenced element does
+ // (possibly due to its own href attribute), then this element inherits the gradient stop from the referenced element.
+ // Inheritance can be indirect to an arbitrary level; thus, if the referenced element inherits attribute or gradient stops
+ // due to its own href attribute, then the current element can inherit those attributes or gradient stops. (mop)
+ bool haveStops = false;
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGStopElementImpl *stop = dynamic_cast<SVGStopElementImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+
+ if(stop)
+ {
+ haveStops = true;
+ break;
+ }
+ }
+
+ SVGGradientElementImpl *source = this;
+
+ if(!haveStops)
+ {
+ QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+
+ if(!_href.isEmpty())
+ {
+ SVGGradientElementImpl *refGradient = dynamic_cast<SVGGradientElementImpl *>(ownerSVGElement()->getElementById(_href));
+
+ if(refGradient)
+ source = refGradient->stopsSource();
+ }
+ }
+
+ return source;
+}
+
+void SVGGradientElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_paintServer)
+ m_paintServer = c->createPaintServer(this);
+}
+
+void SVGGradientElementImpl::removeItem(KSVGCanvas *)
+{
+ delete m_paintServer;
+ m_paintServer = 0;
+}
+
+/*
+@namespace KSVG
+@begin SVGGradientElementImplConstructor::s_hashTable 5
+ SVG_SPREADMETHOD_UNKNOWN KSVG::SVG_SPREADMETHOD_UNKNOWN DontDelete|ReadOnly
+ SVG_SPREADMETHOD_PAD KSVG::SVG_SPREADMETHOD_PAD DontDelete|ReadOnly
+ SVG_SPREADMETHOD_REFLECT KSVG::SVG_SPREADMETHOD_REFLECT DontDelete|ReadOnly
+ SVG_SPREADMETHOD_REPEAT KSVG::SVG_SPREADMETHOD_REPEAT DontDelete|ReadOnly
+@end
+*/
+
+using namespace KJS;
+
+Value SVGGradientElementImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGGradientElementImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGGradientElementImplConstructor>(exec, "[[svggradientelement.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGGradientElementImpl.h b/ksvg/impl/SVGGradientElementImpl.h
new file mode 100644
index 00000000..e9be92d8
--- /dev/null
+++ b/ksvg/impl/SVGGradientElementImpl.h
@@ -0,0 +1,110 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGGradientElementImpl_H
+#define SVGGradientElementImpl_H
+
+#include <qmap.h>
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "SVGPaintServerImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGUnitConverter;
+class SVGAnimatedEnumerationImpl;
+class SVGAnimatedTransformListImpl;
+class SVGGradientElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGPaintServerImpl
+{
+public:
+ SVGGradientElementImpl(DOM::ElementImpl *);
+ virtual ~SVGGradientElementImpl();
+
+ SVGAnimatedEnumerationImpl *gradientUnits() const;
+ SVGAnimatedTransformListImpl *gradientTransform() const;
+ SVGAnimatedEnumerationImpl *spreadMethod() const;
+
+ virtual void setAttributes();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void removeItem(KSVGCanvas *c);
+
+ SVGUnitConverter *converter() const { return m_converter; }
+
+ // Returns the gradient element that holds the stops for this gradient,
+ // taking into account indirection through href.
+ SVGGradientElementImpl *stopsSource();
+
+ // Returns the linear/radial gradient attributes set on this element,
+ // taking into account indirection through href.
+ virtual QMap<QString, DOM::DOMString> gradientAttributes() = 0;
+
+protected:
+ void setAttributesFromHref();
+
+private:
+ SVGAnimatedEnumerationImpl *m_gradientUnits;
+ SVGAnimatedTransformListImpl *m_gradientTransform;
+ SVGAnimatedEnumerationImpl *m_spreadMethod;
+
+ SVGUnitConverter *m_converter;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_NO_TAG_BRIDGE
+
+ enum
+ {
+ // Properties
+ GradientUnits, GradientTransform, SpreadMethod
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGGradientElementImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGGradientElementImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGGradientElementImplConstructor(KJS::ExecState *exec);
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGHKernElementImpl.cc b/ksvg/impl/SVGHKernElementImpl.cc
new file mode 100644
index 00000000..df310d6e
--- /dev/null
+++ b/ksvg/impl/SVGHKernElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGHKernElementImpl.h"
+
+using namespace KSVG;
+
+SVGHKernElementImpl::SVGHKernElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGHKernElementImpl::~SVGHKernElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGHKernElementImpl.h b/ksvg/impl/SVGHKernElementImpl.h
new file mode 100644
index 00000000..6858b5be
--- /dev/null
+++ b/ksvg/impl/SVGHKernElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGHKernElementImpl_H
+#define SVGHKernElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGHKernElementImpl : public SVGElementImpl
+{
+public:
+ SVGHKernElementImpl(DOM::ElementImpl *);
+ virtual ~SVGHKernElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGHelperImpl.cc b/ksvg/impl/SVGHelperImpl.cc
new file mode 100644
index 00000000..ed7e8be4
--- /dev/null
+++ b/ksvg/impl/SVGHelperImpl.cc
@@ -0,0 +1,230 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qregexp.h>
+
+#include "SVGRectImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+
+#include "KSVGCanvas.h"
+#include "CanvasItem.h"
+
+using namespace KSVG;
+
+#include "ksvg_ecma.h"
+#include "ksvg_window.h"
+
+SVGHelperImpl::SVGHelperImpl()
+{
+}
+
+SVGHelperImpl::~SVGHelperImpl()
+{
+}
+
+void SVGHelperImpl::updateItem(KJS::ExecState *exec, const DOM::Node node)
+{
+ // Get document
+ SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc();
+
+ // Update canvas, recursively if needed
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle()));
+
+ if(shape && shape->item())
+ {
+ shape->item()->update(UPDATE_TRANSFORM);
+ shape->item()->draw();
+ shape->blit(doc->canvas());
+ }
+
+ if(const_cast<DOM::Node &>(node).hasChildNodes())
+ {
+ DOM::Node iterate = node.firstChild();
+ for(; !iterate.isNull(); iterate = iterate.nextSibling())
+ updateItem(exec, iterate);
+ }
+}
+
+void SVGHelperImpl::copyAttributes(SVGElementImpl *src, SVGElementImpl *dst)
+{
+ QDictIterator<DOM::DOMString> it(src->attributes());
+ for(; it.current(); ++it)
+ {
+ DOM::DOMString name = it.currentKey();
+ DOM::DOMString value = it.current()->string();
+
+ if(name != "id" && !dst->hasAttribute(name))
+ {
+ dst->setAttribute(name, value);
+ dst->setAttributeInternal(name, value);
+ }
+ }
+}
+
+void SVGHelperImpl::parseList(SVGStringListImpl *list, char seperator, const QString &data)
+{
+ // TODO : more error checking/reporting
+ list->clear();
+
+ QStringList substrings = QStringList::split(seperator, data);
+ QStringList::ConstIterator it = substrings.begin();
+ QStringList::ConstIterator end = substrings.end();
+ for(; it != end; ++it)
+ {
+ SharedString *string = new SharedString(*it);
+ string->ref();
+
+ list->appendItem(string);
+ }
+}
+
+void SVGHelperImpl::parseLengthList(SVGAnimatedLengthListImpl *list, const QString &lengths, LengthMode mode, SVGElementImpl *object)
+{
+ // get either comma or space delimited lists
+ // TODO : more error checking/reporting
+ QStringList sublengths = QStringList::split(QRegExp("[, ]"), lengths);
+ QStringList::ConstIterator it = sublengths.begin();
+ QStringList::ConstIterator end = sublengths.end();
+
+ SVGLengthImpl *lengthImpl = 0;
+ for(; it != end; ++it)
+ {
+ lengthImpl = new SVGLengthImpl(mode, object);
+ lengthImpl->ref();
+
+ lengthImpl->setValueAsString(*it);
+ list->baseVal()->appendItem(lengthImpl);
+ }
+}
+
+void SVGHelperImpl::parseCommaSeperatedList(SVGStringListImpl *list, const QString &data)
+{
+ parseList(list, ',', data);
+}
+
+void SVGHelperImpl::parseSemicolonSeperatedList(SVGStringListImpl *list, const QString &data)
+{
+ parseList(list, ';', data);
+}
+
+void SVGHelperImpl::parseTransformAttribute(SVGTransformListImpl *list, const QString &transform)
+{
+ // Split string for handling 1 transform statement at a time
+ QStringList subtransforms = QStringList::split(')', transform);
+ QStringList::ConstIterator it = subtransforms.begin();
+ QStringList::ConstIterator end = subtransforms.end();
+ for(; it != end; ++it)
+ {
+ QStringList subtransform = QStringList::split('(', (*it));
+
+ subtransform[0] = subtransform[0].stripWhiteSpace().lower();
+ subtransform[1] = subtransform[1].simplifyWhiteSpace();
+ QRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
+
+ int pos = 0;
+ QStringList params;
+
+ while(pos >= 0)
+ {
+ pos = reg.search(subtransform[1], pos);
+ if(pos != -1)
+ {
+ params += reg.cap(1);
+ pos += reg.matchedLength();
+ }
+ }
+
+ if(subtransform[0].startsWith(";") || subtransform[0].startsWith(","))
+ subtransform[0] = subtransform[0].right(subtransform[0].length() - 1);
+
+ SVGTransformImpl *t = SVGSVGElementImpl::createSVGTransform();
+
+ if(subtransform[0] == "rotate")
+ {
+ if(params.count() == 3)
+ t->setRotate(params[0].toDouble(),
+ params[1].toDouble(),
+ params[2].toDouble());
+ else
+ t->setRotate(params[0].toDouble(), 0, 0);
+ }
+ else if(subtransform[0] == "translate")
+ {
+ if(params.count() == 2)
+ t->setTranslate(params[0].toDouble(), params[1].toDouble());
+ else // Spec : if only one param given, assume 2nd param to be 0
+ t->setTranslate(params[0].toDouble(), 0);
+ }
+ else if(subtransform[0] == "scale")
+ {
+ if(params.count() == 2)
+ t->setScale(params[0].toDouble(), params[1].toDouble());
+ else // Spec : if only one param given, assume uniform scaling
+ t->setScale(params[0].toDouble(), params[0].toDouble());
+ }
+ else if(subtransform[0] == "skewx")
+ t->setSkewX(params[0].toDouble());
+ else if(subtransform[0] == "skewy")
+ t->setSkewY(params[0].toDouble());
+ else if(subtransform[0] == "matrix")
+ {
+ if(params.count() >= 6)
+ {
+ SVGMatrixImpl *ret = new SVGMatrixImpl(params[0].toDouble(),
+ params[1].toDouble(),
+ params[2].toDouble(),
+ params[3].toDouble(),
+ params[4].toDouble(),
+ params[5].toDouble());
+ t->setMatrix(ret);
+ }
+ }
+
+ list->appendItem(t);
+ }
+}
+
+/// convert from user space to "real" pixels on rendering area
+QRect SVGHelperImpl::fromUserspace(SVGElementImpl *obj, const QRect &r)
+{
+ QRect sr;
+
+ SVGLocatableImpl *locate = dynamic_cast<SVGLocatableImpl *>(obj);
+
+ if(locate)
+ sr = locate->screenCTM()->qmatrix().mapRect(r);
+
+ return sr;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGHelperImpl.h b/ksvg/impl/SVGHelperImpl.h
new file mode 100644
index 00000000..e8bbdb39
--- /dev/null
+++ b/ksvg/impl/SVGHelperImpl.h
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2002-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGHelperImpl_H
+#define SVGHelperImpl_H
+
+#include <dom/dom_element.h>
+
+#include "SVGElementImpl.h"
+#include "SVGLengthImpl.h"
+#include "SVGDocumentImpl.h"
+#include "ksvg_ecma.h"
+
+#include "ksvg_lookup.h"
+
+class QRect;
+class QString;
+
+namespace KSVG
+{
+class SVGStringListImpl;
+class SVGTransformListImpl;
+class SVGAnimatedLengthListImpl;
+
+class SVGHelperImpl
+{
+public:
+ SVGHelperImpl();
+ ~SVGHelperImpl();
+
+ // Dynamic attribute updating
+ template<class T>
+ static void applyContainer(T *obj, int token, const QString &value)
+ {
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(obj);
+ if(!element || !element->hasChildNodes())
+ return;
+
+ // Very fast propagation of attributes, when the token is known! (Niko)
+ for(DOM::Node node = element->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ T *cast = dynamic_cast<T *>(element->ownerDoc()->getElementFromHandle(node.handle()));
+ if(cast)
+ cast->putValueProperty(element->ownerDoc()->ecmaEngine()->globalExec(), token, KJS::String(value), KJS::Internal);
+ }
+ }
+
+ // Update item on canvas
+ static void updateItem(KJS::ExecState *exec, const DOM::Node node);
+ static void copyAttributes(SVGElementImpl *src, SVGElementImpl *dst);
+
+ // SVGAnimatedLengthList
+ static void parseLengthList(SVGAnimatedLengthListImpl *list, const QString &lengths, LengthMode mode = LENGTHMODE_UNKNOWN, SVGElementImpl *object = 0);
+
+ // SVGStringList
+ static void parseList(SVGStringListImpl *list, char seperator, const QString &data);
+ static void parseCommaSeperatedList(SVGStringListImpl *list, const QString &data);
+ static void parseSemicolonSeperatedList(SVGStringListImpl *list, const QString &data);
+
+ // SVGTransformList
+ static void parseTransformAttribute(SVGTransformListImpl *list, const QString &transform);
+
+ // Tools
+ static QRect fromUserspace(SVGElementImpl *, const QRect &);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGICCColorImpl.cc b/ksvg/impl/SVGICCColorImpl.cc
new file mode 100644
index 00000000..3e708ee9
--- /dev/null
+++ b/ksvg/impl/SVGICCColorImpl.cc
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGICCColorImpl.h"
+#include "SVGNumberListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGICCColorImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGICCColorImpl::SVGICCColorImpl() : DOM::DomShared()
+{
+ m_colors = new SVGNumberListImpl();
+ m_colors->ref();
+}
+
+SVGICCColorImpl::SVGICCColorImpl(const SVGICCColorImpl &other) : DOM::DomShared()
+{
+ (*this) = other;
+}
+
+SVGICCColorImpl::~SVGICCColorImpl()
+{
+ if(m_colors)
+ m_colors->deref();
+}
+
+SVGICCColorImpl &SVGICCColorImpl::operator=(const SVGICCColorImpl &other)
+{
+ m_colorProfile = other.m_colorProfile;
+ *m_colors = *(other.m_colors);
+
+ return *this;
+}
+
+DOM::DOMString SVGICCColorImpl::colorProfile() const
+{
+ return m_colorProfile;
+}
+
+void SVGICCColorImpl::setColorProfile(const DOM::DOMString &colorProfile)
+{
+ m_colorProfile = colorProfile;
+}
+
+SVGNumberListImpl *SVGICCColorImpl::colors() const
+{
+ return m_colors;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGICCColorImpl::s_hashTable 3
+ colorProfile SVGICCColorImpl::ColorProfile DontDelete
+ colors SVGICCColorImpl::Colors DontDelete|ReadOnly
+@end
+*/
+
+Value SVGICCColorImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case ColorProfile:
+ return String(m_colorProfile.string());
+ case Colors:
+ return m_colors->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGICCColorImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case ColorProfile:
+ m_colorProfile = value.toString(exec).string();
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGICCColorImpl.h b/ksvg/impl/SVGICCColorImpl.h
new file mode 100644
index 00000000..1427e59c
--- /dev/null
+++ b/ksvg/impl/SVGICCColorImpl.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGICCColorImpl_H
+#define SVGICCColorImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGNumberListImpl;
+class SVGICCColorImpl : public DOM::DomShared
+{
+public:
+ SVGICCColorImpl();
+ SVGICCColorImpl(const SVGICCColorImpl &);
+ virtual ~SVGICCColorImpl();
+
+ SVGICCColorImpl &operator=(const SVGICCColorImpl &);
+
+ void setColorProfile(const DOM::DOMString &colorProfile);
+ DOM::DOMString colorProfile() const;
+ SVGNumberListImpl *colors() const;
+
+private:
+ DOM::DOMString m_colorProfile;
+ SVGNumberListImpl *m_colors;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ ColorProfile, Colors
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGImageElementImpl.cc b/ksvg/impl/SVGImageElementImpl.cc
new file mode 100644
index 00000000..608dbda5
--- /dev/null
+++ b/ksvg/impl/SVGImageElementImpl.cc
@@ -0,0 +1,522 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qimage.h>
+#include <qtimer.h>
+
+#include <kdebug.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+#include "KSVGHelper.h"
+
+#include "SVGRectImpl.h"
+#include "SVGEventImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGImageElementImpl.moc"
+#include "SVGColorProfileElementImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "SVGPatternElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGImageElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGImageElementImpl::SVGImageElementImpl(DOM::ElementImpl *impl) : QObject(), SVGShapeImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x->ref();
+ m_x->baseVal()->setValueAsString("-1");
+
+ m_y = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y->ref();
+ m_y->baseVal()->setValueAsString("-1");
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+ m_width->baseVal()->setValueAsString("-1");
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+ m_height->baseVal()->setValueAsString("-1");
+
+ m_preserveAspectRatio = 0;
+
+ m_doc = 0;
+ m_image = 0;
+ m_svgRoot = 0;
+ m_colorProfile = 0;
+ m_colorProfileApplied = false;
+}
+
+SVGImageElementImpl::~SVGImageElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_preserveAspectRatio)
+ m_preserveAspectRatio->deref();
+ if(m_doc)
+ m_doc->deref();
+
+ delete m_image;
+}
+
+SVGAnimatedLengthImpl *SVGImageElementImpl::x()
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGImageElementImpl::y()
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGImageElementImpl::width()
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGImageElementImpl::height()
+{
+ return m_height;
+}
+
+SVGAnimatedPreserveAspectRatioImpl *SVGImageElementImpl::preserveAspectRatio() const
+{
+ return m_preserveAspectRatio;
+}
+
+/*
+@namespace KSVG
+@namespace KSVG
+@begin SVGImageElementImpl::s_hashTable 7
+ x SVGImageElementImpl::X DontDelete|ReadOnly
+ y SVGImageElementImpl::Y DontDelete|ReadOnly
+ width SVGImageElementImpl::Width DontDelete|ReadOnly
+ height SVGImageElementImpl::Height DontDelete|ReadOnly
+ preserveAspectRatio SVGImageElementImpl::PreserveAspectRatio DontDelete|ReadOnly
+ href SVGImageElementImpl::Href DontDelete|ReadOnly
+@end
+*/
+
+Value SVGImageElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ case PreserveAspectRatio:
+ if(m_preserveAspectRatio)
+ return m_preserveAspectRatio->cache(exec);
+ else
+ return Undefined();
+ case Href:
+ SVGURIReferenceImpl::getValueProperty(exec, token);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGImageElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ x()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y:
+ y()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Width:
+ width()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Height:
+ height()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case PreserveAspectRatio:
+ if(!preserveAspectRatio())
+ {
+ m_preserveAspectRatio = new SVGAnimatedPreserveAspectRatioImpl();
+ m_preserveAspectRatio->ref();
+ }
+
+ preserveAspectRatio()->baseVal()->parsePreserveAspectRatio(value.toString(exec).qstring());
+ break;
+ case Href:
+ SVGURIReferenceImpl::putValueProperty(exec, SVGURIReferenceImpl::Href, value, attr);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGImageElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_x->baseVal()->value());
+ ret->setY(m_y->baseVal()->value());
+ ret->setWidth(m_width->baseVal()->value());
+ ret->setHeight(m_height->baseVal()->value());
+ return ret;
+}
+
+void SVGImageElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "0")
+
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "0")
+
+ if(KSVG_TOKEN_NOT_PARSED(PreserveAspectRatio))
+ {
+ setAttribute("preserveAspectRatio", "xMidYMid meet");
+ KSVG_SET_ALT_ATTRIBUTE(PreserveAspectRatio, "xMidYMid meet")
+ }
+}
+
+void SVGImageElementImpl::slotParsingFinished(bool error, const QString &errorDesc)
+{
+ if(error)
+ kdDebug(26003) << "Finished with error : " << errorDesc << endl;
+ else
+ kdDebug(26003) << "Finished without errors!" << endl;
+
+ m_svgRoot = m_doc->rootElement();
+}
+
+void SVGImageElementImpl::slotLoadingFinished()
+{
+ ownerDoc()->notifyImageLoaded(this);
+}
+
+void SVGImageElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!m_item)
+ {
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ m_item = c->createImage(this);
+ c->insert(m_item);
+
+ if(href()->baseVal().string().endsWith(".svg") || href()->baseVal().string().endsWith(".svgz"))
+ {
+ if(!m_svgRoot)
+ {
+ m_doc = new SVGDocumentImpl(true, false, this);
+ m_doc->ref();
+ m_doc->attach(c);
+
+ connect(m_doc, SIGNAL(finishedParsing(bool, const QString &)), this, SLOT(slotParsingFinished(bool, const QString &)));
+ connect(m_doc, SIGNAL(finishedLoading()), this, SLOT(slotLoadingFinished()));
+
+ KURL file;
+
+ if(!KURL::isRelativeURL(href()->baseVal().string()))
+ file = KURL(href()->baseVal().string());
+ else
+ file = KURL(ownerDoc()->baseUrl(), href()->baseVal().string());
+
+ m_doc->open(file);
+
+ // The svg image will add items to the canvas in parallel with the main
+ // document, so the z-order will not be correct. Get it to fix this when everything's
+ // finished loading.
+ ownerDoc()->resortZIndicesOnFinishedLoading();
+ ownerDoc()->notifyImageLoading(this);
+ }
+ else
+ m_svgRoot->createItem(c);
+ }
+ else
+ {
+ if(!m_image)
+ {
+ ownerDoc()->newImageJob(this);
+ ownerDoc()->notifyImageLoading(this);
+ }
+ }
+ }
+}
+
+void SVGImageElementImpl::removeItem(KSVGCanvas *c)
+{
+ if(m_item && c)
+ {
+ if(m_svgRoot)
+ m_svgRoot->removeItem(c);
+
+ c->removeItem(m_item);
+ m_item = 0;
+ }
+}
+
+void SVGImageElementImpl::setupSVGElement(SVGSVGElementImpl *svg)
+{
+ // Set up the root svg for an svg image.
+ svg->setAttributeInternal("x", QString("%1").arg(x()->baseVal()->value()));
+ svg->setAttributeInternal("y", QString("%1").arg(y()->baseVal()->value()));
+ svg->setAttributeInternal("width", QString("%1").arg(width()->baseVal()->value()));
+ svg->setAttributeInternal("height", QString("%1").arg(height()->baseVal()->value()));
+
+ QString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace();
+
+ if(par.startsWith("defer"))
+ {
+ if(svg->getAttribute("preserveAspectRatio").isEmpty())
+ {
+ par.remove("defer");
+ svg->setAttribute("preserveAspectRatio", par);
+ svg->setAttributeInternal("preserveAspectRatio", par);
+ }
+ }
+ else
+ {
+ svg->setAttribute("preserveAspectRatio", par);
+ svg->setAttributeInternal("preserveAspectRatio", par);
+ }
+
+ svg->setAttributes();
+ svg->setRootParentScreenCTM(getScreenCTM());
+}
+
+void SVGImageElementImpl::onScreenCTMUpdated()
+{
+ if(m_svgRoot)
+ {
+ SVGMatrixImpl *ctm = getScreenCTM();
+
+ m_svgRoot->setRootParentScreenCTM(ctm);
+ m_svgRoot->invalidateCachedMatrices();
+ m_svgRoot->ownerDoc()->syncCachedMatrices();
+ }
+}
+
+bool SVGImageElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+{
+ // TODO : pointer-events should be stored here, not in SVGStylableImpl.
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
+ if(!style || style->getPointerEvents() == PE_NONE)
+ return false;
+ bool test = true;
+ switch(style->getPointerEvents())
+ {
+ case PE_VISIBLE:
+ case PE_VISIBLE_PAINTED:
+ case PE_VISIBLE_FILL:
+ case PE_VISIBLE_STROKE: test = style->getVisible(); break;
+ case PE_PAINTED:
+ case PE_FILL:
+ case PE_STROKE:
+ case PE_ALL: break;
+ default: test = false;
+ };
+
+ if(test && m_item)
+ {
+ if(m_item->bbox().contains(p))
+ {
+ mev->setTarget(dynamic_cast<SVGElementImpl *>(this));
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void SVGImageElementImpl::setImage(QImage *image)
+{
+ m_image = image;
+
+ if(m_image)
+ {
+ *m_image = m_image->convertDepth(32);
+
+ if(m_colorProfile != 0 && !m_colorProfileApplied)
+ {
+ m_colorProfileApplied = true;
+ applyColorProfile();
+ }
+
+ SVGPatternElementImpl::flushCachedTiles();
+
+ if(m_item)
+ {
+ ownerDoc()->canvas()->invalidate(m_item, false);
+ ownerDoc()->rerender();
+ }
+ }
+
+ ownerDoc()->notifyImageLoaded(this);
+}
+
+QImage SVGImageElementImpl::scaledImage()
+{
+ SVGMatrixImpl *matrix = imageMatrix();
+ double sx, sy;
+
+ matrix->removeScale(&sx, &sy);
+ matrix->deref();
+
+ QImage img;
+
+ if(sx != 1 || sy != 1)
+ {
+ int scaledWidth = static_cast<int>(m_image->width() * sx + 0.5);
+ int scaledHeight = static_cast<int>(m_image->height() * sy + 0.5);
+
+ img = m_image->smoothScale(scaledWidth, scaledHeight);
+ }
+ else
+ img = *m_image;
+
+ return img;
+}
+
+SVGMatrixImpl *SVGImageElementImpl::imageMatrix()
+{
+ SVGMatrixImpl *ctm = getScreenCTM();
+
+ ctm->translate(x()->baseVal()->value(), y()->baseVal()->value());
+
+ SVGMatrixImpl *viewboxMatrix = preserveAspectRatio()->baseVal()->getCTM(0, 0, image()->width(), image()->height(), 0, 0, width()->baseVal()->value(), height()->baseVal()->value());
+
+ ctm->multiply(viewboxMatrix);
+ viewboxMatrix->deref();
+
+ return ctm;
+}
+
+SVGMatrixImpl *SVGImageElementImpl::scaledImageMatrix()
+{
+ SVGMatrixImpl *matrix = imageMatrix();
+ double sx, sy;
+
+ matrix->removeScale(&sx, &sy);
+
+ if(sx != 1 || sy != 1)
+ {
+ int imageWidth = static_cast<int>(m_image->width() * sx + 0.5);
+ int imageHeight = static_cast<int>(m_image->height() * sy + 0.5);
+
+ double trueWidth = m_image->width() * sx;
+ double trueHeight = m_image->height() * sy;
+
+ matrix->scaleNonUniform(trueWidth / imageWidth, trueHeight / imageHeight);
+ }
+
+ return matrix;
+}
+
+KSVGPolygon SVGImageElementImpl::clippingShape()
+{
+ KSVGRectangle viewport(0, 0, width()->baseVal()->value(), height()->baseVal()->value());
+ SVGMatrixImpl *matrix = preserveAspectRatio()->baseVal()->getCTM(0, 0, image()->width(), image()->height(), 0, 0, width()->baseVal()->value(), height()->baseVal()->value());
+ KSVGPolygon p = matrix->inverseMap(viewport);
+ matrix->deref();
+
+ matrix = imageMatrix();
+ p = matrix->map(p);
+ matrix->deref();
+
+ return p;
+}
+
+QString SVGImageElementImpl::fileName() const
+{
+ return href()->baseVal().string();
+}
+
+void SVGImageElementImpl::applyColorProfile()
+{
+ m_image = m_colorProfile->correctImage(m_image);
+}
+
+void SVGImageElementImpl::applyColorProfile(SVGColorProfileElementImpl *profile, SVGImageElementImpl *image)
+{
+ // Only apply once, if it's the same (Niko)
+ if(image->m_colorProfile == profile)
+ return;
+
+ image->m_colorProfile = profile;
+
+ if(image->m_image)
+ {
+ // Image is already painted, we apply the color profile and repaint it
+ image->applyColorProfile();
+
+ if(image->item())
+ {
+ image->ownerDoc()->canvas()->invalidate(image->item(), false);
+ image->ownerDoc()->rerender();
+ }
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGImageElementImpl.h b/ksvg/impl/SVGImageElementImpl.h
new file mode 100644
index 00000000..35ae161f
--- /dev/null
+++ b/ksvg/impl/SVGImageElementImpl.h
@@ -0,0 +1,140 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGImageElementImpl_H
+#define SVGImageElementImpl_H
+
+#include <qobject.h>
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class KSVGPolygon;
+class SVGDocumentImpl;
+class SVGSVGElementImpl;
+class SVGAnimatedLengthImpl;
+class SVGColorProfileElementImpl;
+class SVGAnimatedPreserveAspectRatioImpl;
+class SVGImageElementImpl : public QObject,
+ public SVGShapeImpl,
+ public SVGURIReferenceImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+Q_OBJECT
+public:
+ SVGImageElementImpl(DOM::ElementImpl *);
+ virtual ~SVGImageElementImpl();
+
+ SVGAnimatedLengthImpl *x();
+ SVGAnimatedLengthImpl *y();
+ SVGAnimatedLengthImpl *width();
+ SVGAnimatedLengthImpl *height();
+ SVGAnimatedPreserveAspectRatioImpl *preserveAspectRatio() const;
+
+ virtual void createItem(KSVGCanvas *c);
+ virtual void removeItem(KSVGCanvas *c);
+
+ virtual void setAttributes();
+
+ virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+
+ void setImage(QImage *image);
+ QImage *image() { return m_image; }
+
+ QImage scaledImage();
+ SVGMatrixImpl *imageMatrix();
+ SVGMatrixImpl *scaledImageMatrix();
+
+ SVGSVGElementImpl *svgImageRootElement() const { return m_svgRoot; }
+
+ void applyColorProfile();
+ static void applyColorProfile(SVGColorProfileElementImpl *profile, SVGImageElementImpl *image);
+
+ QString fileName() const;
+
+ virtual SVGRectImpl *getBBox();
+
+ // Screen-space clipping shape
+ KSVGPolygon clippingShape();
+
+ void onScreenCTMUpdated();
+
+ void setupSVGElement(SVGSVGElementImpl *svg);
+
+private slots:
+ void slotParsingFinished(bool error, const QString &errorDesc);
+ void slotLoadingFinished();
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+ QImage *m_image;
+
+ bool m_colorProfileApplied;
+ SVGAnimatedPreserveAspectRatioImpl *m_preserveAspectRatio;
+ SVGColorProfileElementImpl *m_colorProfile;
+ SVGSVGElementImpl *m_svgRoot;
+ SVGDocumentImpl *m_doc;
+
+public:
+ KSVG_GET
+ KSVG_BRIDGE
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height, PreserveAspectRatio, Href
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+struct ImageStreamMap
+{
+ QByteArray *data;
+ SVGImageElementImpl *imageElement;
+};
+
+KSVG_REGISTER_ELEMENT(SVGImageElementImpl, "image")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLangSpaceImpl.cc b/ksvg/impl/SVGLangSpaceImpl.cc
new file mode 100644
index 00000000..0eaada47
--- /dev/null
+++ b/ksvg/impl/SVGLangSpaceImpl.cc
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGLangSpaceImpl.h"
+
+using namespace KSVG;
+
+#include "SVGLangSpaceImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGLangSpaceImpl::SVGLangSpaceImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ // Spec: default for xml:space is "default"
+ setXmlspace("default");
+}
+
+SVGLangSpaceImpl::~SVGLangSpaceImpl()
+{
+}
+
+void SVGLangSpaceImpl::setXmllang(const DOM::DOMString &xmllang)
+{
+ m_xmllang = xmllang;
+}
+
+DOM::DOMString SVGLangSpaceImpl::xmllang() const
+{
+ return m_xmllang;
+}
+
+void SVGLangSpaceImpl::setXmlspace(const DOM::DOMString &xmlspace)
+{
+ m_xmlspace = xmlspace;
+}
+
+DOM::DOMString SVGLangSpaceImpl::xmlspace() const
+{
+ return m_xmlspace;
+}
+
+QString SVGLangSpaceImpl::handleText(const QString &data) const
+{
+ QString result = data;
+
+ if(xmlspace() == "preserve")
+ {
+ // Spec: What to do here?
+ // It will convert all newline and tab characters into space characters
+ result.replace("\n\r", QString(" "));
+ result.replace("\r\n", QString(" "));
+ result.replace('\t', ' ');
+ }
+ else if(xmlspace() == "default")
+ {
+ // Spec: What to do here?
+ // First, it will remove all newline characters (replace)
+ // Then it will convert all tab characters into space characters (simplifyWhiteSpace)
+ // Then, it will strip off all leading and trailing space characters (stripWhiteSpace)
+ // Then, all contiguous space characters will be consolidated. (simplifyWhiteSpace)
+ result.replace('\n', QString::null);
+ result.replace('\r', QString::null);
+ result = result.stripWhiteSpace().simplifyWhiteSpace();
+ }
+
+ return result;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGLangSpaceImpl::s_hashTable 5
+ xmllang SVGLangSpaceImpl::XmlLang DontDelete
+ xmlspace SVGLangSpaceImpl::XmlSpace DontDelete
+ lang SVGLangSpaceImpl::XmlLang DontDelete
+ space SVGLangSpaceImpl::XmlSpace DontDelete
+@end
+*/
+
+Value SVGLangSpaceImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case XmlLang:
+ return String(m_xmllang.string());
+ case XmlSpace:
+ return String(m_xmlspace.string());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGLangSpaceImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int /*attr*/)
+{
+ switch(token)
+ {
+ case XmlLang:
+ m_xmllang = value.toString(exec).string();
+ break;
+ case XmlSpace:
+ m_xmlspace = value.toString(exec).string();
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLangSpaceImpl.h b/ksvg/impl/SVGLangSpaceImpl.h
new file mode 100644
index 00000000..4a8c199a
--- /dev/null
+++ b/ksvg/impl/SVGLangSpaceImpl.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLangSpaceImpl_H
+#define SVGLangSpaceImpl_H
+
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGLangSpaceImpl
+{
+public:
+ SVGLangSpaceImpl();
+ virtual ~SVGLangSpaceImpl();
+
+ void setXmllang(const DOM::DOMString &xmllang);
+ DOM::DOMString xmllang() const;
+
+ void setXmlspace(const DOM::DOMString &xmlspace);
+ DOM::DOMString xmlspace() const;
+
+ QString handleText(const QString &data) const;
+
+private:
+ DOM::DOMString m_xmllang;
+ DOM::DOMString m_xmlspace;
+
+public:
+ KSVG_BASECLASS_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ XmlLang, XmlSpace
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLengthImpl.cc b/ksvg/impl/SVGLengthImpl.cc
new file mode 100644
index 00000000..46529022
--- /dev/null
+++ b/ksvg/impl/SVGLengthImpl.cc
@@ -0,0 +1,510 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qfont.h>
+#include <qregexp.h>
+#include <qwidget.h>
+#include <qpaintdevicemetrics.h>
+
+#include "SVGLength.h"
+
+#include "SVGRectImpl.h"
+#include "SVGLengthImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "svgpathparser.h"
+
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+#include "SVGLengthImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+// keep track of textual description of the unit type
+QString UnitText[] =
+{
+ "", "", "%", "em", "ex", "px", "cm", "mm", "in", "pt", "pc"
+};
+
+SVGLengthImpl::SVGLengthImpl(LengthMode mode, SVGElementImpl *context) : DOM::DomShared(), m_mode(mode), m_context(context)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_unitType = SVG_LENGTHTYPE_UNKNOWN;
+ m_value = 0;
+ m_valueInSpecifiedUnits = 0;
+ m_bboxContext = 0;
+}
+
+SVGLengthImpl::SVGLengthImpl(const SVGLengthImpl &other) : DOM::DomShared()
+{
+ (*this) = other;
+}
+
+SVGLengthImpl::~SVGLengthImpl()
+{
+}
+
+double SVGLengthImpl::dpi()
+{
+ if(m_context && m_context->ownerDoc())
+ {
+ if(m_mode == LENGTHMODE_WIDTH)
+ return 25.4 * m_context->ownerDoc()->screenPixelsPerMillimeterX();
+ else if(m_mode == LENGTHMODE_HEIGHT)
+ return 25.4 * m_context->ownerDoc()->screenPixelsPerMillimeterY();
+ else if(m_mode == LENGTHMODE_OTHER)
+ return 25.4 * m_context->ownerDoc()->screenPixelsPerMillimeterX();
+ }
+ return 90.0;
+}
+
+SVGLengthImpl &SVGLengthImpl::operator=(const SVGLengthImpl &other)
+{
+ m_unitType = other.m_unitType;
+ m_value = other.m_value;
+ m_valueInSpecifiedUnits = other.m_valueInSpecifiedUnits;
+ m_bboxContext = other.m_bboxContext;
+ m_mode = other.m_mode;
+ m_context = other.m_context;
+
+ return *this;
+}
+
+unsigned short SVGLengthImpl::unitType() const
+{
+ return m_unitType;
+}
+
+void SVGLengthImpl::setValue(float value)
+{
+ m_value = value;
+ getValFromPx();
+}
+
+float SVGLengthImpl::value()
+{
+ if(m_unitType == SVG_LENGTHTYPE_PERCENTAGE)
+ {
+ float value = m_valueInSpecifiedUnits / 100.0;
+ SVGRectImpl *bbox = 0;
+ if(m_bboxContext && (bbox = m_bboxContext->getBBox()))
+ {
+ float result = 0;
+ if(m_mode == LENGTHMODE_WIDTH)
+ result = value * bbox->width();
+ else if(m_mode == LENGTHMODE_HEIGHT)
+ result = value * bbox->height();
+ else if(m_mode == LENGTHMODE_OTHER)
+ result = value * sqrt(pow(bbox->width(), 2) + pow(bbox->height(), 2)) / sqrt(2.0);
+
+ bbox->deref();
+ return result;
+ }
+ else
+ return percentageOfViewport();
+ }
+ else
+ return m_value;
+}
+
+void SVGLengthImpl::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
+{
+ m_valueInSpecifiedUnits = valueInSpecifiedUnits;
+ convertNumToPx();
+}
+
+float SVGLengthImpl::valueInSpecifiedUnits() const
+{
+ return m_valueInSpecifiedUnits;
+}
+
+void SVGLengthImpl::setValueAsString(const DOM::DOMString &valueAsString)
+{
+ convertStringToPx(valueAsString.string());
+}
+
+DOM::DOMString SVGLengthImpl::valueAsString() const
+{
+ DOM::DOMString valueAsString = QString::number(m_valueInSpecifiedUnits);
+ valueAsString += UnitText[m_unitType];
+ return valueAsString;
+}
+
+void SVGLengthImpl::newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits)
+{
+ m_valueInSpecifiedUnits = valueInSpecifiedUnits;
+ m_unitType = unitType;
+ convertNumToPx();
+}
+
+void SVGLengthImpl::convertToSpecifiedUnits(unsigned short unitType)
+{
+ m_unitType = unitType;
+ getValFromPx();
+}
+
+SVGLengthImpl::operator float()
+{
+ return valueInSpecifiedUnits();
+}
+
+bool SVGLengthImpl::getValFromPx()
+{
+ if(m_unitType == SVG_LENGTHTYPE_UNKNOWN)
+ return false;
+
+ switch(m_unitType)
+ {
+ // case SVG_LENGTHTYPE_PERCENTAGE: TODO
+ // case SVG_LENGTHTYPE_EMS: TODO
+ // case SVG_LENGTHTYPE_EXS: TODO
+ //break;
+ case SVG_LENGTHTYPE_PX:
+ m_valueInSpecifiedUnits = m_value;
+ break;
+ case SVG_LENGTHTYPE_CM:
+ m_valueInSpecifiedUnits = m_value / dpi() * 2.54;
+ break;
+ case SVG_LENGTHTYPE_MM:
+ m_valueInSpecifiedUnits = m_value / dpi() * 25.4;
+ break;
+ case SVG_LENGTHTYPE_IN:
+ m_valueInSpecifiedUnits = m_value / dpi();
+ break;
+ case SVG_LENGTHTYPE_PT:
+ m_valueInSpecifiedUnits = m_value / dpi() * 72.0;
+ break;
+ case SVG_LENGTHTYPE_PC:
+ m_valueInSpecifiedUnits = m_value / dpi() * 6.0;
+ break;
+ };
+ return true;
+}
+
+void SVGLengthImpl::convertStringToPx(QString s)
+{
+ if(s.isEmpty())
+ return;
+
+ double convNum = 0;
+ const char *start = s.latin1();
+ const char *end = getNumber(start, convNum);
+ m_valueInSpecifiedUnits = convNum;
+
+ if(uint(end - start) < s.length())
+ {
+ if(s.endsWith(UnitText[SVG_LENGTHTYPE_PX]))
+ m_unitType = SVG_LENGTHTYPE_PX;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_CM]))
+ m_unitType = SVG_LENGTHTYPE_CM;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_PC]))
+ m_unitType = SVG_LENGTHTYPE_PC;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_MM]))
+ m_unitType = SVG_LENGTHTYPE_MM;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_IN]))
+ m_unitType = SVG_LENGTHTYPE_IN;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_PT]))
+ m_unitType = SVG_LENGTHTYPE_PT;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_PERCENTAGE]))
+ m_unitType = SVG_LENGTHTYPE_PERCENTAGE;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_EMS]))
+ m_unitType = SVG_LENGTHTYPE_EMS;
+ else if(s.endsWith(UnitText[SVG_LENGTHTYPE_EXS]))
+ m_unitType = SVG_LENGTHTYPE_EXS;
+ else if(s.isEmpty())
+ m_unitType = SVG_LENGTHTYPE_NUMBER;
+ else
+ m_unitType = SVG_LENGTHTYPE_UNKNOWN;
+ }
+ else
+ m_unitType = SVG_LENGTHTYPE_PX;
+ convertNumToPx();
+}
+
+void SVGLengthImpl::convertNumToPx()
+{
+ switch(m_unitType)
+ {
+ case SVG_LENGTHTYPE_PX:
+ m_value = m_valueInSpecifiedUnits;
+ break;
+ case SVG_LENGTHTYPE_CM:
+ m_value = (m_valueInSpecifiedUnits / 2.54) * dpi();
+ break;
+ case SVG_LENGTHTYPE_MM:
+ m_value = (m_valueInSpecifiedUnits / 25.4) * dpi();
+ break;
+ case SVG_LENGTHTYPE_IN:
+ m_value = m_valueInSpecifiedUnits * dpi();
+ break;
+ case SVG_LENGTHTYPE_PT:
+ m_value = (m_valueInSpecifiedUnits / 72.0) * dpi();
+ break;
+ case SVG_LENGTHTYPE_PC:
+ m_value = (m_valueInSpecifiedUnits / 6.0) * dpi();
+ break;
+ case SVG_LENGTHTYPE_EMS: // Be careful here, always recheck coords-units-BE-01.svg after touching (Niko)
+ case SVG_LENGTHTYPE_EXS:
+ if(m_context)
+ {
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(m_context);
+ if(!style)
+ break;
+
+ bool sizeLocal = (style->getFontSize() != -1);
+ bool familyLocal = (style->getFontFamily() && style->getFontFamily()->getFirst());
+
+ SVGStylableImpl *parentStyle = 0;
+ if((!sizeLocal || !familyLocal) && m_context)
+ parentStyle = dynamic_cast<SVGStylableImpl *>(m_context->ownerDoc()->getElementFromHandle(m_context->parentNode().handle()));
+
+ // Look up font-size in a SAFE way, because at this place
+ // processStyle() has NOT yet been called, so we need
+ // a different solution (Niko)
+ QString useFont = "Arial";
+ double useSize = 12;
+
+ if(sizeLocal)
+ useSize = style->getFontSize();
+ else if(parentStyle && parentStyle->getFontSize() != -1)
+ useSize = parentStyle->getFontSize();
+
+ if(familyLocal)
+ useFont = style->getFontFamily()->getFirst()->string();
+ else if(parentStyle && parentStyle->getFontFamily() && parentStyle->getFontFamily()->getFirst())
+ useFont = parentStyle->getFontFamily()->getFirst()->string();
+
+ if(m_unitType == SVG_LENGTHTYPE_EMS)
+ m_value = m_valueInSpecifiedUnits * useSize;
+ else
+ {
+ // Easiest way, use qfont (Niko)
+ QFont font(useFont);
+ font.setPixelSize(static_cast<int>(useSize));
+
+ QFontMetrics fm(font);
+ m_value = m_valueInSpecifiedUnits * fm.boundingRect('x').height();
+ }
+ }
+ break;
+ };
+}
+
+void SVGLengthImpl::convertPercentageToFloat(const QString &perc, float &result)
+{
+ // TODO : more error checking ?
+ if(perc.endsWith("%"))
+ result = perc.left(perc.length() - 1).toFloat() / 100.0;
+ else
+ result = perc.toFloat();
+}
+
+QString SVGLengthImpl::convertValToPercentage(const QString &val, float benchmark)
+{
+ if(val.endsWith("%"))
+ return val;
+
+ QString result;
+ float temp = val.toFloat();
+
+ temp = (temp / benchmark) * 100.0;
+ result.setNum(temp);
+ result.append("%");
+
+ return result;
+}
+
+SVGElementImpl *SVGLengthImpl::context() const
+{
+ return m_context;
+}
+
+void SVGLengthImpl::setContext(SVGElementImpl *context)
+{
+ m_context = context;
+}
+
+void SVGLengthImpl::setBBoxContext(SVGShapeImpl *bbox)
+{
+ m_bboxContext = bbox;
+ convertNumToPx();
+}
+
+float SVGLengthImpl::percentageOfViewport()
+{
+ float width = 0, height = 0;
+ float value = m_valueInSpecifiedUnits / 100.0;
+ if(m_context->viewportElement())
+ {
+ SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(m_context->viewportElement());
+ if(svg)
+ {
+ // Calculate against viewBox, otherwise svg width/height
+ width = svg->viewBox()->baseVal()->width();
+ if(width == 0)
+ width = svg->width()->baseVal()->value();
+ height = svg->viewBox()->baseVal()->height();
+ if(height == 0)
+ height = svg->height()->baseVal()->value();
+ }
+
+ if(m_mode == LENGTHMODE_WIDTH)
+ return value * width;
+ else if(m_mode == LENGTHMODE_HEIGHT)
+ return value * height;
+ else if(m_mode == LENGTHMODE_OTHER)
+ return value * sqrt(pow(width, 2) + pow(height, 2)) / sqrt(2.0);
+ }
+ else if(m_context == m_context->ownerDoc()->rootElement())
+ {
+ if(!m_context->ownerDoc()->canvas()) // Happens when parsing <svg width="100%"> with printnodetest
+ return 0.0;
+
+ QPaintDeviceMetrics metrics(m_context->ownerDoc()->canvas()->drawWindow());
+
+ if(m_mode == LENGTHMODE_WIDTH)
+ return value * metrics.width();
+ else if(m_mode == LENGTHMODE_HEIGHT)
+ return value * metrics.height();
+ else if(m_mode == LENGTHMODE_OTHER)
+ return value * sqrt(pow(metrics.width(), 2) + pow(metrics.height(), 2)) / sqrt(2.0);
+ }
+
+ return 0;
+}
+
+// Ecma stuff
+//
+/*
+@namespace KSVG
+@begin SVGLengthImpl::s_hashTable 5
+ unitType SVGLengthImpl::UnitType DontDelete|ReadOnly
+ value SVGLengthImpl::Value DontDelete
+ valueAsString SVGLengthImpl::ValueAsString DontDelete
+ valueInSpecifiedUnits SVGLengthImpl::ValueInSpecifiedUnits DontDelete
+@end
+@namespace KSVG
+@begin SVGLengthImplProto::s_hashTable 3
+ newValueSpecifiedUnits SVGLengthImpl::NewValueSpecifiedUnits DontDelete|Function 2
+ convertToSpecifiedUnits SVGLengthImpl::ConvertToSpecifiedUnits DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGLength", SVGLengthImplProto, SVGLengthImplProtoFunc)
+
+Value SVGLengthImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case UnitType:
+ return Number(unitType());
+ case Value:
+ return Number(m_value);
+ case ValueAsString:
+ return String(valueAsString().string());
+ case ValueInSpecifiedUnits:
+ return Number(valueInSpecifiedUnits());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+void SVGLengthImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Value:
+ setValue(value.toNumber(exec));
+ SVGHelperImpl::updateItem(exec, *m_context);
+ break;
+ case ValueAsString:
+ setValueAsString(value.toString(exec).string());
+ SVGHelperImpl::updateItem(exec, *m_context);
+ break;
+ case ValueInSpecifiedUnits:
+ setValueInSpecifiedUnits(value.toNumber(exec));
+ SVGHelperImpl::updateItem(exec, *m_context);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGLengthImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGLengthImpl)
+
+ switch(id)
+ {
+ case SVGLengthImpl::NewValueSpecifiedUnits:
+ obj->newValueSpecifiedUnits(static_cast<unsigned short>(args[0].toNumber(exec)), args[1].toNumber(exec));
+ SVGHelperImpl::updateItem(exec, *obj->context());
+ return Undefined();
+ case SVGLengthImpl::ConvertToSpecifiedUnits:
+ obj->convertToSpecifiedUnits(static_cast<unsigned short>(args[0].toNumber(exec)));
+ SVGHelperImpl::updateItem(exec, *obj->context());
+ return Undefined();
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+/*
+@namespace KSVG
+@begin SVGLengthImplConstructor::s_hashTable 11
+ SVG_LENGTHTYPE_UNKNOWN KSVG::SVG_LENGTHTYPE_UNKNOWN DontDelete|ReadOnly
+ SVG_LENGTHTYPE_NUMBER KSVG::SVG_LENGTHTYPE_NUMBER DontDelete|ReadOnly
+ SVG_LENGTHTYPE_PERCENTAGE KSVG::SVG_LENGTHTYPE_PERCENTAGE DontDelete|ReadOnly
+ SVG_LENGTHTYPE_EMS KSVG::SVG_LENGTHTYPE_EMS DontDelete|ReadOnly
+ SVG_LENGTHTYPE_EXS KSVG::SVG_LENGTHTYPE_EXS DontDelete|ReadOnly
+ SVG_LENGTHTYPE_PX KSVG::SVG_LENGTHTYPE_PX DontDelete|ReadOnly
+ SVG_LENGTHTYPE_CM KSVG::SVG_LENGTHTYPE_CM DontDelete|ReadOnly
+ SVG_LENGTHTYPE_MM KSVG::SVG_LENGTHTYPE_MM DontDelete|ReadOnly
+ SVG_LENGTHTYPE_PT KSVG::SVG_LENGTHTYPE_PT DontDelete|ReadOnly
+ SVG_LENGTHTYPE_PC KSVG::SVG_LENGTHTYPE_PC DontDelete|ReadOnly
+@end
+*/
+
+Value SVGLengthImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGLengthImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGLengthImplConstructor>(exec, "[[svglength.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLengthImpl.h b/ksvg/impl/SVGLengthImpl.h
new file mode 100644
index 00000000..5879a091
--- /dev/null
+++ b/ksvg/impl/SVGLengthImpl.h
@@ -0,0 +1,136 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLengthImpl_H
+#define SVGLengthImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+enum LengthMode
+{
+ LENGTHMODE_UNKNOWN = 0,
+ LENGTHMODE_WIDTH = 1,
+ LENGTHMODE_HEIGHT = 2,
+ LENGTHMODE_OTHER = 3
+};
+
+class SVGShapeImpl;
+class SVGLocatableImpl;
+class SVGElementImpl;
+class SVGLengthImpl : public DOM::DomShared
+{
+public:
+ SVGLengthImpl(LengthMode mode = LENGTHMODE_UNKNOWN, SVGElementImpl *context = 0);
+ SVGLengthImpl(const SVGLengthImpl &);
+ virtual ~SVGLengthImpl();
+
+ SVGLengthImpl &operator=(const SVGLengthImpl &);
+
+ unsigned short unitType() const;
+
+ void setValue(float value);
+ float value();
+
+ void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
+ float valueInSpecifiedUnits() const;
+
+ void setValueAsString(const DOM::DOMString &);
+ DOM::DOMString valueAsString() const;
+
+ void newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits);
+ void convertToSpecifiedUnits(unsigned short unitType);
+
+ operator float();
+
+ static void convertPercentageToFloat(const QString &perc, float &result);
+
+ // This method converts the value val to percentage notation ("xxx%").
+ // If the value string ends with the percentage sign it is returned,
+ // else the value is calculated against benchmark, ie. "0.2" -> "20%"
+ // for benchmark 1.0. This method should be useful in contexts that
+ // know the values should be in percentages up front, like bbox
+ // calculations.
+ static QString convertValToPercentage(const QString &val, float benchmark = 1.0);
+
+ SVGElementImpl *context() const;
+ void setContext(SVGElementImpl *context);
+ void setBBoxContext(SVGShapeImpl *bbox);
+
+private:
+ float m_value;
+ float m_valueInSpecifiedUnits;
+
+ float percentageOfViewport();
+
+ void convertStringToPx(QString s);
+ void convertNumToPx();
+ bool getValFromPx();
+
+ unsigned short m_unitType : 4;
+
+ // KSVG extension
+ LengthMode m_mode : 2;
+ SVGElementImpl *m_context;
+ SVGShapeImpl *m_bboxContext;
+
+ double dpi();
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ UnitType, Value, ValueAsString, ValueInSpecifiedUnits,
+ // Functions
+ NewValueSpecifiedUnits, ConvertToSpecifiedUnits
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+
+};
+
+class SVGLengthImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGLengthImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGLengthImplConstructor(KJS::ExecState *exec);
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGLengthImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGLengthImplProtoFunc, SVGLengthImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLengthListImpl.cc b/ksvg/impl/SVGLengthListImpl.cc
new file mode 100644
index 00000000..31215ddd
--- /dev/null
+++ b/ksvg/impl/SVGLengthListImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGLengthListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGLengthListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGLengthListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGLengthListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGLengthList", SVGLengthListImplProto, SVGLengthListImplProtoFunc)
+
+Value SVGLengthListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SVGLengthImpl>::getValueProperty(exec, token);
+}
+
+Value SVGLengthListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGLengthListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SVGLengthImpl> *>(obj), args, id);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLengthListImpl.h b/ksvg/impl/SVGLengthListImpl.h
new file mode 100644
index 00000000..7ef8c80d
--- /dev/null
+++ b/ksvg/impl/SVGLengthListImpl.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLengthListImpl_H
+#define SVGLengthListImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGList.h"
+
+#include "SVGLengthImpl.h"
+
+namespace KSVG
+{
+
+class SVGLengthListImpl : public SVGList<SVGLengthImpl>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGLengthListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGLengthListImplProtoFunc, SVGLengthListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLineElementImpl.cc b/ksvg/impl/SVGLineElementImpl.cc
new file mode 100644
index 00000000..7e13f46c
--- /dev/null
+++ b/ksvg/impl/SVGLineElementImpl.cc
@@ -0,0 +1,213 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include <kglobal.h>
+
+#include <kdebug.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include "SVGRectImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGLineElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+using namespace KSVG;
+
+#include "SVGLineElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGLineElementImpl::SVGLineElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x1 = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x1->ref();
+ m_x1->baseVal()->setValueAsString("-1");
+
+ m_y1 = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y1->ref();
+ m_y1->baseVal()->setValueAsString("-1");
+
+ m_x2 = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x2->ref();
+ m_x2->baseVal()->setValueAsString("-1");
+
+ m_y2 = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y2->ref();
+ m_y2->baseVal()->setValueAsString("-1");
+}
+
+SVGLineElementImpl::~SVGLineElementImpl()
+{
+ if(m_x1)
+ m_x1->deref();
+ if(m_x2)
+ m_x2->deref();
+ if(m_y1)
+ m_y1->deref();
+ if(m_y2)
+ m_y2->deref();
+}
+
+SVGAnimatedLengthImpl *SVGLineElementImpl::x1()
+{
+ return m_x1;
+}
+
+SVGAnimatedLengthImpl *SVGLineElementImpl::y1()
+{
+ return m_y1;
+}
+
+SVGAnimatedLengthImpl *SVGLineElementImpl::x2()
+{
+ return m_x2;
+}
+
+SVGAnimatedLengthImpl *SVGLineElementImpl::y2()
+{
+ return m_y2;
+}
+
+/*
+@namespace KSVG
+@begin SVGLineElementImpl::s_hashTable 5
+ x1 SVGLineElementImpl::X1 DontDelete|ReadOnly
+ y1 SVGLineElementImpl::Y1 DontDelete|ReadOnly
+ x2 SVGLineElementImpl::X2 DontDelete|ReadOnly
+ y2 SVGLineElementImpl::Y2 DontDelete|ReadOnly
+@end
+*/
+
+Value SVGLineElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X1:
+ if(!attributeMode)
+ return m_x1->cache(exec);
+ else
+ return Number(m_x1->baseVal()->value());
+ case Y1:
+ if(!attributeMode)
+ return m_y1->cache(exec);
+ else
+ return Number(m_y1->baseVal()->value());
+ case X2:
+ if(!attributeMode)
+ return m_x2->cache(exec);
+ else
+ return Number(m_x2->baseVal()->value());
+ case Y2:
+ if(!attributeMode)
+ return m_y2->cache(exec);
+ else
+ return Number(m_y2->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGLineElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X1:
+ x1()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y1:
+ y1()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case X2:
+ x2()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y2:
+ y2()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGLineElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+
+ float minx = kMin(m_x1->baseVal()->value(), m_x2->baseVal()->value());
+ float miny = kMin(m_y1->baseVal()->value(), m_y2->baseVal()->value());
+ float maxx = kMax(m_x1->baseVal()->value(), m_x2->baseVal()->value());
+ float maxy = kMax(m_y1->baseVal()->value(), m_y2->baseVal()->value());
+ ret->setX(minx);
+ ret->setY(miny);
+ ret->setWidth(maxx - minx);
+ ret->setHeight(maxy - miny);
+
+ return ret;
+}
+
+void SVGLineElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(X1))
+ KSVG_SET_ALT_ATTRIBUTE(X1, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Y1))
+ KSVG_SET_ALT_ATTRIBUTE(Y1, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(X2))
+ KSVG_SET_ALT_ATTRIBUTE(X2, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Y2))
+ KSVG_SET_ALT_ATTRIBUTE(Y2, "0")
+}
+
+void SVGLineElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createLine(this);
+ c->insert(m_item);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLineElementImpl.h b/ksvg/impl/SVGLineElementImpl.h
new file mode 100644
index 00000000..725881a3
--- /dev/null
+++ b/ksvg/impl/SVGLineElementImpl.h
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLineElementImpl_H
+#define SVGLineElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGAnimatedLengthImpl;
+class SVGLineElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGLineElementImpl(DOM::ElementImpl *);
+ virtual ~SVGLineElementImpl();
+
+ SVGAnimatedLengthImpl *x1();
+ SVGAnimatedLengthImpl *y1();
+ SVGAnimatedLengthImpl *x2();
+ SVGAnimatedLengthImpl *y2();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void setAttributes();
+
+ virtual SVGRectImpl *getBBox();
+
+private:
+ SVGAnimatedLengthImpl *m_x1;
+ SVGAnimatedLengthImpl *m_y1;
+ SVGAnimatedLengthImpl *m_x2;
+ SVGAnimatedLengthImpl *m_y2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X1, Y1, X2, Y2
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGLineElementImpl, "line")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLinearGradientElementImpl.cc b/ksvg/impl/SVGLinearGradientElementImpl.cc
new file mode 100644
index 00000000..54c97f01
--- /dev/null
+++ b/ksvg/impl/SVGLinearGradientElementImpl.cc
@@ -0,0 +1,201 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGradientElement.h"
+#include "SVGLinearGradientElementImpl.h"
+
+#include "SVGDocumentImpl.h"
+#include "KSVGCanvas.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGLengthImpl.h"
+#include "SVGUnitConverter.h"
+
+using namespace KSVG;
+
+#include "SVGLinearGradientElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGLinearGradientElementImpl::SVGLinearGradientElementImpl(DOM::ElementImpl *impl) : SVGGradientElementImpl(impl)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x1 = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x1->ref();
+
+ m_y1 = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y1->ref();
+
+ m_x2 = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x2->ref();
+
+ m_y2 = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y2->ref();
+
+ converter()->add(m_x1);
+ converter()->add(m_y1);
+ converter()->add(m_x2);
+ converter()->add(m_y2);
+}
+
+SVGLinearGradientElementImpl::~SVGLinearGradientElementImpl()
+{
+ if(m_x1)
+ m_x1->deref();
+ if(m_y1)
+ m_y1->deref();
+ if(m_x2)
+ m_x2->deref();
+ if(m_y2)
+ m_y2->deref();
+}
+
+SVGAnimatedLengthImpl *SVGLinearGradientElementImpl::x1() const
+{
+ return m_x1;
+}
+
+SVGAnimatedLengthImpl *SVGLinearGradientElementImpl::y1() const
+{
+ return m_y1;
+}
+
+SVGAnimatedLengthImpl *SVGLinearGradientElementImpl::x2() const
+{
+ return m_x2;
+}
+
+SVGAnimatedLengthImpl *SVGLinearGradientElementImpl::y2() const
+{
+ return m_y2;
+}
+
+/*
+@namespace KSVG
+@begin SVGLinearGradientElementImpl::s_hashTable 5
+ x1 SVGLinearGradientElementImpl::X1 DontDelete|ReadOnly
+ y1 SVGLinearGradientElementImpl::Y1 DontDelete|ReadOnly
+ x2 SVGLinearGradientElementImpl::X2 DontDelete|ReadOnly
+ y2 SVGLinearGradientElementImpl::Y2 DontDelete|ReadOnly
+@end
+*/
+
+Value SVGLinearGradientElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X1:
+ if(!attributeMode)
+ return m_x1->cache(exec);
+ else
+ return Number(m_x1->baseVal()->value());
+ case Y1:
+ if(!attributeMode)
+ return m_y1->cache(exec);
+ else
+ return Number(m_y1->baseVal()->value());
+ case X2:
+ if(!attributeMode)
+ return m_x2->cache(exec);
+ else
+ return Number(m_x2->baseVal()->value());
+ case Y2:
+ if(!attributeMode)
+ return m_y2->cache(exec);
+ else
+ return Number(m_y2->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGLinearGradientElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X1:
+ converter()->modify(x1(), value.toString(exec).qstring());
+ break;
+ case Y1:
+ converter()->modify(y1(), value.toString(exec).qstring());
+ break;
+ case X2:
+ converter()->modify(x2(), value.toString(exec).qstring());
+ break;
+ case Y2:
+ converter()->modify(y2(), value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGLinearGradientElementImpl::setAttributes()
+{
+ SVGGradientElementImpl::setAttributes();
+
+ // Spec: no attribute, effect is af value 0% is specified
+ if(KSVG_TOKEN_NOT_PARSED(X1))
+ KSVG_SET_ALT_ATTRIBUTE(X1, "0")
+
+ // Spec: no attribute, effect is af value 0% is specified
+ if(KSVG_TOKEN_NOT_PARSED(Y1))
+ KSVG_SET_ALT_ATTRIBUTE(Y1, "0")
+
+ // Spec: no attribute, effect is af value 100% is specified
+ if(KSVG_TOKEN_NOT_PARSED(X2))
+ KSVG_SET_ALT_ATTRIBUTE(X2, "100%")
+
+ // Spec: no attribute, effect is af value 0% is specified
+ if(KSVG_TOKEN_NOT_PARSED(Y2))
+ KSVG_SET_ALT_ATTRIBUTE(Y2, "0")
+}
+
+QMap<QString, DOM::DOMString> SVGLinearGradientElementImpl::gradientAttributes()
+{
+ setAttributes();
+
+ QMap<QString, DOM::DOMString> gradAttributes;
+ QDictIterator<DOM::DOMString> it(attributes());
+
+ for(; it.current(); ++it)
+ {
+ DOM::DOMString name = it.currentKey();
+ DOM::DOMString value = it.current()->string();
+
+ if(name == "gradientUnits" || name == "gradientTransform" || name == "spreadMethod" || name == "x1" || name == "x2" || name == "y1" || name == "y2")
+ {
+ gradAttributes.insert(name.string(), value.copy());
+ }
+ }
+
+ return gradAttributes;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLinearGradientElementImpl.h b/ksvg/impl/SVGLinearGradientElementImpl.h
new file mode 100644
index 00000000..a230a0fe
--- /dev/null
+++ b/ksvg/impl/SVGLinearGradientElementImpl.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLinearGradientElementImpl_H
+#define SVGLinearGradientElementImpl_H
+
+#include "SVGGradientElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGLinearGradientElementImpl : public SVGGradientElementImpl
+{
+public:
+ SVGLinearGradientElementImpl(DOM::ElementImpl *);
+ virtual ~SVGLinearGradientElementImpl();
+
+ SVGAnimatedLengthImpl *x1() const;
+ SVGAnimatedLengthImpl *y1() const;
+ SVGAnimatedLengthImpl *x2() const;
+ SVGAnimatedLengthImpl *y2() const;
+
+ virtual void setAttributes();
+
+ virtual QMap<QString, DOM::DOMString> gradientAttributes();
+
+private:
+ SVGAnimatedLengthImpl *m_x1;
+ SVGAnimatedLengthImpl *m_y1;
+ SVGAnimatedLengthImpl *m_x2;
+ SVGAnimatedLengthImpl *m_y2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X1, X2, Y1, Y2, Href
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGLinearGradientElementImpl, "linearGradient")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGList.h b/ksvg/impl/SVGList.h
new file mode 100644
index 00000000..45eb81ba
--- /dev/null
+++ b/ksvg/impl/SVGList.h
@@ -0,0 +1,174 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGList_H
+#define SVGList_H
+
+#include "ksvg_bridge.h"
+#include "ksvg_lookup.h"
+#include "ksvg_scriptinterpreter.h"
+#include <qptrlist.h>
+#include <dom/dom_misc.h>
+
+namespace KSVG
+{
+
+class SVGListDefs
+{
+public:
+ enum
+ {
+ // Properties
+ NumberOfItems,
+ // Functions
+ GetItem, RemoveItem, AppendItem, Initialize,
+ InsertItemBefore, ReplaceItem, Clear
+ };
+};
+
+template<class T>
+class SVGList : public DOM::DomShared
+{
+public:
+ SVGList() { m_impl.setAutoDelete(false); }
+ SVGList(const SVGList &other) { *this = other; }
+ ~SVGList() { clear(); }
+
+ SVGList<T> &operator=(const SVGList<T> &other)
+ {
+ // Clear own list
+ clear();
+
+ // Clone other's elements and append them
+ SVGList<T> &get = const_cast<SVGList<T> &>(other);
+ for(unsigned int i = 0; i < other.numberOfItems(); i++)
+ {
+ T *obj = new T(*get.getItem(i));
+ obj->ref();
+
+ appendItem(obj);
+ }
+
+ return *this;
+ }
+
+ unsigned int numberOfItems() const { return m_impl.count(); }
+
+ void clear()
+ {
+ for(unsigned int i = 0; i < numberOfItems(); i++)
+ getItem(i)->deref();
+
+ m_impl.clear();
+ }
+
+ T *initialize(T *newItem)
+ {
+ clear();
+ return appendItem(newItem);
+ }
+
+ T *getFirst() const { return m_impl.getFirst(); }
+
+ T *getLast() const { return m_impl.getLast(); }
+
+ T *getItem(unsigned int index) { return m_impl.at(index); }
+ const T *getItem(unsigned int index) const { return const_cast<SVGList<T> *>(this)->m_impl.at(index); }
+
+ T *insertItemBefore(T *newItem, unsigned int index)
+ {
+ if (index < m_vector.size()) {
+ m_vector.insert(index, newItem);
+ } else {
+ m_vector.append(newItem);
+ }
+ return newItem;
+ }
+
+ T *replaceItem(T *newItem, unsigned int index)
+ {
+ m_impl.take(index);
+ m_impl.insert(index, newItem);
+ return newItem;
+ }
+
+ T *removeItem(unsigned int index)
+ {
+ return m_impl.take(index);
+ }
+
+ void removeItem(const T *item)
+ {
+ m_impl.remove(item);
+ }
+
+ T *appendItem(T *newItem)
+ {
+ m_impl.append(newItem);
+ return newItem;
+ }
+
+ // Ecma stuff
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const
+ {
+ switch(token)
+ {
+ case SVGListDefs::NumberOfItems:
+ return KJS::Number(numberOfItems());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+ }
+
+ KJS::Value call(KJS::ExecState *exec, SVGList<T> *obj, const KJS::List &args, int id)
+ {
+ switch(id)
+ {
+ case SVGListDefs::GetItem:
+ return obj->getItem(static_cast<unsigned int>(args[0].toNumber(exec)))->cache(exec);
+ case SVGListDefs::RemoveItem:
+ return obj->removeItem(static_cast<unsigned int>(args[0].toNumber(exec)))->cache(exec);
+ case SVGListDefs::AppendItem:
+ return obj->appendItem(static_cast<KSVGBridge<T> *>(args[0].imp())->impl())->cache(exec);
+ case SVGListDefs::InsertItemBefore:
+ return obj->insertItemBefore(static_cast<KSVGBridge<T> *>(args[0].imp())->impl(), static_cast<unsigned int>(args[1].toNumber(exec)))->cache(exec);
+ case SVGListDefs::Initialize:
+ return obj->initialize(static_cast<KSVGBridge<T> *>(args[0].imp())->impl())->cache(exec);
+ case SVGListDefs::Clear:
+ {
+ obj->clear();
+ return KJS::Undefined();
+ }
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return KJS::Undefined();
+ }
+
+private:
+ QPtrList<T> m_impl;
+};
+
+}
+
+#endif
diff --git a/ksvg/impl/SVGLocatableImpl.cc b/ksvg/impl/SVGLocatableImpl.cc
new file mode 100644
index 00000000..0ae143fa
--- /dev/null
+++ b/ksvg/impl/SVGLocatableImpl.cc
@@ -0,0 +1,208 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGRectImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGLocatableImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+
+using namespace KSVG;
+
+#include "SVGLocatableImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGLocatableImpl::SVGLocatableImpl()
+{
+ m_nearestViewportElement = 0;
+ m_farthestViewportElement = 0;
+ m_cachedScreenCTM = SVGSVGElementImpl::createSVGMatrix();
+ m_cachedScreenCTMIsValid = false;
+}
+
+SVGLocatableImpl::~SVGLocatableImpl()
+{
+ if(m_nearestViewportElement)
+ m_nearestViewportElement->deref();
+ if(m_farthestViewportElement)
+ m_farthestViewportElement->deref();
+ if(m_cachedScreenCTM)
+ m_cachedScreenCTM->deref();
+}
+
+SVGRectImpl *SVGLocatableImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ return ret;
+}
+
+SVGMatrixImpl *SVGLocatableImpl::getCTM()
+{
+ SVGMatrixImpl *ret = SVGSVGElementImpl::createSVGMatrix();
+ return ret;
+}
+
+SVGMatrixImpl *SVGLocatableImpl::getScreenCTM()
+{
+ SVGMatrixImpl *ret = SVGSVGElementImpl::createSVGMatrix();
+ ret->copy(m_cachedScreenCTM);
+
+ return ret;
+}
+
+SVGMatrixImpl *SVGLocatableImpl::getTransformToElement(SVGElementImpl *)
+{
+ SVGMatrixImpl *ret = SVGSVGElementImpl::createSVGMatrix();
+ return ret;
+}
+
+void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM)
+{
+ m_cachedScreenCTM->copy(parentScreenCTM);
+
+ const SVGMatrixImpl *local = localMatrix();
+
+ if(local)
+ m_cachedScreenCTM->multiply(local);
+ m_cachedScreenCTMIsValid = true;
+
+ // Notify the element
+ onScreenCTMUpdated();
+
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
+
+ if(shape)
+ {
+ // TODO: Update due to matrix animations
+ //if(shape->item())
+ // shape->item()->update(updateReason);
+
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
+
+ DOM::Node node = element->firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *child = element->ownerDoc()->getElementFromHandle(node.handle());
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(child);
+
+ if(child && locatable)
+ locatable->updateCachedScreenCTM(m_cachedScreenCTM);
+ }
+ }
+}
+
+void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM)
+{
+ if(m_cachedScreenCTMIsValid)
+ {
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
+
+ if(shape)
+ {
+ DOM::Node node = element->firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *child = element->ownerDoc()->getElementFromHandle(node.handle());
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(child);
+
+ if(child && locatable)
+ locatable->checkCachedScreenCTM(m_cachedScreenCTM);
+ }
+ }
+ }
+ else
+ updateCachedScreenCTM(parentScreenCTM);
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGLocatableImpl::s_hashTable 3
+ nearestViewportElement SVGLocatableImpl::NearestViewportElement DontDelete
+ farthestViewportElement SVGLocatableImpl::FarthestViewportElement DontDelete
+@end
+@namespace KSVG
+@begin SVGLocatableImplProto::s_hashTable 5
+ getBBox SVGLocatableImpl::GetBBox DontDelete|Function 0
+ getCTM SVGLocatableImpl::GetCTM DontDelete|Function 0
+ getScreenCTM SVGLocatableImpl::GetScreenCTM DontDelete|Function 0
+ getTransformToElement SVGLocatableImpl::GetTransformToElement DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGLocatable", SVGLocatableImplProto, SVGLocatableImplProtoFunc)
+
+Value SVGLocatableImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case NearestViewportElement:
+ return nearestViewportElement() ? nearestViewportElement()->cache(exec) : Undefined();
+ case FarthestViewportElement:
+ return farthestViewportElement() ? farthestViewportElement()->cache(exec) : Undefined();
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGLocatableImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGLocatableImpl)
+
+ switch(id)
+ {
+ case SVGLocatableImpl::GetBBox:
+ {
+ SVGContainerImpl *container = dynamic_cast<SVGContainerImpl *>(obj);
+ if(container)
+ return container->getBBox()->cache(exec);
+ else
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(obj);
+ if(shape)
+ return shape->getBBox()->cache(exec);
+ else
+ return obj->getBBox()->cache(exec);
+ }
+ }
+ case SVGLocatableImpl::GetCTM:
+ return obj->getCTM()->cache(exec);
+ case SVGLocatableImpl::GetScreenCTM:
+ return obj->getScreenCTM()->cache(exec);
+ case SVGLocatableImpl::GetTransformToElement:
+ return obj->getTransformToElement(static_cast<KSVGBridge<SVGElementImpl> *>(args[0].imp())->impl())->cache(exec);
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGLocatableImpl.h b/ksvg/impl/SVGLocatableImpl.h
new file mode 100644
index 00000000..81ce3326
--- /dev/null
+++ b/ksvg/impl/SVGLocatableImpl.h
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGLocatableImpl_H
+#define SVGLocatableImpl_H
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGMatrixImpl;
+class SVGElementImpl;
+class SVGLocatableImpl
+{
+public:
+ SVGLocatableImpl();
+ virtual ~SVGLocatableImpl();
+
+ SVGElementImpl *nearestViewportElement() const { return m_nearestViewportElement; }
+ SVGElementImpl *farthestViewportElement() const{ return m_farthestViewportElement; }
+
+ virtual SVGRectImpl *getBBox();
+ virtual SVGMatrixImpl *getCTM();
+ virtual SVGMatrixImpl *getScreenCTM();
+
+ // Faster access for when a new copy isn't required.
+ const SVGMatrixImpl *screenCTM() const { return m_cachedScreenCTM; }
+
+ SVGMatrixImpl *getTransformToElement(SVGElementImpl *element);
+
+ // The local transformations concatenated together. 0 if
+ // there are no local transformations.
+ virtual const SVGMatrixImpl *localMatrix() { return 0; }
+
+ bool cachedScreenCTMIsValid() const { return m_cachedScreenCTMIsValid; }
+ void invalidateCachedMatrices() { m_cachedScreenCTMIsValid = false; }
+
+ // If the cached matrix is invalid, update it and update any child elements
+ // recursively. Otherwise, check child elements recursively.
+ virtual void checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM);
+ // Update the cached matrix, and update child element cached matrices,
+ // recursively.
+ virtual void updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM);
+
+ // Called immediately after the screen ctm has been updated.
+ virtual void onScreenCTMUpdated() {}
+
+protected:
+ SVGElementImpl *m_nearestViewportElement;
+ SVGElementImpl *m_farthestViewportElement;
+ SVGMatrixImpl *m_cachedScreenCTM;
+ bool m_cachedScreenCTMIsValid;
+
+public:
+ KSVG_BASECLASS_GET
+
+ enum
+ {
+ // Properties
+ NearestViewportElement, FarthestViewportElement,
+ // Functions
+ GetBBox, GetCTM, GetScreenCTM, GetTransformToElement
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGLocatableImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGLocatableImplProtoFunc, SVGLocatableImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMPathElementImpl.cc b/ksvg/impl/SVGMPathElementImpl.cc
new file mode 100644
index 00000000..84d48274
--- /dev/null
+++ b/ksvg/impl/SVGMPathElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMPathElementImpl.h"
+
+using namespace KSVG;
+
+SVGMPathElementImpl::SVGMPathElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGExternalResourcesRequiredImpl()
+{
+}
+
+SVGMPathElementImpl::~SVGMPathElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMPathElementImpl.h b/ksvg/impl/SVGMPathElementImpl.h
new file mode 100644
index 00000000..8d0bd96b
--- /dev/null
+++ b/ksvg/impl/SVGMPathElementImpl.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMPathElementImpl_H
+#define SVGMPathElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGMPathElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGExternalResourcesRequiredImpl
+{
+public:
+ SVGMPathElementImpl(DOM::ElementImpl *);
+ virtual ~SVGMPathElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMarkerElementImpl.cc b/ksvg/impl/SVGMarkerElementImpl.cc
new file mode 100644
index 00000000..0fc1d263
--- /dev/null
+++ b/ksvg/impl/SVGMarkerElementImpl.cc
@@ -0,0 +1,424 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGMarkerElement.h"
+
+#include "SVGRectImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGAnimatedAngleImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+#include "SVGMarkerElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+#include "ksvg_cacheimpl.h"
+
+SVGMarkerElementImpl::SVGMarkerElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGFitToViewBoxImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_refX = new SVGAnimatedLengthImpl();
+ m_refX->ref();
+
+ m_refY = new SVGAnimatedLengthImpl();
+ m_refY->ref();
+
+ m_markerUnits = new SVGAnimatedEnumerationImpl();
+ m_markerUnits->ref();
+
+ m_markerWidth = new SVGAnimatedLengthImpl();
+ m_markerWidth->ref();
+
+ m_markerHeight = new SVGAnimatedLengthImpl();
+ m_markerHeight->ref();
+
+ m_orientType = new SVGAnimatedEnumerationImpl();
+ m_orientType->ref();
+
+ m_orientAngle = new SVGAnimatedAngleImpl();
+ m_orientAngle->ref();
+}
+
+SVGMarkerElementImpl::~SVGMarkerElementImpl()
+{
+ if(m_refX)
+ m_refX->deref();
+ if(m_refY)
+ m_refY->deref();
+ if(m_markerUnits)
+ m_markerUnits->deref();
+ if(m_markerWidth)
+ m_markerWidth->deref();
+ if(m_markerHeight)
+ m_markerHeight->deref();
+ if(m_orientType)
+ m_orientType->deref();
+ if(m_orientAngle)
+ m_orientAngle->deref();
+}
+
+SVGAnimatedLengthImpl *SVGMarkerElementImpl::refX() const
+{
+ return m_refX;
+}
+
+SVGAnimatedLengthImpl *SVGMarkerElementImpl::refY() const
+{
+ return m_refY;
+}
+
+SVGAnimatedEnumerationImpl *SVGMarkerElementImpl::markerUnits() const
+{
+ return m_markerUnits;
+}
+
+SVGAnimatedLengthImpl *SVGMarkerElementImpl::markerWidth() const
+{
+ return m_markerWidth;
+}
+
+SVGAnimatedLengthImpl *SVGMarkerElementImpl::markerHeight() const
+{
+ return m_markerHeight;
+}
+
+SVGAnimatedEnumerationImpl *SVGMarkerElementImpl::orientType() const
+{
+ return m_orientType;
+}
+
+SVGAnimatedAngleImpl *SVGMarkerElementImpl::orientAngle() const
+{
+ return m_orientAngle;
+}
+
+void SVGMarkerElementImpl::setOrientToAuto()
+{
+ orientType()->setBaseVal(SVG_MARKER_ORIENT_AUTO);
+}
+
+void SVGMarkerElementImpl::setOrientToAngle(SVGAngleImpl *angle)
+{
+ m_orientAngle->baseVal()->setValue(angle->value());
+}
+
+void SVGMarkerElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(RefX))
+ KSVG_SET_ALT_ATTRIBUTE(RefX, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(RefY))
+ KSVG_SET_ALT_ATTRIBUTE(RefY, "0")
+
+ // Spec: if not specified, effect is as if a value of "3" were specified
+ if(KSVG_TOKEN_NOT_PARSED(MarkerWidth))
+ KSVG_SET_ALT_ATTRIBUTE(MarkerWidth, "3")
+
+ // Spec: if not specified, effect is as if a value of "3" were specified
+ if(KSVG_TOKEN_NOT_PARSED(MarkerHeight))
+ KSVG_SET_ALT_ATTRIBUTE(MarkerHeight, "3")
+
+ // Spec: if attribute not specified, use strokeWidth
+ if(KSVG_TOKEN_NOT_PARSED(MarkerUnits))
+ KSVG_SET_ALT_ATTRIBUTE(MarkerUnits, "strokeWidth")
+
+ // Spec: if attribute not specified, use angle
+ if(KSVG_TOKEN_NOT_PARSED(Orient))
+ KSVG_SET_ALT_ATTRIBUTE(Orient, "angle")
+}
+
+void SVGMarkerElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createCanvasMarker(this);
+ c->insert(m_item);
+ }
+}
+
+void SVGMarkerElementImpl::draw(SVGShapeImpl *referencingElement, double x, double y, double lwidth, double angle)
+{
+ SVGMatrixImpl *mtx = dynamic_cast<SVGLocatableImpl *>(referencingElement)->getScreenCTM();
+
+ // move to dest
+ mtx->translate(x, y);
+
+ // scale by linewidth if marker units == strokewidth
+ if(markerUnits()->baseVal() == SVG_MARKERUNITS_STROKEWIDTH)
+ mtx->scale(lwidth);
+
+ // select appropriate rotation
+ if(orientType()->baseVal() == SVG_MARKER_ORIENT_AUTO)
+ mtx->rotate(angle);
+ else
+ mtx->rotate(orientAngle()->baseVal()->value());
+
+ SVGRectImpl *viewBoxRect = viewBox()->baseVal();
+ SVGMatrixImpl *pres = preserveAspectRatio()->baseVal()->getCTM(viewBoxRect->x(), viewBoxRect->y(),
+ viewBoxRect->width(), viewBoxRect->height(),
+ 0, 0, markerWidth()->baseVal()->value(),
+ markerHeight()->baseVal()->value());
+
+ // viewbox stuff
+ mtx->multiply(pres);
+
+ // Get the vertex position in viewbox coordinates. The vertex is at (0, 0) in viewport coordinates.
+ double vertexX, vertexY;
+ pres->qmatrix().invert().map(0, 0, &vertexX, &vertexY);
+
+ // Translate so that the vertex is at (refX, refY) in viewbox coordinates.
+ mtx->translate(vertexX - refX()->baseVal()->value(), vertexY - refY()->baseVal()->value());
+
+ if(getOverflow())
+ m_clipShape.clear();
+ else
+ {
+ KSVGRectangle viewport;
+
+ if(hasAttribute("viewBox"))
+ {
+ // Get the viewport ((0, 0) - (markerWidth, markerHeight)) in viewbox coordinates.
+ double w, h;
+ pres->qmatrix().invert().map(markerWidth()->baseVal()->value(), markerHeight()->baseVal()->value(), &w, &h);
+
+ viewport = KSVGRectangle(vertexX, vertexY, w - vertexX, h - vertexY);
+ }
+ else
+ viewport = KSVGRectangle(0, 0, markerWidth()->baseVal()->value(), markerHeight()->baseVal()->value());
+
+ // Transform to screen coordinates.
+ m_clipShape = mtx->map(viewport);
+ }
+
+ pres->deref();
+
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+ if(element && shape && style && ok && style->getVisible() && style->getDisplay())
+ {
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
+ if(locatable)
+ locatable->updateCachedScreenCTM(mtx);
+
+ shape->update(UPDATE_TRANSFORM);
+ shape->setReferenced(true);
+ shape->draw();
+ shape->setReferenced(false);
+ }
+ }
+
+ mtx->deref();
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGMarkerElementImpl::s_hashTable 11
+ refX SVGMarkerElementImpl::RefX DontDelete|ReadOnly
+ refY SVGMarkerElementImpl::RefY DontDelete|ReadOnly
+ markerUnits SVGMarkerElementImpl::MarkerUnits DontDelete|ReadOnly
+ markerWidth SVGMarkerElementImpl::MarkerWidth DontDelete|ReadOnly
+ markerHeight SVGMarkerElementImpl::MarkerHeight DontDelete|ReadOnly
+ orientType SVGMarkerElementImpl::OrientType DontDelete|ReadOnly
+ orientAngle SVGMarkerElementImpl::OrientAngle DontDelete|ReadOnly
+ orient SVGMarkerElementImpl::Orient DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGMarkerElementImplProto::s_hashTable 3
+ setOrientToAuto SVGMarkerElementImpl::SetOrientToAuto DontDelete|Function 0
+ setOrientToAngle SVGMarkerElementImpl::SetOrientToAngle DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGMarkerElement", SVGMarkerElementImplProto, SVGMarkerElementImplProtoFunc)
+
+Value SVGMarkerElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case RefX:
+ if(!attributeMode)
+ return m_refX->cache(exec);
+ else
+ return Number(m_refX->baseVal()->value());
+ case RefY:
+ if(!attributeMode)
+ return m_refY->cache(exec);
+ else
+ return Number(m_refY->baseVal()->value());
+ case MarkerUnits:
+ if(!attributeMode)
+ return m_markerUnits->cache(exec);
+ else
+ return Number(m_markerUnits->baseVal());
+ case MarkerWidth:
+ if(!attributeMode)
+ return m_markerWidth->cache(exec);
+ else
+ return Number(m_markerWidth->baseVal()->value());
+ case MarkerHeight:
+ if(!attributeMode)
+ return m_markerHeight->cache(exec);
+ else
+ return Number(m_markerHeight->baseVal()->value());
+ case OrientType:
+ if(!attributeMode)
+ return m_orientType->cache(exec);
+ else
+ return Number(m_orientType->baseVal());
+ case OrientAngle:
+ if(!attributeMode)
+ return m_orientAngle->cache(exec);
+ else
+ return Number(m_orientAngle->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGMarkerElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case RefX:
+ refX()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case RefY:
+ refY()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case MarkerWidth:
+ markerWidth()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case MarkerHeight:
+ markerHeight()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case MarkerUnits:
+ if(value.toString(exec).qstring() == "userSpaceOnUse")
+ markerUnits()->setBaseVal(SVG_MARKERUNITS_USERSPACEONUSE);
+ else
+ markerUnits()->setBaseVal(SVG_MARKERUNITS_STROKEWIDTH);
+ break;
+ case Orient:
+ {
+ QString param = value.toString(exec).qstring();
+
+ if(param == "auto")
+ orientType()->setBaseVal(SVG_MARKER_ORIENT_AUTO);
+ else
+ {
+ orientType()->setBaseVal(SVG_MARKER_ORIENT_ANGLE);
+ m_orientAngle->baseVal()->setValueAsString(param);
+ }
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGMarkerElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGMarkerElementImpl)
+
+ switch(id)
+ {
+ case SVGMarkerElementImpl::SetOrientToAuto:
+ obj->setOrientToAuto();
+ return Undefined();
+#ifdef __GNUC__
+#warning FIXME cache stuff
+#endif
+ case SVGMarkerElementImpl::SetOrientToAngle:
+ obj->setOrientToAngle(static_cast<KSVGBridge<SVGAngleImpl> *>(args[0].imp())->impl());
+ return Undefined();
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// CONSTANTS
+
+/*
+@namespace KSVG
+@begin SVGMarkerElementImplConstructor::s_hashTable 7
+ SVG_MARKERUNITS_UNKNOWN KSVG::SVG_MARKERUNITS_UNKNOWN DontDelete|ReadOnly
+ SVG_MARKERUNITS_USERSPACEONUSE KSVG::SVG_MARKERUNITS_USERSPACEONUSE DontDelete|ReadOnly
+ SVG_MARKERUNITS_STROKEWIDTH KSVG::SVG_MARKERUNITS_STROKEWIDTH DontDelete|ReadOnly
+ SVG_MARKER_ORIENT_UNKNOWN KSVG::SVG_MARKER_ORIENT_UNKNOWN DontDelete|ReadOnly
+ SVG_MARKER_ORIENT_AUTO KSVG::SVG_MARKER_ORIENT_AUTO DontDelete|ReadOnly
+ SVG_MARKER_ORIENT_ANGLE KSVG::SVG_MARKER_ORIENT_ANGLE DontDelete|ReadOnly
+@end
+*/
+
+using namespace KJS;
+
+Value SVGMarkerElementImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGMarkerElementImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGMarkerElementImplConstructor>(exec, "[[svgmarkerelement.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMarkerElementImpl.h b/ksvg/impl/SVGMarkerElementImpl.h
new file mode 100644
index 00000000..7e6539e3
--- /dev/null
+++ b/ksvg/impl/SVGMarkerElementImpl.h
@@ -0,0 +1,121 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMarkerElementImpl_H
+#define SVGMarkerElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "KSVGHelper.h"
+
+namespace KSVG
+{
+
+class SVGAngleImpl;
+class SVGAnimatedAngleImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGMarkerElementImpl : public SVGContainerImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGFitToViewBoxImpl
+{
+public:
+ SVGMarkerElementImpl(DOM::ElementImpl *);
+ virtual ~SVGMarkerElementImpl();
+
+ SVGAnimatedLengthImpl *refX() const;
+ SVGAnimatedLengthImpl *refY() const;
+ SVGAnimatedEnumerationImpl *markerUnits() const;
+ SVGAnimatedLengthImpl *markerWidth() const;
+ SVGAnimatedLengthImpl *markerHeight() const;
+ SVGAnimatedEnumerationImpl *orientType() const;
+ SVGAnimatedAngleImpl *orientAngle() const;
+
+ void setOrientToAuto();
+ void setOrientToAngle(SVGAngleImpl *angle);
+
+ virtual void setAttributes();
+ virtual void createItem(KSVGCanvas *c = 0);
+
+ void draw(SVGShapeImpl *referencingElement, double x, double y, double lwidth, double angle);
+
+ KSVGPolygon clipShape() const { return m_clipShape; }
+
+ virtual bool directRender() { return false; }
+ virtual bool isContainer() const { return false; }
+
+private:
+ SVGAnimatedLengthImpl *m_refX;
+ SVGAnimatedLengthImpl *m_refY;
+ SVGAnimatedEnumerationImpl *m_markerUnits;
+ SVGAnimatedLengthImpl *m_markerWidth;
+ SVGAnimatedLengthImpl *m_markerHeight;
+ SVGAnimatedEnumerationImpl *m_orientType;
+ SVGAnimatedAngleImpl *m_orientAngle;
+
+ KSVGPolygon m_clipShape;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ RefX, RefY, MarkerUnits, MarkerWidth, MarkerHeight, OrientType, OrientAngle,
+ Orient, ViewBox, PreserveAspectRatio,
+ // Functions
+ SetOrientToAuto, SetOrientToAngle
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGMarkerElementImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGMarkerElementImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGMarkerElementImplConstructor(KJS::ExecState *exec);
+
+KSVG_REGISTER_ELEMENT(SVGMarkerElementImpl, "marker")
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGMarkerElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGMarkerElementImplProtoFunc, SVGMarkerElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMaskElementImpl.cc b/ksvg/impl/SVGMaskElementImpl.cc
new file mode 100644
index 00000000..5cd2151e
--- /dev/null
+++ b/ksvg/impl/SVGMaskElementImpl.cc
@@ -0,0 +1,542 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <cfloat>
+
+#include <kdebug.h>
+#include <qimage.h>
+
+#include "SVGMaskElement.h"
+
+#include "SVGRectImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGMaskElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGUnitConverter.h"
+#include "SVGShapeImpl.h"
+#include "SVGMatrixImpl.h"
+#include "KSVGCanvas.h"
+#include "CanvasItems.h"
+#include "CanvasFactory.h"
+#include "KSVGHelper.h"
+
+#include <X11/Xos.h>
+
+using namespace KSVG;
+
+#include "SVGMaskElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecma.h"
+
+SVGMaskElementImpl::SVGMaskElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGBBoxTarget()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+
+ m_maskUnits = new SVGAnimatedEnumerationImpl();
+ m_maskUnits->ref();
+
+ m_maskContentUnits = new SVGAnimatedEnumerationImpl();
+ m_maskContentUnits->ref();
+
+ m_converter = new SVGUnitConverter();
+ m_converter->add(m_x);
+ m_converter->add(m_y);
+ m_converter->add(m_width);
+ m_converter->add(m_height);
+
+ m_canvas = 0;
+
+ m_maskCache.setMaxTotalCost(1024 * 1024);
+}
+
+SVGMaskElementImpl::~SVGMaskElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_maskUnits)
+ m_maskContentUnits->deref();
+ if(m_maskUnits)
+ m_maskContentUnits->deref();
+ delete m_converter;
+ if(m_canvas)
+ delete m_canvas;
+}
+
+SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskUnits() const
+{
+ return m_maskUnits;
+}
+
+SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskContentUnits() const
+{
+ return m_maskContentUnits;
+}
+
+SVGAnimatedLengthImpl *SVGMaskElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGMaskElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGMaskElementImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGMaskElementImpl::height() const
+{
+ return m_height;
+}
+
+/*
+@namespace KSVG
+@begin SVGMaskElementImpl::s_hashTable 7
+ maskUnits SVGMaskElementImpl::MaskUnits DontDelete|ReadOnly
+ maskContentUnits SVGMaskElementImpl::MaskContentUnits DontDelete|ReadOnly
+ x SVGMaskElementImpl::X DontDelete|ReadOnly
+ y SVGMaskElementImpl::Y DontDelete|ReadOnly
+ width SVGMaskElementImpl::Width DontDelete|ReadOnly
+ height SVGMaskElementImpl::Height DontDelete|ReadOnly
+@end
+*/
+Value SVGMaskElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case MaskUnits:
+ if(!attributeMode)
+ return m_maskUnits->cache(exec);
+ else
+ return Number(m_maskUnits->baseVal());
+ case MaskContentUnits:
+ if(!attributeMode)
+ return m_maskContentUnits->cache(exec);
+ else
+ return Number(m_maskContentUnits->baseVal());
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGMaskElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case MaskUnits:
+ if(value.toString(exec).qstring() == "objectBoundingBox")
+ m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ else
+ m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE);
+ break;
+ case MaskContentUnits:
+ if(value.toString(exec).qstring() == "objectBoundingBox")
+ m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ else
+ m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE);
+ break;
+ case X:
+ converter()->modify(x(), value.toString(exec).qstring());
+ break;
+ case Y:
+ converter()->modify(y(), value.toString(exec).qstring());
+ break;
+ case Width:
+ converter()->modify(width(), value.toString(exec).qstring());
+ break;
+ case Height:
+ converter()->modify(height(), value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGMaskElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_x->baseVal()->value());
+ ret->setY(m_y->baseVal()->value());
+ ret->setWidth(m_width->baseVal()->value());
+ ret->setHeight(m_height->baseVal()->value());
+ return ret;
+}
+
+void SVGMaskElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if attribute not specified, use objectBoundingBox
+ if(KSVG_TOKEN_NOT_PARSED(MaskUnits))
+ KSVG_SET_ALT_ATTRIBUTE(MaskUnits, "objectBoundingBox")
+
+ // Spec: if attribute not specified, use userSpaceOnUse
+ if(KSVG_TOKEN_NOT_PARSED(MaskContentUnits))
+ KSVG_SET_ALT_ATTRIBUTE(MaskContentUnits, "userSpaceOnUse")
+
+ // Spec: if attribute not specified, use "-10%"
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "-10%");
+
+ // Spec: if attribute not specified, use "-10%"
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "-10%");
+
+ // Spec: if attribute not specified, use "120%"
+ if(KSVG_TOKEN_NOT_PARSED(Width))
+ KSVG_SET_ALT_ATTRIBUTE(Width, "120%");
+
+ // Spec: if attribute not specified, use "120%"
+ if(KSVG_TOKEN_NOT_PARSED(Height))
+ KSVG_SET_ALT_ATTRIBUTE(Height, "120%");
+}
+
+SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight)
+{
+ converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal());
+
+ Q_UINT32 *imageBits = new Q_UINT32[imageWidth * imageHeight];
+
+ if(m_canvas == 0)
+ m_canvas = CanvasFactory::self()->loadCanvas(imageWidth, imageHeight);
+
+ m_canvas->setup(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight);
+ m_canvas->setBackgroundColor(qRgba(0, 0, 0, 0));
+
+ SVGMatrixImpl *baseMatrix = SVGSVGElementImpl::createSVGMatrix();
+
+ // Set the scale to map the mask onto the image
+ double xScale = static_cast<double>(imageWidth) / width()->baseVal()->value();
+ double yScale = static_cast<double>(imageHeight) / height()->baseVal()->value();
+
+ baseMatrix->scaleNonUniform(xScale, yScale);
+
+ SVGRectImpl *bbox = referencingElement->getBBox();
+
+ if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ baseMatrix->translate(-(bbox->x() + x()->baseVal()->value()), -(bbox->y() + y()->baseVal()->value()));
+ else
+ baseMatrix->translate(-x()->baseVal()->value(), -y()->baseVal()->value());
+
+ if(maskContentUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ {
+ baseMatrix->translate(bbox->x(), bbox->y());
+ baseMatrix->scaleNonUniform(bbox->width(), bbox->height());
+ }
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+ if(element && shape && style && ok && style->getVisible() && style->getDisplay())
+ {
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
+ if(locatable)
+ locatable->updateCachedScreenCTM(baseMatrix);
+
+ element->createItem(m_canvas);
+ if(shape->item())
+ {
+ shape->item()->setReferenced(true);
+ m_canvas->invalidate(shape->item(), true);
+ }
+ }
+ }
+
+ m_canvas->update(float(1));
+
+ for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+ if(element && shape && style && ok && style->getVisible() && style->getDisplay())
+ {
+ if(shape)
+ shape->removeItem(m_canvas);
+ }
+ }
+
+
+ {
+ // Note: r and b reversed
+ //QImage maskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, QImage::IgnoreEndian);
+ //maskImage.setAlphaBuffer(true);
+ //maskImage.save("mask.png", "PNG");
+ }
+
+ QByteArray maskData(imageWidth * imageHeight);
+ const double epsilon = DBL_EPSILON;
+
+ // Convert the rgba image into an 8-bit mask, according to the specs.
+ for(int i = 0; i < imageWidth * imageHeight; i++)
+ {
+ Q_UINT32 rgba = imageBits[i];
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+ double r = (rgba & 0xff) / 255.0;
+ double g = ((rgba >> 8) & 0xff) / 255.0;
+ double b = ((rgba >> 16) & 0xff) / 255.0;
+ double a = ((rgba >> 24) & 0xff) / 255.0;
+#else
+ double a = (rgba & 0xff) / 255.0;
+ double b = ((rgba >> 8) & 0xff) / 255.0;
+ double g = ((rgba >> 16) & 0xff) / 255.0;
+ double r = ((rgba >> 24) & 0xff) / 255.0;
+#endif
+
+ // Remove pre-multiplication by alpha.
+ if(a > epsilon)
+ {
+ r /= a;
+ g /= a;
+ b /= a;
+ }
+
+ // Convert to linear RGB
+ r = KSVGHelper::linearRGBFromsRGB(int(r * 255 + 0.5)) / 255.0;
+ g = KSVGHelper::linearRGBFromsRGB(int(g * 255 + 0.5)) / 255.0;
+ b = KSVGHelper::linearRGBFromsRGB(int(b * 255 + 0.5)) / 255.0;
+
+ // Convert 'luminance to alpha'
+ double luminanceAlpha = 0.2125 * r + 0.7154 * g + 0.0721 * b;
+
+ // Multiply by alpha.
+ double maskValue = luminanceAlpha * a;
+
+ maskData[i] = static_cast<unsigned char>(maskValue * 255 + 0.5);
+ }
+
+ delete [] imageBits;
+
+ baseMatrix->deref();
+ bbox->deref();
+
+ // The screenToMask matrix is calculated each time the mask is used so we don't
+ // need to set it here.
+ QWMatrix tempMatrix;
+
+ return Mask(maskData, tempMatrix, imageWidth, imageHeight);
+}
+
+SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement)
+{
+ converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal());
+
+ SVGMatrixImpl *refCTM = 0;
+ SVGLocatableImpl *locatableRef = dynamic_cast<SVGLocatableImpl *>(referencingElement);
+ if(locatableRef)
+ refCTM = locatableRef->getScreenCTM();
+ else
+ refCTM = SVGSVGElementImpl::createSVGMatrix();
+
+ double xScale, yScale;
+
+ refCTM->removeScale(&xScale, &yScale);
+ refCTM->deref();
+
+ int imageWidth = static_cast<int>(width()->baseVal()->value() * xScale + 0.5);
+ int imageHeight = static_cast<int>(height()->baseVal()->value() * yScale + 0.5);
+
+ Mask mask;
+
+ if(imageWidth > 0 && imageHeight > 0)
+ {
+ CacheKey key(referencingElement, imageWidth, imageHeight);
+
+ if(!m_maskCache.find(key, mask))
+ {
+ mask = createMask(referencingElement, imageWidth, imageHeight);
+ m_maskCache.insert(key, mask, imageWidth * imageHeight);
+ }
+
+ // Generate a mask-coordinates to screen-coordinates matrix
+ SVGMatrixImpl *matrix = 0;
+ if(locatableRef)
+ matrix = locatableRef->getScreenCTM();
+ else
+ matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ {
+ SVGRectImpl *bbox = referencingElement->getBBox();
+ matrix->translate(bbox->x() + x()->baseVal()->value(), bbox->y() + y()->baseVal()->value());
+ bbox->deref();
+ }
+ else
+ matrix->translate(x()->baseVal()->value(), y()->baseVal()->value());
+
+ matrix->scaleNonUniform(1 / xScale, 1 / yScale);
+
+ QWMatrix screenToMask = matrix->qmatrix().invert();
+ matrix->deref();
+
+ mask.setScreenToMask(screenToMask);
+ }
+
+ return mask;
+}
+
+QByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const QRect& screenRectangle)
+{
+ QByteArray cumulativeMask;
+
+ do
+ {
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape);
+
+ if(style && style->hasMask())
+ {
+ SVGElementImpl *element = shape->ownerDoc()->rootElement()->getElementById(style->getMask());
+
+ if(element)
+ {
+ SVGMaskElementImpl *maskElement = dynamic_cast<SVGMaskElementImpl *>(element);
+
+ if(maskElement)
+ {
+ SVGMaskElementImpl::Mask mask = maskElement->createMask(shape);
+
+ if(!mask.isEmpty())
+ {
+ QByteArray maskData = mask.rectangle(screenRectangle);
+
+ if(cumulativeMask.size() == 0)
+ cumulativeMask = maskData;
+ else
+ {
+ int size = cumulativeMask.size();
+
+ // Multiply into the cumulative mask (using fast divide by 255)
+ for(int i = 0; i < size; i++)
+ {
+ int tmp = maskData[i] * cumulativeMask[i] + 0x80;
+ cumulativeMask[i] = (tmp + (tmp >> 8)) >> 8;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ DOM::Node parentNode = shape->parentNode();
+
+ if(!parentNode.isNull())
+ {
+ SVGElementImpl *parent = shape->ownerDoc()->getElementFromHandle(parentNode.handle());
+
+ if(parent)
+ shape = dynamic_cast<SVGShapeImpl *>(parent);
+ else
+ shape = 0;
+ }
+ else
+ shape = 0;
+
+ } while(shape);
+
+ return cumulativeMask;
+}
+
+SVGMaskElementImpl::Mask::Mask(const QByteArray& mask, const QWMatrix& screenToMask, int width, int height)
+ : m_width(width), m_height(height), m_mask(mask), m_screenToMask(screenToMask)
+{
+}
+
+QByteArray SVGMaskElementImpl::Mask::rectangle(int screenX, int screenY, int width, int height)
+{
+ QByteArray rect(width * height);
+
+ for(int x = 0; x < width; x++)
+ {
+ for(int y = 0; y < height; y++)
+ {
+ rect[x + y * width] = value(screenX + x, screenY + y);
+ }
+ }
+
+ return rect;
+}
+
+QByteArray SVGMaskElementImpl::Mask::rectangle(const QRect& rect)
+{
+ return rectangle(rect.x(), rect.y(), rect.width(), rect.height());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMaskElementImpl.h b/ksvg/impl/SVGMaskElementImpl.h
new file mode 100644
index 00000000..cdd1c125
--- /dev/null
+++ b/ksvg/impl/SVGMaskElementImpl.h
@@ -0,0 +1,158 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMaskElementImpl_H
+#define SVGMaskElementImpl_H
+
+#include <qwmatrix.h>
+
+#include "SVGTestsImpl.h"
+#include "SVGBBoxTarget.h"
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "LRUCache.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+
+class SVGUnitConverter;
+class KSVGCanvas;
+class SVGShapeImpl;
+class SVGRectImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGMaskElementImpl : public SVGElementImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGBBoxTarget
+{
+public:
+
+ class Mask
+ {
+ public:
+ Mask() : m_width(0), m_height(0) {}
+ Mask(const QByteArray& mask, const QWMatrix& screenToMask, int width, int height);
+ ~Mask() {}
+
+ bool isEmpty() const { return m_width == 0; }
+ unsigned char value(int screenX, int screenY) const;
+ QByteArray rectangle(int screenX, int screenY, int width, int height);
+ QByteArray rectangle(const QRect& rect);
+ void setScreenToMask(const QWMatrix& matrix) { m_screenToMask = matrix; }
+
+ private:
+ int m_width;
+ int m_height;
+ QByteArray m_mask;
+ QWMatrix m_screenToMask;
+ };
+
+ SVGMaskElementImpl(DOM::ElementImpl *);
+ virtual ~SVGMaskElementImpl();
+
+ SVGAnimatedEnumerationImpl *maskUnits() const;
+ SVGAnimatedEnumerationImpl *maskContentUnits() const;
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+
+ virtual SVGRectImpl *getBBox();
+ virtual void setAttributes();
+
+ SVGUnitConverter *converter() const { return m_converter; }
+
+ Mask createMask(SVGShapeImpl *referencingElement);
+
+ // Compute the mask on a given shape, taking into account all masks defined
+ // on the shape's ancestors. This is a workaround for us not having a buffer
+ // for container elements, so we can't mask containers directly.
+ static QByteArray maskRectangle(SVGShapeImpl *shape, const QRect& screenRectangle);
+
+private:
+ class CacheKey
+ {
+ public:
+ CacheKey() : m_element(0), m_width(0), m_height(0) {}
+ CacheKey(SVGElementImpl *element, int width, int height) : m_element(element), m_width(width), m_height(height) {}
+ bool operator==(const CacheKey& other) const { return m_element == other.m_element && m_width == other.m_width && m_height == other.m_height; }
+
+ private:
+ SVGElementImpl *m_element;
+ int m_width;
+ int m_height;
+ };
+
+ Mask createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight);
+
+ SVGAnimatedEnumerationImpl *m_maskUnits;
+ SVGAnimatedEnumerationImpl *m_maskContentUnits;
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+ SVGUnitConverter *m_converter;
+ KSVGCanvas *m_canvas;
+
+ MinOneLRUCache<CacheKey, Mask> m_maskCache;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ MaskUnits, MaskContentUnits, X, Y, Width, Height
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGMaskElementImpl, "mask")
+
+inline unsigned char SVGMaskElementImpl::Mask::value(int screenX, int screenY) const
+{
+ int x, y;
+
+ m_screenToMask.map(screenX, screenY, &x, &y);
+
+ if(x >= 0 && x < m_width && y >= 0 && y < m_height)
+ return m_mask[x + y * m_width];
+ else
+ return 0;
+}
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMatrixImpl.cc b/ksvg/impl/SVGMatrixImpl.cc
new file mode 100644
index 00000000..81f14f66
--- /dev/null
+++ b/ksvg/impl/SVGMatrixImpl.cc
@@ -0,0 +1,460 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include <kdebug.h>
+
+#include "SVGAngleImpl.h"
+#include "SVGMatrixImpl.h"
+#include "KSVGHelper.h"
+
+using namespace KSVG;
+
+#include "SVGMatrixImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGMatrixImpl::SVGMatrixImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGMatrixImpl::SVGMatrixImpl(QWMatrix mat)
+{
+ m_mat = mat;
+}
+
+SVGMatrixImpl::SVGMatrixImpl(double a, double b, double c, double d, double e, double f)
+{
+ m_mat.setMatrix(a, b, c, d, e, f);
+}
+
+SVGMatrixImpl::~SVGMatrixImpl()
+{
+}
+
+void SVGMatrixImpl::setA(const double &a)
+{
+ m_mat.setMatrix(a, m_mat.m12(), m_mat.m21(), m_mat.m22(), m_mat.dx(), m_mat.dy());
+}
+
+double SVGMatrixImpl::a() const
+{
+ return m_mat.m11();
+}
+
+void SVGMatrixImpl::setB(const double &b)
+{
+ m_mat.setMatrix(m_mat.m11(), b, m_mat.m21(), m_mat.m22(), m_mat.dx(), m_mat.dy());
+}
+
+double SVGMatrixImpl::b() const
+{
+ return m_mat.m12();
+}
+
+void SVGMatrixImpl::setC(const double &c)
+{
+ m_mat.setMatrix(m_mat.m11(), m_mat.m12(), c, m_mat.m22(), m_mat.dx(), m_mat.dy());
+}
+
+double SVGMatrixImpl::c() const
+{
+ return m_mat.m21();
+}
+
+void SVGMatrixImpl::setD(const double &d)
+{
+ m_mat.setMatrix(m_mat.m11(), m_mat.m12(), m_mat.m21(), d, m_mat.dx(), m_mat.dy());
+}
+
+double SVGMatrixImpl::d() const
+{
+ return m_mat.m22();
+}
+
+void SVGMatrixImpl::setE(const double &e)
+{
+ m_mat.setMatrix(m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), e, m_mat.dy());
+}
+
+double SVGMatrixImpl::e() const
+{
+ return m_mat.dx();
+}
+
+void SVGMatrixImpl::setF(const double &f)
+{
+ m_mat.setMatrix(m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), m_mat.dx(), f);
+}
+
+double SVGMatrixImpl::f() const
+{
+ return m_mat.dy();
+}
+
+void SVGMatrixImpl::copy(const SVGMatrixImpl *other)
+{
+ m_mat.setMatrix(other->m_mat.m11(), other->m_mat.m12(), other->m_mat.m21(), other->m_mat.m22(), other->m_mat.dx(), other->m_mat.dy());
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postMultiply(const SVGMatrixImpl *secondMatrix)
+{
+ QWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::inverse()
+{
+ m_mat = m_mat.invert();
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postTranslate(const double &x, const double &y)
+{
+ // Could optimise these.
+ QWMatrix temp;
+ temp.translate(x, y);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postScale(const double &scaleFactor)
+{
+ QWMatrix temp;
+ temp.scale(scaleFactor, scaleFactor);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postScaleNonUniform(const double &scaleFactorX, const double &scaleFactorY)
+{
+ QWMatrix temp;
+ temp.scale(scaleFactorX, scaleFactorY);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postRotate(const double &angle)
+{
+ QWMatrix temp;
+ temp.rotate(angle);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postRotateFromVector(const double &x, const double &y)
+{
+ QWMatrix temp;
+ temp.rotate(SVGAngleImpl::todeg(atan2(y, x)));
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postFlipX()
+{
+ QWMatrix temp(-1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postFlipY()
+{
+ QWMatrix temp(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postSkewX(const double &angle)
+{
+ QWMatrix temp;
+ temp.shear(tan(SVGAngleImpl::torad(angle)), 0.0F);
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::postSkewY(const double &angle)
+{
+ QWMatrix temp;
+ temp.shear(0.0F, tan(SVGAngleImpl::torad(angle)));
+ m_mat *= temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::multiply(const SVGMatrixImpl *secondMatrix)
+{
+ QWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
+ temp *= m_mat;
+ m_mat = temp;
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::translate(const double &x, const double &y)
+{
+ m_mat.translate(x, y);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::scale(const double &scaleFactor)
+{
+ m_mat.scale(scaleFactor, scaleFactor);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::scaleNonUniform(const double &scaleFactorX, const double &scaleFactorY)
+{
+ m_mat.scale(scaleFactorX, scaleFactorY);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::rotate(const double &angle)
+{
+ m_mat.rotate(angle);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::rotateFromVector(const double &x, const double &y)
+{
+ m_mat.rotate(SVGAngleImpl::todeg(atan2(y, x)));
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::flipX()
+{
+ m_mat.scale(-1.0f, 1.0f);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::flipY()
+{
+ m_mat.scale(1.0f, -1.0f);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::skewX(const double &angle)
+{
+ m_mat.shear(tan(SVGAngleImpl::torad(angle)), 0.0F);
+ return this;
+}
+
+SVGMatrixImpl *SVGMatrixImpl::skewY(const double &angle)
+{
+ m_mat.shear(0.0F, tan(SVGAngleImpl::torad(angle)));
+ return this;
+}
+
+void SVGMatrixImpl::setMatrix(QWMatrix mat)
+{
+ m_mat = mat;
+}
+
+QWMatrix &SVGMatrixImpl::qmatrix()
+{
+ return m_mat;
+}
+
+const QWMatrix &SVGMatrixImpl::qmatrix() const
+{
+ return m_mat;
+}
+
+void SVGMatrixImpl::reset()
+{
+ m_mat.reset();
+}
+
+void SVGMatrixImpl::removeScale(double *xScale, double *yScale)
+{
+ double sx = sqrt(a()*a() + b()*b());
+ double sy = sqrt(c()*c() + d()*d());
+
+ // Remove the scaling from the matrix.
+
+ setA(a()/sx);
+ setB(b()/sx);
+ setC(c()/sy);
+ setD(d()/sy);
+
+ *xScale = sx;
+ *yScale = sy;
+}
+
+KSVGPolygon SVGMatrixImpl::map(const KSVGPolygon& polygon) const
+{
+ KSVGPolygon mapped;
+
+ for(unsigned int i = 0; i < polygon.numPoints(); i++)
+ {
+ double x, y;
+
+ m_mat.map(polygon.point(i).x(), polygon.point(i).y(), &x, &y);
+ mapped.addPoint(x, y);
+ }
+
+ return mapped;
+}
+
+KSVGPolygon SVGMatrixImpl::inverseMap(const KSVGPolygon& polygon) const
+{
+ QWMatrix inverse = m_mat.invert();
+ KSVGPolygon mapped;
+
+ for(unsigned int i = 0; i < polygon.numPoints(); i++)
+ {
+ double x, y;
+
+ inverse.map(polygon.point(i).x(), polygon.point(i).y(), &x, &y);
+ mapped.addPoint(x, y);
+ }
+
+ return mapped;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGMatrixImpl::s_hashTable 7
+ a SVGMatrixImpl::A DontDelete
+ b SVGMatrixImpl::B DontDelete
+ c SVGMatrixImpl::C DontDelete
+ d SVGMatrixImpl::D DontDelete
+ e SVGMatrixImpl::E DontDelete
+ f SVGMatrixImpl::F DontDelete
+@end
+@namespace KSVG
+@begin SVGMatrixImplProto::s_hashTable 13
+ inverse SVGMatrixImpl::Inverse DontDelete|Function 0
+ multiply SVGMatrixImpl::Multiply DontDelete|Function 1
+ translate SVGMatrixImpl::Translate DontDelete|Function 2
+ scale SVGMatrixImpl::Scale DontDelete|Function 1
+ rotate SVGMatrixImpl::Rotate DontDelete|Function 1
+ rotateFromVector SVGMatrixImpl::RotateFromVector DontDelete|Function 2
+ scaleNonUniform SVGMatrixImpl::ScaleNonUniform DontDelete|Function 2
+ flipX SVGMatrixImpl::FlipX DontDelete|Function 0
+ flipY SVGMatrixImpl::FlipY DontDelete|Function 0
+ skewX SVGMatrixImpl::SkewX DontDelete|Function 1
+ skewY SVGMatrixImpl::SkewY DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGMatrix", SVGMatrixImplProto, SVGMatrixImplProtoFunc)
+
+Value SVGMatrixImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case A:
+ return Number(a());
+ case B:
+ return Number(b());
+ case C:
+ return Number(c());
+ case D:
+ return Number(d());
+ case E:
+ return Number(e());
+ case F:
+ return Number(f());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+
+void SVGMatrixImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case A:
+ setA(value.toNumber(exec));
+ break;
+ case B:
+ setB(value.toNumber(exec));
+ break;
+ case C:
+ setC(value.toNumber(exec));
+ break;
+ case D:
+ setD(value.toNumber(exec));
+ break;
+ case E:
+ setE(value.toNumber(exec));
+ break;
+ case F:
+ setF(value.toNumber(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ break;
+ }
+}
+
+Value SVGMatrixImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGMatrixImpl)
+
+ switch(id)
+ {
+ case SVGMatrixImpl::Inverse:
+ return obj->inverse()->cache(exec);
+ break;
+ case SVGMatrixImpl::Multiply:
+ return obj->multiply(static_cast<KSVGBridge<SVGMatrixImpl> *>(args[0].imp())->impl())->cache(exec);
+ break;
+ case SVGMatrixImpl::Translate:
+ return obj->translate(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::Scale:
+ return obj->scale(args[0].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::Rotate:
+ return obj->rotate(args[0].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::RotateFromVector:
+ return obj->rotateFromVector(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::ScaleNonUniform:
+ return obj->scaleNonUniform(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::FlipX:
+ return obj->flipX()->cache(exec);
+ break;
+ case SVGMatrixImpl::FlipY:
+ return obj->flipY()->cache(exec);
+ break;
+ case SVGMatrixImpl::SkewX:
+ return obj->skewX(args[0].toNumber(exec))->cache(exec);
+ break;
+ case SVGMatrixImpl::SkewY:
+ return obj->skewY(args[0].toNumber(exec))->cache(exec);;
+ break;
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMatrixImpl.h b/ksvg/impl/SVGMatrixImpl.h
new file mode 100644
index 00000000..a5d8edf3
--- /dev/null
+++ b/ksvg/impl/SVGMatrixImpl.h
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMatrixImpl_H
+#define SVGMatrixImpl_H
+
+#include <qwmatrix.h>
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+class KSVGPolygon;
+
+class SVGMatrixImpl : public DOM::DomShared
+{
+public:
+ SVGMatrixImpl();
+ SVGMatrixImpl(QWMatrix mat);
+ SVGMatrixImpl(double, double, double, double, double, double);
+ ~SVGMatrixImpl();
+
+ void setA(const double &);
+ double a() const;
+
+ void setB(const double &);
+ double b() const;
+
+ void setC(const double &);
+ double c() const;
+
+ void setD(const double &);
+ double d() const;
+
+ void setE(const double &);
+ double e() const;
+
+ void setF(const double &);
+ double f() const;
+
+ void copy(const SVGMatrixImpl *other);
+
+ SVGMatrixImpl *inverse();
+
+ // Pre-multiplied operations, as per the specs.
+ SVGMatrixImpl *multiply(const SVGMatrixImpl *secondMatrix);
+ SVGMatrixImpl *translate(const double &x, const double &y);
+ SVGMatrixImpl *scale(const double &scaleFactor);
+ SVGMatrixImpl *scaleNonUniform(const double &scaleFactorX, const double &scaleFactorY);
+ SVGMatrixImpl *rotate(const double &angle);
+ SVGMatrixImpl *rotateFromVector(const double &x, const double &y);
+ SVGMatrixImpl *flipX();
+ SVGMatrixImpl *flipY();
+ SVGMatrixImpl *skewX(const double &angle);
+ SVGMatrixImpl *skewY(const double &angle);
+
+ // Post-multiplied operations
+ SVGMatrixImpl *postMultiply(const SVGMatrixImpl *secondMatrix);
+ SVGMatrixImpl *postTranslate(const double &x, const double &y);
+ SVGMatrixImpl *postScale(const double &scaleFactor);
+ SVGMatrixImpl *postScaleNonUniform(const double &scaleFactorX, const double &scaleFactorY);
+ SVGMatrixImpl *postRotate(const double &angle);
+ SVGMatrixImpl *postRotateFromVector(const double &x, const double &y);
+ SVGMatrixImpl *postFlipX();
+ SVGMatrixImpl *postFlipY();
+ SVGMatrixImpl *postSkewX(const double &angle);
+ SVGMatrixImpl *postSkewY(const double &angle);
+
+ void reset();
+
+ // KSVG helper method
+ QWMatrix &qmatrix();
+ const QWMatrix &qmatrix() const;
+
+ // Determine the scaling component of the matrix and factor it out. After
+ // this operation, the matrix has x and y scale of one.
+ void removeScale(double *xScale, double *yScale);
+
+ KSVGPolygon map(const KSVGPolygon& polygon) const;
+ KSVGPolygon inverseMap(const KSVGPolygon& polygon) const;
+
+private:
+ void setMatrix(QWMatrix mat);
+ QWMatrix m_mat;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ A, B, C, D, E, F,
+ // Functions
+ Inverse, Multiply, Translate, Scale, Rotate,
+ RotateFromVector, ScaleNonUniform,
+ FlipX, FlipY, SkewX, SkewY
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGMatrixImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGMatrixImplProtoFunc, SVGMatrixImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMetadataElementImpl.cc b/ksvg/impl/SVGMetadataElementImpl.cc
new file mode 100644
index 00000000..d55d4302
--- /dev/null
+++ b/ksvg/impl/SVGMetadataElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMetadataElementImpl.h"
+
+using namespace KSVG;
+
+SVGMetadataElementImpl::SVGMetadataElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGMetadataElementImpl::~SVGMetadataElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMetadataElementImpl.h b/ksvg/impl/SVGMetadataElementImpl.h
new file mode 100644
index 00000000..363a9c11
--- /dev/null
+++ b/ksvg/impl/SVGMetadataElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMetadataElementImpl_H
+#define SVGMetadataElementImpl_H
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGMetadataElementImpl : public SVGElementImpl
+{
+public:
+ SVGMetadataElementImpl(DOM::ElementImpl *);
+ virtual ~SVGMetadataElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMissingGlyphElementImpl.cc b/ksvg/impl/SVGMissingGlyphElementImpl.cc
new file mode 100644
index 00000000..986750c3
--- /dev/null
+++ b/ksvg/impl/SVGMissingGlyphElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGMissingGlyphElementImpl.h"
+
+using namespace KSVG;
+
+SVGMissingGlyphElementImpl::SVGMissingGlyphElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGStylableImpl(this)
+{
+}
+
+SVGMissingGlyphElementImpl::~SVGMissingGlyphElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGMissingGlyphElementImpl.h b/ksvg/impl/SVGMissingGlyphElementImpl.h
new file mode 100644
index 00000000..275aba86
--- /dev/null
+++ b/ksvg/impl/SVGMissingGlyphElementImpl.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGMissingGlyphElementImpl_H
+#define SVGMissingGlyphElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+
+namespace KSVG
+{
+
+class SVGMissingGlyphElementImpl : public SVGElementImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGMissingGlyphElementImpl(DOM::ElementImpl *);
+ virtual ~SVGMissingGlyphElementImpl();
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGNumberImpl.cc b/ksvg/impl/SVGNumberImpl.cc
new file mode 100644
index 00000000..b926e9c2
--- /dev/null
+++ b/ksvg/impl/SVGNumberImpl.cc
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGNumberImpl.h"
+
+using namespace KSVG;
+
+#include "SVGNumberImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGNumberImpl::SVGNumberImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_value = 0;
+}
+
+SVGNumberImpl::~SVGNumberImpl()
+{
+}
+
+void SVGNumberImpl::setValue(float value)
+{
+ m_value = value;
+}
+
+float SVGNumberImpl::value()
+{
+ return m_value;
+}
+
+/*
+@namespace KSVG
+@begin SVGNumberImpl::s_hashTable 2
+ value SVGNumberImpl::Value DontDelete
+@end
+*/
+
+Value SVGNumberImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Value:
+ return Number(m_value);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+
+ return Undefined();
+}
+
+void SVGNumberImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Value:
+ m_value = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGNumberImpl.h b/ksvg/impl/SVGNumberImpl.h
new file mode 100644
index 00000000..d94b3d63
--- /dev/null
+++ b/ksvg/impl/SVGNumberImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGNumberImpl_H
+#define SVGNumberImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGNumberImpl : public DOM::DomShared
+{
+public:
+ SVGNumberImpl();
+ virtual ~SVGNumberImpl();
+
+ void setValue(float value);
+ float value();
+
+private:
+ float m_value;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Value
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGNumberListImpl.cc b/ksvg/impl/SVGNumberListImpl.cc
new file mode 100644
index 00000000..8048640c
--- /dev/null
+++ b/ksvg/impl/SVGNumberListImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGNumberListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGNumberListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGNumberListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGNumberListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGNumberList", SVGNumberListImplProto, SVGNumberListImplProtoFunc)
+
+Value SVGNumberListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SVGNumberImpl>::getValueProperty(exec, token);
+}
+
+Value SVGNumberListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGNumberListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SVGNumberImpl> *>(obj), args, id);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGNumberListImpl.h b/ksvg/impl/SVGNumberListImpl.h
new file mode 100644
index 00000000..87dadb6f
--- /dev/null
+++ b/ksvg/impl/SVGNumberListImpl.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGNumberListImpl_H
+#define SVGNumberListImpl_H
+
+#include "SVGList.h"
+
+#include "SVGNumberImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGNumberListImpl : public SVGList<SVGNumberImpl>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGNumberListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGNumberListImplProtoFunc, SVGNumberListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPaintImpl.cc b/ksvg/impl/SVGPaintImpl.cc
new file mode 100644
index 00000000..c1818892
--- /dev/null
+++ b/ksvg/impl/SVGPaintImpl.cc
@@ -0,0 +1,175 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPaint.h"
+#include "SVGColor.h"
+
+#include "SVGPaintImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPaintImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+SVGPaintImpl::SVGPaintImpl(SVGElementImpl *object) : SVGColorImpl(object)
+{
+ m_paintType = SVG_PAINTTYPE_UNKNOWN;
+}
+
+SVGPaintImpl::SVGPaintImpl(const SVGPaintImpl &other) : SVGColorImpl(other)
+{
+ (*this) = other;
+}
+
+SVGPaintImpl::~SVGPaintImpl()
+{
+}
+
+SVGPaintImpl &SVGPaintImpl::operator=(const SVGPaintImpl &other)
+{
+ m_uri = other.m_uri;
+ m_paintType = other.m_paintType;
+
+ *(static_cast<SVGColorImpl *>(this)) = other;
+
+ return *this;
+}
+
+unsigned short SVGPaintImpl::paintType() const
+{
+ return m_paintType;
+}
+
+DOM::DOMString SVGPaintImpl::uri() const
+{
+ return m_uri;
+}
+
+void SVGPaintImpl::setUri(const DOM::DOMString &uri)
+{
+ m_uri = uri;
+ m_paintType = SVG_PAINTTYPE_URI;
+}
+
+void SVGPaintImpl::setPaint(unsigned short paintType, const DOM::DOMString &/*uri*/, const DOM::DOMString &/*rgbColor*/, const DOM::DOMString &/*iccColor*/)
+{
+ m_paintType = paintType;
+}
+
+void SVGPaintImpl::setRGBColor(QColor color)
+{
+ m_paintType = SVG_PAINTTYPE_RGBCOLOR;
+ SVGColorImpl::setRGBColor(color);
+}
+
+void SVGPaintImpl::setRGBColor(int r, int g, int b)
+{
+ m_paintType = SVG_PAINTTYPE_RGBCOLOR;
+ SVGColorImpl::setRGBColor(r, g, b);
+}
+
+void SVGPaintImpl::setRGBColor(const DOM::DOMString &rgbColor)
+{
+ m_paintType = SVG_PAINTTYPE_RGBCOLOR;
+ SVGColorImpl::setRGBColor(rgbColor);
+}
+
+void SVGPaintImpl::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ m_paintType = SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR;
+ SVGColorImpl::setRGBColorICCColor(rgbColor, iccColor);
+}
+
+void SVGPaintImpl::setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
+{
+ SVGColorImpl::setColor(colorType, rgbColor, iccColor);
+
+ switch(colorType)
+ {
+ case SVG_COLORTYPE_CURRENTCOLOR:
+ m_paintType = SVG_PAINTTYPE_CURRENTCOLOR;
+ break;
+ case SVG_COLORTYPE_RGBCOLOR:
+ m_paintType = SVG_PAINTTYPE_CURRENTCOLOR;
+ break;
+ case SVG_COLORTYPE_RGBCOLOR_ICCCOLOR:
+ m_paintType = SVG_PAINTTYPE_CURRENTCOLOR;
+ break;
+ case SVG_COLORTYPE_UNKNOWN:
+ m_paintType = SVG_PAINTTYPE_UNKNOWN;
+ break;
+ }
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPaintImpl::s_hashTable 3
+ paintType SVGPaintImpl::PaintType DontDelete
+ uri SVGPaintImpl::URI DontDelete
+@end
+*/
+
+Value SVGPaintImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case PaintType:
+ return Number(paintType());
+ case URI:
+ return String(uri().string());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+/*
+@namespace KSVG
+@begin SVGPaintImplConstructor::s_hashTable 11
+SVG_PAINTTYPE_UNKNOWN KSVG::SVG_PAINTTYPE_UNKNOWN DontDelete|ReadOnly
+SVG_PAINTTYPE_CURRENTCOLOR KSVG::SVG_PAINTTYPE_CURRENTCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_RGBCOLOR KSVG::SVG_PAINTTYPE_RGBCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_RGBCOLOR KSVG::SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_NONE KSVG::SVG_PAINTTYPE_NONE DontDelete|ReadOnly
+SVG_PAINTTYPE_URI_NONE KSVG::SVG_PAINTTYPE_URI_NONE DontDelete|ReadOnly
+SVG_PAINTTYPE_URI_RGBCOLOR KSVG::SVG_PAINTTYPE_URI_RGBCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR KSVG::SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_URI_CURRENTCOLOR KSVG::SVG_PAINTTYPE_URI_CURRENTCOLOR DontDelete|ReadOnly
+SVG_PAINTTYPE_URI KSVG::SVG_PAINTTYPE_URI DontDelete|ReadOnly
+@end
+*/
+
+Value SVGPaintImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGPaintImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGPaintImplConstructor>(exec, "[[svgpaint.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPaintImpl.h b/ksvg/impl/SVGPaintImpl.h
new file mode 100644
index 00000000..f2aa0691
--- /dev/null
+++ b/ksvg/impl/SVGPaintImpl.h
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPaintImpl_H
+#define SVGPaintImpl_H
+
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+#include "SVGColorImpl.h"
+
+namespace KSVG
+{
+
+class SVGPaintImpl : public SVGColorImpl
+{
+public:
+ SVGPaintImpl(SVGElementImpl *object);
+ SVGPaintImpl(const SVGPaintImpl &);
+ virtual ~SVGPaintImpl();
+
+ SVGPaintImpl &operator=(const SVGPaintImpl &);
+
+ unsigned short paintType() const;
+ DOM::DOMString uri() const;
+ void setUri(const DOM::DOMString &uri);
+ void setPaint(unsigned short paintType, const DOM::DOMString &uri = "", const DOM::DOMString &rgbColor = "", const DOM::DOMString &iccColor = "");
+
+ virtual void setRGBColor(const DOM::DOMString &rgbColor);
+ virtual void setRGBColor(int r, int g, int b);
+ virtual void setRGBColor(QColor color);
+ virtual void setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+ virtual void setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
+
+private:
+ unsigned short m_paintType;
+ DOM::DOMString m_uri;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ PaintType, URI
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+class SVGPaintImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGPaintImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGPaintImplConstructor(KJS::ExecState *exec);
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPaintServerImpl.cc b/ksvg/impl/SVGPaintServerImpl.cc
new file mode 100644
index 00000000..b3275231
--- /dev/null
+++ b/ksvg/impl/SVGPaintServerImpl.cc
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPaintServerImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+SVGPaintServerImpl::SVGPaintServerImpl()
+{
+ m_paintServer = 0;
+}
+
+SVGPaintServerImpl::~SVGPaintServerImpl()
+{
+}
+
+CanvasPaintServer *SVGPaintServerImpl::paintServer(SVGDocumentImpl *doc, const QString& id)
+{
+ CanvasPaintServer *pserver = 0;
+ SVGElementImpl *element = doc->rootElement()->getElementById(id);
+
+ if(element)
+ {
+ SVGPaintServerImpl *paintServerElement = dynamic_cast<SVGPaintServerImpl *>(element);
+
+ if(paintServerElement)
+ pserver = paintServerElement->paintServer();
+ }
+
+ return pserver;
+}
+
+// vim:ts=4:noet
+
diff --git a/ksvg/impl/SVGPaintServerImpl.h b/ksvg/impl/SVGPaintServerImpl.h
new file mode 100644
index 00000000..df276758
--- /dev/null
+++ b/ksvg/impl/SVGPaintServerImpl.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPaintServerImpl_H
+#define SVGPaintServerImpl_H
+
+namespace KSVG
+{
+
+class SVGDocumentImpl;
+
+class CanvasPaintServer;
+
+class SVGPaintServerImpl
+{
+public:
+ SVGPaintServerImpl();
+ virtual ~SVGPaintServerImpl();
+
+ CanvasPaintServer *paintServer() { return m_paintServer; }
+
+ static CanvasPaintServer *paintServer(SVGDocumentImpl *doc, const QString& id);
+
+protected:
+ CanvasPaintServer *m_paintServer;
+
+private:
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
+
diff --git a/ksvg/impl/SVGPathElementImpl.cc b/ksvg/impl/SVGPathElementImpl.cc
new file mode 100644
index 00000000..f34600b8
--- /dev/null
+++ b/ksvg/impl/SVGPathElementImpl.cc
@@ -0,0 +1,868 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include <cfloat>
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "SVGRectImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGPointImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPathSegArcImpl.h"
+#include "SVGPathSegListImpl.h"
+#include "SVGPathElementImpl.h"
+#include "SVGPathSegLinetoImpl.h"
+#include "SVGPathSegMovetoImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGPathSegClosePathImpl.h"
+#include "SVGPathSegCurvetoCubicImpl.h"
+#include "SVGPathSegLinetoVerticalImpl.h"
+#include "SVGPathSegLinetoHorizontalImpl.h"
+#include "SVGPathSegCurvetoQuadraticImpl.h"
+#include "SVGPathSegCurvetoCubicSmoothImpl.h"
+#include "SVGPathSegCurvetoQuadraticSmoothImpl.h"
+
+#include "SVGPaint.h"
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+#include "BezierPath.h"
+#include "Point.h"
+
+using namespace KSVG;
+
+#include "SVGPathElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGPathElementImpl::SVGPathElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl(), SVGAnimatedPathDataImpl(), SVGPathParser()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_pathLength = new SVGAnimatedNumberImpl();
+ m_pathLength->ref();
+
+ m_pathLength->setBaseVal(0);
+}
+
+SVGPathElementImpl::~SVGPathElementImpl()
+{
+ pathSegList()->clear();
+
+ if(m_pathLength)
+ m_pathLength->deref();
+}
+
+SVGAnimatedNumberImpl *SVGPathElementImpl::pathLength() const
+{
+ return m_pathLength;
+}
+
+double SVGPathElementImpl::getTotalLength()
+{
+ T2P::BezierPath *path = ownerDoc()->canvas()->toBezierPath(m_item);
+ if(path)
+ return path->length();
+
+ return 0;
+}
+
+SVGPointImpl *SVGPathElementImpl::getPointAtLength(double distance)
+{
+ SVGPointImpl *ret = SVGSVGElementImpl::createSVGPoint();
+ double totalDistance = getTotalLength();
+ T2P::BezierPath *path = ownerDoc()->canvas()->toBezierPath(m_item);
+ if(path)
+ {
+ T2P::Point p;
+ path->pointTangentNormalAt(distance / totalDistance, &p);
+ ret->setX(p.x());
+ ret->setY(p.y());
+ }
+
+ return ret;
+}
+
+unsigned long SVGPathElementImpl::getPathSegAtLength(double)
+{
+ return 0;
+}
+
+SVGPathSegClosePathImpl *SVGPathElementImpl::createSVGPathSegClosePath()
+{
+ SVGPathSegClosePathImpl *temp = new SVGPathSegClosePathImpl();
+ temp->ref();
+
+ return temp;
+}
+
+SVGPathSegMovetoAbsImpl *SVGPathElementImpl::createSVGPathSegMovetoAbs(double x, double y)
+{
+ SVGPathSegMovetoAbsImpl *temp = new SVGPathSegMovetoAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegMovetoRelImpl *SVGPathElementImpl::createSVGPathSegMovetoRel(double x, double y)
+{
+ SVGPathSegMovetoRelImpl *temp = new SVGPathSegMovetoRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegLinetoAbsImpl *SVGPathElementImpl::createSVGPathSegLinetoAbs(double x, double y)
+{
+ SVGPathSegLinetoAbsImpl *temp = new SVGPathSegLinetoAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegLinetoRelImpl *SVGPathElementImpl::createSVGPathSegLinetoRel(double x, double y)
+{
+ SVGPathSegLinetoRelImpl *temp = new SVGPathSegLinetoRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegCurvetoCubicAbsImpl *SVGPathElementImpl::createSVGPathSegCurvetoCubicAbs(double x, double y, double x1, double y1, double x2, double y2)
+{
+ SVGPathSegCurvetoCubicAbsImpl *temp = new SVGPathSegCurvetoCubicAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX1(x1);
+ temp->setY1(y1);
+ temp->setX2(x2);
+ temp->setY2(y2);
+ return temp;
+}
+
+SVGPathSegCurvetoCubicRelImpl *SVGPathElementImpl::createSVGPathSegCurvetoCubicRel(double x, double y, double x1, double y1, double x2, double y2)
+{
+ SVGPathSegCurvetoCubicRelImpl *temp = new SVGPathSegCurvetoCubicRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX1(x1);
+ temp->setY1(y1);
+ temp->setX2(x2);
+ temp->setY2(y2);
+ return temp;
+}
+
+SVGPathSegCurvetoQuadraticAbsImpl *SVGPathElementImpl::createSVGPathSegCurvetoQuadraticAbs(double x, double y, double x1, double y1)
+{
+ SVGPathSegCurvetoQuadraticAbsImpl *temp = new SVGPathSegCurvetoQuadraticAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX1(x1);
+ temp->setY1(y1);
+ return temp;
+}
+
+SVGPathSegCurvetoQuadraticRelImpl *SVGPathElementImpl::createSVGPathSegCurvetoQuadraticRel(double x, double y, double x1, double y1)
+{
+ SVGPathSegCurvetoQuadraticRelImpl *temp = new SVGPathSegCurvetoQuadraticRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX1(x1);
+ temp->setY1(y1);
+ return temp;
+}
+
+SVGPathSegArcAbsImpl *SVGPathElementImpl::createSVGPathSegArcAbs(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag)
+{
+ SVGPathSegArcAbsImpl *temp = new SVGPathSegArcAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setR1(r1);
+ temp->setR2(r2);
+ temp->setAngle(angle);
+ temp->setLargeArcFlag(largeArcFlag);
+ temp->setSweepFlag(sweepFlag);
+ return temp;
+}
+
+SVGPathSegArcRelImpl *SVGPathElementImpl::createSVGPathSegArcRel(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag)
+{
+ SVGPathSegArcRelImpl *temp = new SVGPathSegArcRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setR1(r1);
+ temp->setR2(r2);
+ temp->setAngle(angle);
+ temp->setLargeArcFlag(largeArcFlag);
+ temp->setSweepFlag(sweepFlag);
+ return temp;
+}
+
+SVGPathSegLinetoHorizontalAbsImpl *SVGPathElementImpl::createSVGPathSegLinetoHorizontalAbs(double x)
+{
+ SVGPathSegLinetoHorizontalAbsImpl *temp = new SVGPathSegLinetoHorizontalAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ return temp;
+}
+
+SVGPathSegLinetoHorizontalRelImpl *SVGPathElementImpl::createSVGPathSegLinetoHorizontalRel(double x)
+{
+ SVGPathSegLinetoHorizontalRelImpl *temp = new SVGPathSegLinetoHorizontalRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ return temp;
+}
+
+SVGPathSegLinetoVerticalAbsImpl *SVGPathElementImpl::createSVGPathSegLinetoVerticalAbs(double y)
+{
+ SVGPathSegLinetoVerticalAbsImpl *temp = new SVGPathSegLinetoVerticalAbsImpl();
+ temp->ref();
+
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegLinetoVerticalRelImpl *SVGPathElementImpl::createSVGPathSegLinetoVerticalRel(double y)
+{
+ SVGPathSegLinetoVerticalRelImpl *temp = new SVGPathSegLinetoVerticalRelImpl();
+ temp->ref();
+
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegCurvetoCubicSmoothAbsImpl *SVGPathElementImpl::createSVGPathSegCurvetoCubicSmoothAbs(double x, double y, double x2, double y2)
+{
+ SVGPathSegCurvetoCubicSmoothAbsImpl *temp = new SVGPathSegCurvetoCubicSmoothAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX2(x2);
+ temp->setY2(y2);
+ return temp;
+}
+
+SVGPathSegCurvetoCubicSmoothRelImpl *SVGPathElementImpl::createSVGPathSegCurvetoCubicSmoothRel(double x, double y, double x2, double y2)
+{
+ SVGPathSegCurvetoCubicSmoothRelImpl *temp = new SVGPathSegCurvetoCubicSmoothRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ temp->setX2(x2);
+ temp->setY2(y2);
+ return temp;
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbsImpl *SVGPathElementImpl::createSVGPathSegCurvetoQuadraticSmoothAbs(double x, double y)
+{
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl *temp = new SVGPathSegCurvetoQuadraticSmoothAbsImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+SVGPathSegCurvetoQuadraticSmoothRelImpl *SVGPathElementImpl::createSVGPathSegCurvetoQuadraticSmoothRel(double x, double y)
+{
+ SVGPathSegCurvetoQuadraticSmoothRelImpl *temp = new SVGPathSegCurvetoQuadraticSmoothRelImpl();
+ temp->ref();
+
+ temp->setX(x);
+ temp->setY(y);
+ return temp;
+}
+
+void SVGPathElementImpl::svgMoveTo(double x1, double y1, bool, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegMovetoAbs(x1, y1));
+ else
+ pathSegList()->appendItem(createSVGPathSegMovetoRel(x1, y1));
+}
+
+void SVGPathElementImpl::svgLineTo(double x1, double y1, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegLinetoAbs(x1, y1));
+ else
+ pathSegList()->appendItem(createSVGPathSegLinetoRel(x1, y1));
+}
+
+void SVGPathElementImpl::svgLineToHorizontal(double x, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegLinetoHorizontalAbs(x));
+ else
+ pathSegList()->appendItem(createSVGPathSegLinetoHorizontalRel(x));
+}
+
+void SVGPathElementImpl::svgLineToVertical(double y, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegLinetoVerticalAbs(y));
+ else
+ pathSegList()->appendItem(createSVGPathSegLinetoVerticalRel(y));
+}
+
+void SVGPathElementImpl::svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2));
+ else
+ pathSegList()->appendItem(createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2));
+}
+
+void SVGPathElementImpl::svgCurveToCubicSmooth(double x, double y, double x2, double y2, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothAbs(x2, y2, x, y));
+ else
+ pathSegList()->appendItem(createSVGPathSegCurvetoCubicSmoothRel(x2, y2, x, y));
+}
+
+void SVGPathElementImpl::svgCurveToQuadratic(double x, double y, double x1, double y1, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticAbs(x1, y1, x, y));
+ else
+ pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticRel(x1, y1, x, y));
+}
+
+void SVGPathElementImpl::svgCurveToQuadraticSmooth(double x, double y, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothAbs(x, y));
+ else
+ pathSegList()->appendItem(createSVGPathSegCurvetoQuadraticSmoothRel(x, y));
+}
+
+void SVGPathElementImpl::svgArcTo(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs)
+{
+ if(abs)
+ pathSegList()->appendItem(createSVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
+ else
+ pathSegList()->appendItem(createSVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
+}
+
+void SVGPathElementImpl::svgClosePath()
+{
+ pathSegList()->appendItem(createSVGPathSegClosePath());
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathElementImpl::s_hashTable 3
+ d SVGPathElementImpl::D DontDelete|ReadOnly
+ pathLength SVGPathElementImpl::PathLength DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGPathElementImplProto::s_hashTable 23
+ getTotalLength SVGPathElementImpl::GetTotalLength DontDelete|Function 0
+ getPointAtLength SVGPathElementImpl::GetPointAtLength DontDelete|Function 1
+ getPathSegAtLength SVGPathElementImpl::GetPathSegAtLength DontDelete|Function 1
+ createSVGPathSegClosePath SVGPathElementImpl::CreateSVGPathSegClosePath DontDelete|Function 0
+ createSVGPathSegMovetoAbs SVGPathElementImpl::CreateSVGPathSegMovetoAbs DontDelete|Function 2
+ createSVGPathSegMovetoRel SVGPathElementImpl::CreateSVGPathSegMovetoRel DontDelete|Function 2
+ createSVGPathSegLinetoAbs SVGPathElementImpl::CreateSVGPathSegLinetoAbs DontDelete|Function 2
+ createSVGPathSegLinetoRel SVGPathElementImpl::CreateSVGPathSegLinetoRel DontDelete|Function 2
+ createSVGPathSegArcAbs SVGPathElementImpl::CreateSVGPathSegArcAbs DontDelete|Function 7
+ createSVGPathSegArcRel SVGPathElementImpl::CreateSVGPathSegArcRel DontDelete|Function 7
+ createSVGPathSegCurvetoCubicAbs SVGPathElementImpl::CreateSVGPathSegCurvetoCubicAbs DontDelete|Function 6
+ createSVGPathSegCurvetoCubicRel SVGPathElementImpl::CreateSVGPathSegCurvetoCubicRel DontDelete|Function 6
+ createSVGPathSegCurvetoQuadraticAbs SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticAbs DontDelete|Function 4
+ createSVGPathSegCurvetoQuadraticRel SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticRel DontDelete|Function 4
+ createSVGPathSegLinetoHorizontalAbs SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalAbs DontDelete|Function 1
+ createSVGPathSegLinetoHorizontalRel SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalRel DontDelete|Function 1
+ createSVGPathSegLinetoVerticalAbs SVGPathElementImpl::CreateSVGPathSegLinetoVerticalAbs DontDelete|Function 1
+ createSVGPathSegLinetoVerticalRel SVGPathElementImpl::CreateSVGPathSegLinetoVerticalRel DontDelete|Function 1
+ createSVGPathSegCurvetoCubicAbs SVGPathElementImpl::CreateSVGPathSegCurvetoCubicAbs DontDelete|Function 4
+ createSVGPathSegCurvetoCubicRel SVGPathElementImpl::CreateSVGPathSegCurvetoCubicRel DontDelete|Function 4
+ createSVGPathSegCurvetoQuadraticAbs SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticAbs DontDelete|Function 2
+ createSVGPathSegCurvetoQuadraticRel SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticRel DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGPathElementImpl", SVGPathElementImplProto, SVGPathElementImplProtoFunc)
+
+Value SVGPathElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case PathLength:
+ return m_pathLength->cache(exec);
+ case D:
+// if(!attributeMode)
+ {
+ QString d;
+ unsigned int nrSegs = pathSegList()->numberOfItems();
+ SVGPathSegImpl *curseg = 0;
+ for(unsigned int i = 0; i < nrSegs; i++)
+ {
+ curseg = pathSegList()->getItem(i);
+ if(curseg)
+ d += curseg->toString() + " ";
+ }
+ return String(d);
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case D:
+ {
+ pathSegList()->clear();
+ QString d = value.toString(exec).qstring();
+ parseSVG(d, false);
+ if(hasMarkers())
+ m_markerData = MarkerData(pathSegList());
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGPathElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGPathElementImpl)
+
+ switch(id)
+ {
+ case SVGPathElementImpl::GetTotalLength:
+ return Number(obj->getTotalLength());
+ case SVGPathElementImpl::GetPointAtLength:
+ return obj->getPointAtLength(args[0].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::GetPathSegAtLength:
+ return Number(obj->getPathSegAtLength(args[0].toNumber(exec)));
+ case SVGPathElementImpl::CreateSVGPathSegClosePath:
+ return obj->createSVGPathSegClosePath()->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegMovetoAbs:
+ return obj->createSVGPathSegMovetoAbs(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegMovetoRel:
+ return obj->createSVGPathSegMovetoRel(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoAbs:
+ return obj->createSVGPathSegLinetoAbs(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoRel:
+ return obj->createSVGPathSegLinetoRel(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoCubicAbs:
+ return obj->createSVGPathSegCurvetoCubicAbs(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec), args[4].toNumber(exec), args[5].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoCubicRel:
+ return obj->createSVGPathSegCurvetoCubicRel(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec), args[4].toNumber(exec), args[5].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticAbs:
+ return obj->createSVGPathSegCurvetoQuadraticAbs(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticRel:
+ return obj->createSVGPathSegCurvetoQuadraticRel(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegArcAbs:
+ return obj->createSVGPathSegArcAbs(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec), args[4].toNumber(exec), args[5].toBoolean(exec), args[6].toBoolean(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegArcRel:
+ return obj->createSVGPathSegArcRel(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec), args[4].toNumber(exec), args[5].toBoolean(exec), args[6].toBoolean(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalAbs:
+ return obj->createSVGPathSegLinetoHorizontalAbs(args[0].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoHorizontalRel:
+ return obj->createSVGPathSegLinetoHorizontalRel(args[0].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoVerticalAbs:
+ return obj->createSVGPathSegLinetoVerticalAbs(args[0].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegLinetoVerticalRel:
+ return obj->createSVGPathSegLinetoVerticalRel(args[0].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoCubicSmoothAbs:
+ return obj->createSVGPathSegCurvetoCubicSmoothAbs(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoCubicSmoothRel:
+ return obj->createSVGPathSegCurvetoCubicSmoothRel(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec), args[3].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticSmoothAbs:
+ return obj->createSVGPathSegCurvetoQuadraticSmoothAbs(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ case SVGPathElementImpl::CreateSVGPathSegCurvetoQuadraticSmoothRel:
+ return obj->createSVGPathSegCurvetoQuadraticSmoothRel(args[0].toNumber(exec), args[1].toNumber(exec))->cache(exec);
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+SVGRectImpl *SVGPathElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+
+ if(m_item)
+ {
+ T2P::BezierPath *path = ownerDoc()->canvas()->toBezierPath(m_item);
+ if(path)
+ {
+ T2P::Point topLeft;
+ T2P::Point bottomRight;
+
+ path->boundingBox(&topLeft, &bottomRight);
+
+ ret->setX(topLeft.x());
+ ret->setY(topLeft.y());
+ ret->setWidth(bottomRight.x() - topLeft.x());
+ ret->setHeight(bottomRight.y() - topLeft.y());
+ }
+ }
+ return ret;
+}
+
+void SVGPathElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ // TODO : this is a quick fix for this problem:
+ // d attribute encountered before marker attributes.
+ // Try to process the attributes in the right order, ie.
+ // d attr processing should be last.
+ if(hasMarkers() && m_markerData.numMarkers() == 0)
+ m_markerData = MarkerData(pathSegList());
+ m_item = c->createPath(this);
+ c->insert(m_item);
+ }
+}
+
+SVGPathElementImpl::MarkerData::MarkerData(SVGPathSegListImpl *path)
+{
+ unsigned int numSegments = path->numberOfItems();
+ double curx = 0;
+ double cury = 0;
+ int currentSubpathStartIndex = -1;
+ double previousQuadraticX1 = 0;
+ double previousQuadraticY1 = 0;
+ double previousCubicX2 = 0;
+ double previousCubicY2 = 0;
+
+ QValueVector<SegmentData> pathSegmentData(numSegments);
+
+ for(unsigned int i = 0; i < numSegments; i++)
+ {
+ SVGPathSegImpl *segment = path->getItem(i);
+ struct SegmentData data;
+
+ data.type = segment->pathSegType();
+
+ if(segment->pathSegType() == PATHSEG_MOVETO_ABS || segment->pathSegType() == PATHSEG_MOVETO_REL)
+ {
+ if(currentSubpathStartIndex >= 0)
+ {
+ // Finish the previous subpath.
+ for(unsigned int j = currentSubpathStartIndex; j < i; j++)
+ {
+ pathSegmentData[j].subpathStartIndex = currentSubpathStartIndex;
+ pathSegmentData[j].subpathEndIndex = i - 1;
+ pathSegmentData[j].subpathIsClosed = false;
+ }
+ }
+
+ currentSubpathStartIndex = i;
+ }
+ else if(segment->pathSegType() == PATHSEG_CLOSEPATH)
+ {
+ if(currentSubpathStartIndex >= 0)
+ {
+ SVGPathSegClosePathImpl *s = static_cast<SVGPathSegClosePathImpl *>(segment);
+
+ s->setX(pathSegmentData[currentSubpathStartIndex].startx + pathSegmentData[currentSubpathStartIndex].dx);
+ s->setY(pathSegmentData[currentSubpathStartIndex].starty + pathSegmentData[currentSubpathStartIndex].dy);
+
+ for(unsigned int j = currentSubpathStartIndex; j < i; j++)
+ {
+ pathSegmentData[j].subpathStartIndex = currentSubpathStartIndex;
+ pathSegmentData[j].subpathEndIndex = i;
+ pathSegmentData[j].subpathIsClosed = true;
+ }
+
+ data.subpathStartIndex = currentSubpathStartIndex;
+ data.subpathEndIndex = i;
+ data.subpathIsClosed = true;
+ }
+
+ currentSubpathStartIndex = i + 1;
+ }
+
+ switch(segment->pathSegType())
+ {
+ case PATHSEG_CURVETO_CUBIC_ABS:
+ {
+ SVGPathSegCurvetoCubicAbsImpl *s = static_cast<SVGPathSegCurvetoCubicAbsImpl *>(segment);
+ previousCubicX2 = s->x2();
+ previousCubicY2 = s->y2();
+ break;
+ }
+ case PATHSEG_CURVETO_CUBIC_REL:
+ {
+ SVGPathSegCurvetoCubicRelImpl *s = static_cast<SVGPathSegCurvetoCubicRelImpl *>(segment);
+ previousCubicX2 = curx + s->x2();
+ previousCubicY2 = cury + s->y2();
+ break;
+ }
+ case PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
+ {
+ SVGPathSegCurvetoCubicSmoothAbsImpl *s = static_cast<SVGPathSegCurvetoCubicSmoothAbsImpl *>(segment);
+ s->setPreviousX2(previousCubicX2);
+ s->setPreviousY2(previousCubicY2);
+ previousCubicX2 = s->x2();
+ previousCubicY2 = s->y2();
+ break;
+ }
+ case PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
+ {
+ SVGPathSegCurvetoCubicSmoothRelImpl *s = static_cast<SVGPathSegCurvetoCubicSmoothRelImpl *>(segment);
+ s->setPreviousAbsX2(previousCubicX2);
+ s->setPreviousAbsY2(previousCubicY2);
+ previousCubicX2 = curx + s->x2();
+ previousCubicY2 = cury + s->y2();
+ break;
+ }
+ case PATHSEG_CURVETO_QUADRATIC_ABS:
+ {
+ SVGPathSegCurvetoQuadraticAbsImpl *s = static_cast<SVGPathSegCurvetoQuadraticAbsImpl *>(segment);
+ previousQuadraticX1 = s->x1();
+ previousQuadraticY1 = s->y1();
+ break;
+ }
+ case PATHSEG_CURVETO_QUADRATIC_REL:
+ {
+ SVGPathSegCurvetoQuadraticRelImpl *s = static_cast<SVGPathSegCurvetoQuadraticRelImpl *>(segment);
+ previousQuadraticX1 = curx + s->x1();
+ previousQuadraticY1 = cury + s->y1();
+ break;
+ }
+ case PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
+ {
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl *s = static_cast<SVGPathSegCurvetoQuadraticSmoothAbsImpl *>(segment);
+ s->setPreviousX1(previousQuadraticX1);
+ s->setPreviousY1(previousQuadraticY1);
+ previousQuadraticX1 = s->x1(curx);
+ previousQuadraticY1 = s->y1(cury);
+ break;
+ }
+ case PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
+ {
+ SVGPathSegCurvetoQuadraticSmoothRelImpl *s = static_cast<SVGPathSegCurvetoQuadraticSmoothRelImpl *>(segment);
+ s->setPreviousAbsX1(previousQuadraticX1);
+ s->setPreviousAbsY1(previousQuadraticY1);
+ previousQuadraticX1 = s->absX1(curx);
+ previousQuadraticY1 = s->absY1(cury);
+ break;
+ }
+ default:
+ previousCubicX2 = curx;
+ previousCubicY2 = cury;
+ previousQuadraticX1 = curx;
+ previousQuadraticY1 = cury;
+ break;
+ }
+
+ data.startx = curx;
+ data.starty = cury;
+
+ segment->getDeltasAndSlopes(curx, cury, &data.dx, &data.dy, &data.startSlope, &data.endSlope);
+
+ pathSegmentData[i] = data;
+
+ curx += data.dx;
+ cury += data.dy;
+ }
+
+ if(currentSubpathStartIndex >= 0)
+ {
+ // Finish the previous subpath.
+ for(unsigned int j = currentSubpathStartIndex; j < numSegments; j++)
+ {
+ pathSegmentData[j].subpathStartIndex = currentSubpathStartIndex;
+ pathSegmentData[j].subpathEndIndex = numSegments - 1;
+ pathSegmentData[j].subpathIsClosed = false;
+ }
+ }
+
+ m_markers.resize(numSegments);
+
+ for(unsigned int i = 0; i < numSegments; i++)
+ {
+ struct Marker marker;
+
+ marker.x = pathSegmentData[i].startx + pathSegmentData[i].dx;
+ marker.y = pathSegmentData[i].starty + pathSegmentData[i].dy;
+
+ double inSlope;
+ double outSlope;
+ bool haveInSlope = false;
+ bool haveOutSlope = false;
+
+ if(pathSegmentData[i].subpathStartIndex == i && pathSegmentData[i].subpathIsClosed)
+ {
+ // Spec: For closed subpaths, the marker for the initial vertex uses the end direction
+ // of the corresponding closepath for its incoming slope and the first segment's
+ // start slope for its outgoing slope.
+ haveInSlope = getEndSlope(pathSegmentData, pathSegmentData[i].subpathEndIndex, &inSlope);
+ haveOutSlope = getStartSlope(pathSegmentData, i + 1, &outSlope);
+ }
+ else if(pathSegmentData[i].type == PATHSEG_CLOSEPATH)
+ {
+ haveInSlope = getEndSlope(pathSegmentData, i, &inSlope);
+
+ // Spec: If the segment following a closepath is other than a moveto, the marker
+ // for the closepath uses the following segment's start direction as its
+ // outgoing direction.
+ if(i + 1 < numSegments && (pathSegmentData[i + 1].type != PATHSEG_MOVETO_ABS && pathSegmentData[i + 1].type != PATHSEG_MOVETO_REL))
+ haveOutSlope = getStartSlope(pathSegmentData, i + 1, &outSlope);
+ else
+ haveOutSlope = getStartSlope(pathSegmentData, pathSegmentData[i].subpathStartIndex, &outSlope);
+ }
+ else
+ {
+ haveOutSlope = getStartSlope(pathSegmentData, i + 1, &outSlope);
+ haveInSlope = getEndSlope(pathSegmentData, i, &inSlope);
+ }
+
+ if(!haveInSlope && !haveOutSlope)
+ {
+ outSlope = 0;
+ inSlope = 0;
+ }
+ else if(haveInSlope && !haveOutSlope)
+ outSlope = inSlope;
+ else if(!haveInSlope && haveOutSlope)
+ inSlope = outSlope;
+
+ double bisector = SVGAngleImpl::shortestArcBisector(inSlope, outSlope);
+ marker.angle = bisector;
+
+ m_markers[i] = marker;
+ }
+}
+
+bool SVGPathElementImpl::MarkerData::getStartSlope(QValueVector<SegmentData> segments, unsigned int i, double *pStartSlope)
+{
+ if(i > segments.count() - 1 || segments[i].type == PATHSEG_MOVETO_ABS || segments[i].type == PATHSEG_MOVETO_REL)
+ return false;
+ else
+ {
+ const double epsilon = DBL_EPSILON;
+
+ if(fabs(segments[i].dx) > epsilon || fabs(segments[i].dy) > epsilon)
+ {
+ *pStartSlope = segments[i].startSlope;
+ return true;
+ }
+ else
+ {
+ int subpathStartIndex = segments[i].subpathStartIndex;
+
+ for(int j = i - 1; j >= subpathStartIndex; j--)
+ {
+ if(segments[j].type == PATHSEG_MOVETO_ABS || segments[j].type == PATHSEG_MOVETO_REL)
+ return false;
+
+ if(fabs(segments[j].dx) > epsilon || fabs(segments[j].dy) > epsilon)
+ {
+ *pStartSlope = segments[j].endSlope;
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+}
+
+bool SVGPathElementImpl::MarkerData::getEndSlope(QValueVector<SegmentData> segments, unsigned int i, double *pEndSlope)
+{
+ if(i > segments.count() - 1 || segments[i].type == PATHSEG_MOVETO_ABS || segments[i].type == PATHSEG_MOVETO_REL)
+ return false;
+ else
+ {
+ const double epsilon = DBL_EPSILON;
+
+ if(fabs(segments[i].dx) > epsilon || fabs(segments[i].dy) > epsilon)
+ {
+ *pEndSlope = segments[i].endSlope;
+ return true;
+ }
+ else
+ {
+ int subpathEndIndex = segments[i].subpathEndIndex;
+
+ for(int j = i + 1; j <= subpathEndIndex; j++)
+ {
+ if(segments[j].type == PATHSEG_MOVETO_ABS || segments[j].type == PATHSEG_MOVETO_REL)
+ return false;
+
+ if(fabs(segments[j].dx) > epsilon || fabs(segments[j].dy) > epsilon)
+ {
+ *pEndSlope = segments[j].startSlope;
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathElementImpl.h b/ksvg/impl/SVGPathElementImpl.h
new file mode 100644
index 00000000..a9af56fc
--- /dev/null
+++ b/ksvg/impl/SVGPathElementImpl.h
@@ -0,0 +1,194 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathElementImpl_H
+#define SVGPathElementImpl_H
+
+#include <qvaluevector.h>
+
+#include "svgpathparser.h"
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGAnimatedPathDataImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGPointImpl;
+class SVGPathSegImpl;
+class SVGPathSegArcAbsImpl;
+class SVGPathSegArcRelImpl;
+class SVGAnimatedNumberImpl;
+class SVGPathSegClosePathImpl;
+class SVGPathSegLinetoAbsImpl;
+class SVGPathSegLinetoRelImpl;
+class SVGPathSegMovetoAbsImpl;
+class SVGPathSegMovetoRelImpl;
+class SVGPathSegCurvetoCubicAbsImpl;
+class SVGPathSegCurvetoCubicRelImpl;
+class SVGPathSegLinetoVerticalAbsImpl;
+class SVGPathSegLinetoVerticalRelImpl;
+class SVGPathSegLinetoHorizontalAbsImpl;
+class SVGPathSegLinetoHorizontalRelImpl;
+class SVGPathSegCurvetoQuadraticAbsImpl;
+class SVGPathSegCurvetoQuadraticRelImpl;
+class SVGPathSegCurvetoCubicSmoothAbsImpl;
+class SVGPathSegCurvetoCubicSmoothRelImpl;
+class SVGPathSegCurvetoQuadraticSmoothAbsImpl;
+class SVGPathSegCurvetoQuadraticSmoothRelImpl;
+class SVGPathElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl,
+ public SVGAnimatedPathDataImpl,
+ public ::SVGPathParser
+{
+public:
+ SVGPathElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGPathElementImpl();
+
+ SVGAnimatedNumberImpl *pathLength() const;
+ double getTotalLength();
+ SVGPointImpl *getPointAtLength(double distance);
+ unsigned long getPathSegAtLength(double distance);
+
+ SVGPathSegClosePathImpl *createSVGPathSegClosePath();
+ SVGPathSegMovetoAbsImpl *createSVGPathSegMovetoAbs(double x, double y);
+ SVGPathSegMovetoRelImpl *createSVGPathSegMovetoRel(double x, double y);
+ SVGPathSegLinetoAbsImpl *createSVGPathSegLinetoAbs(double x, double y);
+ SVGPathSegLinetoRelImpl *createSVGPathSegLinetoRel(double x, double y);
+ SVGPathSegCurvetoCubicAbsImpl *createSVGPathSegCurvetoCubicAbs(double x, double y, double x1, double y1, double x2, double y2);
+ SVGPathSegCurvetoCubicRelImpl *createSVGPathSegCurvetoCubicRel(double x, double y, double x1, double y1, double x2, double y2);
+ SVGPathSegCurvetoQuadraticAbsImpl *createSVGPathSegCurvetoQuadraticAbs(double x, double y, double x1, double y1);
+ SVGPathSegCurvetoQuadraticRelImpl *createSVGPathSegCurvetoQuadraticRel(double x, double y, double x1, double y1);
+ SVGPathSegArcAbsImpl *createSVGPathSegArcAbs(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag);
+ SVGPathSegArcRelImpl *createSVGPathSegArcRel(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag);
+ SVGPathSegLinetoHorizontalAbsImpl *createSVGPathSegLinetoHorizontalAbs(double x);
+ SVGPathSegLinetoHorizontalRelImpl *createSVGPathSegLinetoHorizontalRel(double x);
+ SVGPathSegLinetoVerticalAbsImpl *createSVGPathSegLinetoVerticalAbs(double y);
+ SVGPathSegLinetoVerticalRelImpl *createSVGPathSegLinetoVerticalRel(double y);
+ SVGPathSegCurvetoCubicSmoothAbsImpl *createSVGPathSegCurvetoCubicSmoothAbs(double x, double y, double x2, double y2);
+ SVGPathSegCurvetoCubicSmoothRelImpl *createSVGPathSegCurvetoCubicSmoothRel(double x, double y, double x2, double y2);
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl *createSVGPathSegCurvetoQuadraticSmoothAbs(double x, double y);
+ SVGPathSegCurvetoQuadraticSmoothRelImpl *createSVGPathSegCurvetoQuadraticSmoothRel(double x, double y);
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+ virtual SVGRectImpl *getBBox();
+
+ class MarkerData
+ {
+ public:
+ struct Marker
+ {
+ double x;
+ double y;
+ double angle;
+ };
+
+ MarkerData() {}
+ MarkerData(SVGPathSegListImpl *path);
+
+ const Marker& marker(unsigned int i) const { return m_markers[i]; }
+ unsigned int numMarkers() const { return m_markers.count(); }
+
+ private:
+ struct SegmentData
+ {
+ double startx;
+ double starty;
+ double dx;
+ double dy;
+ double startSlope;
+ double endSlope;
+ unsigned int subpathStartIndex;
+ unsigned int subpathEndIndex;
+ bool subpathIsClosed;
+ int type;
+ };
+
+ static bool getStartSlope(QValueVector<SegmentData> segments, unsigned int i, double *pStartSlope);
+ static bool getEndSlope(QValueVector<SegmentData> segments, unsigned int i, double *pEndSlope);
+
+ QValueVector<Marker> m_markers;
+ };
+
+ MarkerData markerData() const { return m_markerData; }
+
+private:
+ SVGAnimatedNumberImpl *m_pathLength;
+ MarkerData m_markerData;
+
+ virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true);
+ virtual void svgLineTo(double x1, double y1, bool abs = true);
+ virtual void svgLineToHorizontal(double x, bool abs = true);
+ virtual void svgLineToVertical(double y, bool abs = true);
+ virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true);
+ virtual void svgCurveToCubicSmooth(double x, double y, double x2, double y2, bool abs = true);
+ virtual void svgCurveToQuadratic(double x, double y, double x1, double y1, bool abs = true);
+ virtual void svgCurveToQuadraticSmooth(double x, double y, bool abs = true);
+ virtual void svgArcTo(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs = true);
+ virtual void svgClosePath();
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ D, PathLength,
+ // Functions
+ GetTotalLength, GetPointAtLength, GetPathSegAtLength,
+ CreateSVGPathSegClosePath, CreateSVGPathSegMovetoAbs, CreateSVGPathSegMovetoRel,
+ CreateSVGPathSegLinetoAbs, CreateSVGPathSegLinetoRel, CreateSVGPathSegCurvetoCubicAbs,
+ CreateSVGPathSegCurvetoCubicRel, CreateSVGPathSegCurvetoQuadraticAbs,
+ CreateSVGPathSegCurvetoQuadraticRel, CreateSVGPathSegArcAbs,
+ CreateSVGPathSegArcRel, CreateSVGPathSegLinetoHorizontalAbs,
+ CreateSVGPathSegLinetoHorizontalRel, CreateSVGPathSegLinetoVerticalAbs,
+ CreateSVGPathSegLinetoVerticalRel, CreateSVGPathSegCurvetoCubicSmoothAbs,
+ CreateSVGPathSegCurvetoCubicSmoothRel, CreateSVGPathSegCurvetoQuadraticSmoothAbs,
+ CreateSVGPathSegCurvetoQuadraticSmoothRel
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGPathElementImpl, "path")
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGPathElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGPathElementImplProtoFunc, SVGPathElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegArcImpl.cc b/ksvg/impl/SVGPathSegArcImpl.cc
new file mode 100644
index 00000000..9fb4190f
--- /dev/null
+++ b/ksvg/impl/SVGPathSegArcImpl.cc
@@ -0,0 +1,495 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include <kdebug.h>
+
+#include "SVGPathSegArcImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegArcImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+static void getArcSlopes(bool relative, double curx, double cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag, double *pStartSlope, double *pEndSlope)
+{
+ double sin_th, cos_th;
+ double a00, a01, a10, a11;
+ double x0, y0, x1, y1, xc, yc;
+ double d, sfactor, sfactor_sq;
+ double th0, th1, th_arc;
+ int i, n_segs;
+
+ sin_th = sin(angle * (M_PI / 180.0));
+ cos_th = cos(angle * (M_PI / 180.0));
+
+ double dx;
+
+ if(!relative)
+ dx = (curx - x) / 2.0;
+ else
+ dx = -x / 2.0;
+
+ double dy;
+
+ if(!relative)
+ dy = (cury - y) / 2.0;
+ else
+ dy = -y / 2.0;
+
+ double _x1 = cos_th * dx + sin_th * dy;
+ double _y1 = -sin_th * dx + cos_th * dy;
+ double Pr1 = r1 * r1;
+ double Pr2 = r2 * r2;
+ double Px = _x1 * _x1;
+ double Py = _y1 * _y1;
+
+ // Spec : check if radii are large enough
+ double check = Px / Pr1 + Py / Pr2;
+ if(check > 1)
+ {
+ r1 = r1 * sqrt(check);
+ r2 = r2 * sqrt(check);
+ }
+
+ a00 = cos_th / r1;
+ a01 = sin_th / r1;
+ a10 = -sin_th / r2;
+ a11 = cos_th / r2;
+
+ x0 = a00 * curx + a01 * cury;
+ y0 = a10 * curx + a11 * cury;
+
+ if(!relative)
+ x1 = a00 * x + a01 * y;
+ else
+ x1 = a00 * (curx + x) + a01 * (cury + y);
+
+ if(!relative)
+ y1 = a10 * x + a11 * y;
+ else
+ y1 = a10 * (curx + x) + a11 * (cury + y);
+
+ /* (x0, y0) is current point in transformed coordinate space.
+ (x1, y1) is new point in transformed coordinate space.
+
+ The arc fits a unit-radius circle in this space.
+ */
+
+ d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
+
+ sfactor_sq = 1.0 / d - 0.25;
+
+ if(sfactor_sq < 0)
+ sfactor_sq = 0;
+
+ sfactor = sqrt(sfactor_sq);
+
+ if(sweepFlag == largeArcFlag)
+ sfactor = -sfactor;
+
+ xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
+ yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
+
+ /* (xc, yc) is center of the circle. */
+ th0 = atan2(y0 - yc, x0 - xc);
+ th1 = atan2(y1 - yc, x1 - xc);
+
+ th_arc = th1 - th0;
+ if(th_arc < 0 && sweepFlag)
+ th_arc += 2 * M_PI;
+ else if(th_arc > 0 && !sweepFlag)
+ th_arc -= 2 * M_PI;
+
+ n_segs = (int) (int) ceil(fabs(th_arc / (M_PI * 0.5 + 0.001)));
+
+ for(int step = 0; step < 2; step++)
+ {
+ i = step == 0 ? 0 : n_segs - 1;
+
+ double sin_th, cos_th;
+ double a00, a01, a10, a11;
+ double x1, y1, x2, y2, x3, y3;
+ double t;
+ double th_half;
+
+ double _th0 = th0 + i * th_arc / n_segs;
+ double _th1 = th0 + (i + 1) * th_arc / n_segs;
+
+ sin_th = sin(angle * (M_PI / 180.0));
+ cos_th = cos(angle * (M_PI / 180.0));
+
+ /* inverse transform compared with rsvg_path_arc */
+ a00 = cos_th * r1;
+ a01 = -sin_th * r2;
+ a10 = sin_th * r1;
+ a11 = cos_th * r2;
+
+ th_half = 0.5 * (_th1 - _th0);
+ t = (8.0 / 3.0) * sin(th_half * 0.5) * sin(th_half * 0.5) / sin(th_half);
+ x1 = xc + cos(_th0) - t * sin(_th0);
+ y1 = yc + sin(_th0) + t * cos(_th0);
+ x3 = xc + cos(_th1);
+ y3 = yc + sin(_th1);
+ x2 = x3 + t * sin(_th1);
+ y2 = y3 - t * cos(_th1);
+
+ double bezX1 = a00 * x1 + a01 * y1;
+ double bezY1 = a10 * x1 + a11 * y1;
+ double bezX2 = a00 * x2 + a01 * y2;
+ double bezY2 = a10 * x2 + a11 * y2;
+ double bezX = a00 * x3 + a01 * y3;
+ double bezY = a10 * x3 + a11 * y3;
+
+ if(step == 0)
+ *pStartSlope = SVGAngleImpl::todeg(atan2(bezY1 - cury, bezX1 - curx));
+ else
+ *pEndSlope = SVGAngleImpl::todeg(atan2(bezY - bezY2, bezX - bezX2));
+ }
+}
+
+SVGPathSegArcAbsImpl::SVGPathSegArcAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegArcAbsImpl::~SVGPathSegArcAbsImpl()
+{
+}
+
+void SVGPathSegArcAbsImpl::setX(double x)
+{
+ m_x = x;
+}
+
+double SVGPathSegArcAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegArcAbsImpl::setY(double y)
+{
+ m_y = y;
+}
+
+double SVGPathSegArcAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegArcAbsImpl::setR1(double r1)
+{
+ m_r1 = r1;
+}
+
+double SVGPathSegArcAbsImpl::r1() const
+{
+ return m_r1;
+}
+
+void SVGPathSegArcAbsImpl::setR2(double r2)
+{
+ m_r2 = r2;
+}
+
+double SVGPathSegArcAbsImpl::r2() const
+{
+ return m_r2;
+}
+
+void SVGPathSegArcAbsImpl::setAngle(double angle)
+{
+ m_angle = angle;
+}
+
+double SVGPathSegArcAbsImpl::angle() const
+{
+ return m_angle;
+}
+
+void SVGPathSegArcAbsImpl::setLargeArcFlag(bool largeArcFlag)
+{
+ m_largeArcFlag = largeArcFlag;
+}
+
+bool SVGPathSegArcAbsImpl::largeArcFlag() const
+{
+ return m_largeArcFlag;
+}
+
+void SVGPathSegArcAbsImpl::setSweepFlag(bool sweepFlag)
+{
+ m_sweepFlag = sweepFlag;
+}
+
+bool SVGPathSegArcAbsImpl::sweepFlag() const
+{
+ return m_sweepFlag;
+}
+
+void SVGPathSegArcAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope;
+ double endSlope;
+ getArcSlopes(false, curx, cury, angle(), x(), y(), r1(), r2(), largeArcFlag(), sweepFlag(), &startSlope, &endSlope);
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegArcAbsImpl::s_hashTable 11
+ x SVGPathSegArcAbsImpl::X DontDelete
+ y SVGPathSegArcAbsImpl::Y DontDelete
+ r1 SVGPathSegArcAbsImpl::R1 DontDelete
+ r2 SVGPathSegArcAbsImpl::R2 DontDelete
+ angle SVGPathSegArcAbsImpl::Angle DontDelete
+ largeArcFlag SVGPathSegArcAbsImpl::LargeArcFlag DontDelete
+ sweepFlag SVGPathSegArcAbsImpl::SweepFlag DontDelete
+@end
+*/
+
+Value SVGPathSegArcAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case R1:
+ return Number(r1());
+ case R2:
+ return Number(r2());
+ case Angle:
+ return Number(angle());
+ case LargeArcFlag:
+ return Boolean(largeArcFlag());
+ case SweepFlag:
+ return Boolean(sweepFlag());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegArcAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case R1:
+ m_r1 = value.toNumber(exec);
+ break;
+ case R2:
+ m_r2 = value.toNumber(exec);
+ break;
+ case Angle:
+ m_angle = value.toNumber(exec);
+ break;
+ case LargeArcFlag:
+ m_largeArcFlag = value.toBoolean(exec);
+ break;
+ case SweepFlag:
+ m_sweepFlag = value.toBoolean(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegArcRelImpl::SVGPathSegArcRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegArcRelImpl::~SVGPathSegArcRelImpl()
+{
+}
+
+void SVGPathSegArcRelImpl::setX(double x)
+{
+ m_x = x;
+}
+
+double SVGPathSegArcRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegArcRelImpl::setY(double y)
+{
+ m_y = y;
+}
+
+double SVGPathSegArcRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegArcRelImpl::setR1(double r1)
+{
+ m_r1 = r1;
+}
+
+double SVGPathSegArcRelImpl::r1() const
+{
+ return m_r1;
+}
+
+void SVGPathSegArcRelImpl::setR2(double r2)
+{
+ m_r2 = r2;
+}
+
+double SVGPathSegArcRelImpl::r2() const
+{
+ return m_r2;
+}
+
+void SVGPathSegArcRelImpl::setAngle(double angle)
+{
+ m_angle = angle;
+}
+
+double SVGPathSegArcRelImpl::angle() const
+{
+ return m_angle;
+}
+
+void SVGPathSegArcRelImpl::setLargeArcFlag(bool largeArcFlag)
+{
+ m_largeArcFlag = largeArcFlag;
+}
+
+bool SVGPathSegArcRelImpl::largeArcFlag() const
+{
+ return m_largeArcFlag;
+}
+
+void SVGPathSegArcRelImpl::setSweepFlag(bool sweepFlag)
+{
+ m_sweepFlag = sweepFlag;
+}
+
+bool SVGPathSegArcRelImpl::sweepFlag() const
+{
+ return m_sweepFlag;
+}
+
+void SVGPathSegArcRelImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x();
+ double dy = y();
+ double startSlope;
+ double endSlope;
+ getArcSlopes(true, curx, cury, angle(), x(), y(), r1(), r2(), largeArcFlag(), sweepFlag(), &startSlope, &endSlope);
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegArcRelImpl::s_hashTable 11
+ x SVGPathSegArcRelImpl::X DontDelete
+ y SVGPathSegArcRelImpl::Y DontDelete
+ r1 SVGPathSegArcRelImpl::R1 DontDelete
+ r2 SVGPathSegArcRelImpl::R2 DontDelete
+ angle SVGPathSegArcRelImpl::Angle DontDelete
+ largeArcFlag SVGPathSegArcRelImpl::LargeArcFlag DontDelete
+ sweepFlag SVGPathSegArcRelImpl::SweepFlag DontDelete
+@end
+*/
+
+Value SVGPathSegArcRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case R1:
+ return Number(r1());
+ case R2:
+ return Number(r2());
+ case Angle:
+ return Number(angle());
+ case LargeArcFlag:
+ return Boolean(largeArcFlag());
+ case SweepFlag:
+ return Boolean(sweepFlag());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegArcRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case R1:
+ m_r1 = value.toNumber(exec);
+ break;
+ case R2:
+ m_r2 = value.toNumber(exec);
+ break;
+ case Angle:
+ m_angle = value.toNumber(exec);
+ break;
+ case LargeArcFlag:
+ m_largeArcFlag = value.toBoolean(exec);
+ break;
+ case SweepFlag:
+ m_sweepFlag = value.toBoolean(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegArcImpl.h b/ksvg/impl/SVGPathSegArcImpl.h
new file mode 100644
index 00000000..f0e375d6
--- /dev/null
+++ b/ksvg/impl/SVGPathSegArcImpl.h
@@ -0,0 +1,150 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegArcImpl_H
+#define SVGPathSegArcImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegArcAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegArcAbsImpl();
+ virtual ~SVGPathSegArcAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "A"; }
+ virtual QString toString() const { return QString("A %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
+
+ void setX(double x);
+ double x() const;
+
+ void setY(double y);
+ double y() const;
+
+ void setR1(double r1);
+ double r1() const;
+
+ void setR2(double r2);
+ double r2() const;
+
+ void setAngle(double angle);
+ double angle() const;
+
+ void setLargeArcFlag(bool largeArcFlag);
+ bool largeArcFlag() const;
+
+ void setSweepFlag(bool sweepFlag);
+ bool sweepFlag() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_r1;
+ double m_r2;
+ double m_angle;
+
+ bool m_largeArcFlag : 1;
+ bool m_sweepFlag : 1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, R1, R2, Angle, LargeArcFlag, SweepFlag
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+
+class SVGPathSegArcRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegArcRelImpl();
+ virtual ~SVGPathSegArcRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "a"; }
+ virtual QString toString() const { return QString("a %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
+
+ void setX(double x);
+ double x() const;
+
+ void setY(double y);
+ double y() const;
+
+ void setR1(double r1);
+ double r1() const;
+
+ void setR2(double r2);
+ double r2() const;
+
+ void setAngle(double angle);
+ double angle() const;
+
+ void setLargeArcFlag(bool largeArcFlag);
+ bool largeArcFlag() const;
+
+ void setSweepFlag(bool sweepFlag);
+ bool sweepFlag() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_r1;
+ double m_r2;
+ double m_angle;
+
+ bool m_largeArcFlag : 1;
+ bool m_sweepFlag : 1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, R1, R2, Angle, LargeArcFlag, SweepFlag
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegClosePathImpl.cc b/ksvg/impl/SVGPathSegClosePathImpl.cc
new file mode 100644
index 00000000..c18e6027
--- /dev/null
+++ b/ksvg/impl/SVGPathSegClosePathImpl.cc
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPathSegClosePathImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+SVGPathSegClosePathImpl::SVGPathSegClosePathImpl() : SVGPathSegImpl()
+{
+}
+
+SVGPathSegClosePathImpl::~SVGPathSegClosePathImpl()
+{
+}
+
+void SVGPathSegClosePathImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegClosePathImpl.h b/ksvg/impl/SVGPathSegClosePathImpl.h
new file mode 100644
index 00000000..c4cf63ce
--- /dev/null
+++ b/ksvg/impl/SVGPathSegClosePathImpl.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegClosePathImpl_H
+#define SVGPathSegClosePathImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegClosePathImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegClosePathImpl();
+ virtual ~SVGPathSegClosePathImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CLOSEPATH; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "Z"; }
+ virtual QString toString() const { return "Z"; }
+
+ void setX(double x) { m_x = x; }
+ void setY(double y) { m_y = y; }
+
+ double x() const { return m_x; }
+ double y() const { return m_y; }
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+
+public:
+ KSVG_FORWARDGET
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicImpl.cc b/ksvg/impl/SVGPathSegCurvetoCubicImpl.cc
new file mode 100644
index 00000000..468b1fb3
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoCubicImpl.cc
@@ -0,0 +1,325 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegCurvetoCubicImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegCurvetoCubicImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegCurvetoCubicAbsImpl::SVGPathSegCurvetoCubicAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoCubicAbsImpl::~SVGPathSegCurvetoCubicAbsImpl()
+{
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setX1(const double &x1)
+{
+ m_x1 = x1;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::x1() const
+{
+ return m_x1;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setY1(const double &y1)
+{
+ m_y1 = y1;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::y1() const
+{
+ return m_y1;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setX2(const double &x2)
+{
+ m_x2 = x2;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::x2() const
+{
+ return m_x2;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::setY2(const double &y2)
+{
+ m_y2 = y2;
+}
+
+double SVGPathSegCurvetoCubicAbsImpl::y2() const
+{
+ return m_y2;
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(y1() - cury, x1() - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y2(), x() - x2()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoCubicAbsImpl::s_hashTable 7
+ x SVGPathSegCurvetoCubicAbsImpl::X DontDelete
+ y SVGPathSegCurvetoCubicAbsImpl::Y DontDelete
+ x1 SVGPathSegCurvetoCubicAbsImpl::X1 DontDelete
+ y1 SVGPathSegCurvetoCubicAbsImpl::Y1 DontDelete
+ x2 SVGPathSegCurvetoCubicAbsImpl::X2 DontDelete
+ y2 SVGPathSegCurvetoCubicAbsImpl::Y2 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoCubicAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X1:
+ return Number(x1());
+ case Y1:
+ return Number(y1());
+ case X2:
+ return Number(x2());
+ case Y2:
+ return Number(y2());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoCubicAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X1:
+ m_x1 = value.toNumber(exec);
+ break;
+ case Y1:
+ m_y1 = value.toNumber(exec);
+ break;
+ case X2:
+ m_x2 = value.toNumber(exec);
+ break;
+ case Y2:
+ m_y2 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+
+SVGPathSegCurvetoCubicRelImpl::SVGPathSegCurvetoCubicRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoCubicRelImpl::~SVGPathSegCurvetoCubicRelImpl()
+{
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setX1(const double &x1)
+{
+ m_x1 = x1;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::x1() const
+{
+ return m_x1;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setY1(const double &y1)
+{
+ m_y1 = y1;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::y1() const
+{
+ return m_y1;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setX2(const double &x2)
+{
+ m_x2 = x2;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::x2() const
+{
+ return m_x2;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::setY2(const double &y2)
+{
+ m_y2 = y2;
+}
+
+double SVGPathSegCurvetoCubicRelImpl::y2() const
+{
+ return m_y2;
+}
+
+void SVGPathSegCurvetoCubicRelImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = x();
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(y1(), x1()));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y2(), x() - x2()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoCubicRelImpl::s_hashTable 7
+ x SVGPathSegCurvetoCubicRelImpl::X DontDelete
+ y SVGPathSegCurvetoCubicRelImpl::Y DontDelete
+ x1 SVGPathSegCurvetoCubicRelImpl::X1 DontDelete
+ y1 SVGPathSegCurvetoCubicRelImpl::Y1 DontDelete
+ x2 SVGPathSegCurvetoCubicRelImpl::X2 DontDelete
+ y2 SVGPathSegCurvetoCubicRelImpl::Y2 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoCubicRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X1:
+ return Number(x1());
+ case Y1:
+ return Number(y1());
+ case X2:
+ return Number(x2());
+ case Y2:
+ return Number(y2());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoCubicRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X1:
+ m_x1 = value.toNumber(exec);
+ break;
+ case Y1:
+ m_y1 = value.toNumber(exec);
+ break;
+ case X2:
+ m_x2 = value.toNumber(exec);
+ break;
+ case Y2:
+ m_y2 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h
new file mode 100644
index 00000000..8f408f91
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h
@@ -0,0 +1,139 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoCubicImpl_H
+#define SVGPathSegCurvetoCubicImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoCubicAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoCubicAbsImpl();
+ virtual ~SVGPathSegCurvetoCubicAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "C"; }
+ virtual QString toString() const { return QString("C %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX1(const double &);
+ double x1() const;
+
+ void setY1(const double &);
+ double y1() const;
+
+ void setX2(const double &);
+ double x2() const;
+
+ void setY2(const double &);
+ double y2() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x1;
+ double m_y1;
+ double m_x2;
+ double m_y2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X1, Y1, X2, Y2
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegCurvetoCubicRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoCubicRelImpl();
+ virtual ~SVGPathSegCurvetoCubicRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "c"; }
+ virtual QString toString() const { return QString("c %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX1(const double &);
+ double x1() const;
+
+ void setY1(const double &);
+ double y1() const;
+
+ void setX2(const double &);
+ double x2() const;
+
+ void setY2(const double &);
+ double y2() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x1;
+ double m_y1;
+ double m_x2;
+ double m_y2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X1, Y1, X2, Y2
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.cc b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.cc
new file mode 100644
index 00000000..1d5c124a
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.cc
@@ -0,0 +1,298 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegCurvetoCubicSmoothImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegCurvetoCubicSmoothImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegCurvetoCubicSmoothAbsImpl::SVGPathSegCurvetoCubicSmoothAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoCubicSmoothAbsImpl::~SVGPathSegCurvetoCubicSmoothAbsImpl()
+{
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setX2(const double &x2)
+{
+ m_x2 = x2;
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::x2() const
+{
+ return m_x2;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setY2(const double &y2)
+{
+ m_y2 = y2;
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::y2() const
+{
+ return m_y2;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setPreviousX2(double x2)
+{
+ m_previousX2 = x2;
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::setPreviousY2(double y2)
+{
+ m_previousY2 = y2;
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::x1(double curx) const
+{
+ return curx - (m_previousX2 - curx);
+}
+
+double SVGPathSegCurvetoCubicSmoothAbsImpl::y1(double cury) const
+{
+ return cury - (m_previousY2 - cury);
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(y1(cury) - cury, x1(curx) - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y2(), x() - x2()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoCubicSmoothAbsImpl::s_hashTable 5
+ x SVGPathSegCurvetoCubicSmoothAbsImpl::X DontDelete
+ y SVGPathSegCurvetoCubicSmoothAbsImpl::Y DontDelete
+ x2 SVGPathSegCurvetoCubicSmoothAbsImpl::X2 DontDelete
+ y2 SVGPathSegCurvetoCubicSmoothAbsImpl::Y2 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoCubicSmoothAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X2:
+ return Number(x2());
+ case Y2:
+ return Number(y2());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoCubicSmoothAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X2:
+ m_x2 = value.toNumber(exec);
+ break;
+ case Y2:
+ m_y2 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegCurvetoCubicSmoothRelImpl::SVGPathSegCurvetoCubicSmoothRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoCubicSmoothRelImpl::~SVGPathSegCurvetoCubicSmoothRelImpl()
+{
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setX2(const double &x2)
+{
+ m_x2 = x2;
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::x2() const
+{
+ return m_x2;
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setY2(const double &y2)
+{
+ m_y2 = y2;
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::y2() const
+{
+ return m_y2;
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setPreviousAbsX2(double x2)
+{
+ m_previousAbsX2 = x2;
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::setPreviousAbsY2(double y2)
+{
+ m_previousAbsY2 = y2;
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::absX1(double curx) const
+{
+ return curx - (m_previousAbsX2 - curx);
+}
+
+double SVGPathSegCurvetoCubicSmoothRelImpl::absY1(double cury) const
+{
+ return cury - (m_previousAbsY2 - cury);
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x();
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(absY1(cury) - cury, absX1(curx) - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y2(), x() - x2()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoCubicSmoothRelImpl::s_hashTable 5
+ x SVGPathSegCurvetoCubicSmoothRelImpl::X DontDelete
+ y SVGPathSegCurvetoCubicSmoothRelImpl::Y DontDelete
+ x2 SVGPathSegCurvetoCubicSmoothRelImpl::X2 DontDelete
+ y2 SVGPathSegCurvetoCubicSmoothRelImpl::Y2 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoCubicSmoothRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X2:
+ return Number(x2());
+ case Y2:
+ return Number(y2());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoCubicSmoothRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X2:
+ m_x2 = value.toNumber(exec);
+ break;
+ case Y2:
+ m_y2 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h
new file mode 100644
index 00000000..0def6514
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h
@@ -0,0 +1,139 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoCubicSmoothImpl_H
+#define SVGPathSegCurvetoCubicSmoothImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoCubicSmoothAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoCubicSmoothAbsImpl();
+ virtual ~SVGPathSegCurvetoCubicSmoothAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "S"; }
+ virtual QString toString() const { return QString("S %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX2(const double &);
+ double x2() const;
+
+ void setY2(const double &);
+ double y2() const;
+
+ void setPreviousX2(double x2);
+ void setPreviousY2(double y2);
+
+ double x1(double curx) const;
+ double y1(double cury) const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x2;
+ double m_y2;
+ double m_previousX2;
+ double m_previousY2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X2, Y2
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegCurvetoCubicSmoothRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoCubicSmoothRelImpl();
+ virtual ~SVGPathSegCurvetoCubicSmoothRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "s"; }
+ virtual QString toString() const { return QString("s %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX2(const double &);
+ double x2() const;
+
+ void setY2(const double &);
+ double y2() const;
+
+ void setPreviousAbsX2(double x2);
+ void setPreviousAbsY2(double y2);
+
+ double absX1(double curx) const;
+ double absY1(double cury) const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x2;
+ double m_y2;
+ double m_previousAbsX2;
+ double m_previousAbsY2;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X2, Y2
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.cc b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.cc
new file mode 100644
index 00000000..e6199a21
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.cc
@@ -0,0 +1,260 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegCurvetoQuadraticImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegCurvetoQuadraticImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegCurvetoQuadraticAbsImpl::SVGPathSegCurvetoQuadraticAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoQuadraticAbsImpl::~SVGPathSegCurvetoQuadraticAbsImpl()
+{
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoQuadraticAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoQuadraticAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::setX1(const double &x1)
+{
+ m_x1 = x1;
+}
+
+double SVGPathSegCurvetoQuadraticAbsImpl::x1() const
+{
+ return m_x1;
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::setY1(const double &y1)
+{
+ m_y1 = y1;
+}
+
+double SVGPathSegCurvetoQuadraticAbsImpl::y1() const
+{
+ return m_y1;
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(y1() - cury, x1() - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y1(), x() - x1()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoQuadraticAbsImpl::s_hashTable 5
+ x SVGPathSegCurvetoQuadraticAbsImpl::X DontDelete
+ y SVGPathSegCurvetoQuadraticAbsImpl::Y DontDelete
+ x1 SVGPathSegCurvetoQuadraticAbsImpl::X1 DontDelete
+ y1 SVGPathSegCurvetoQuadraticAbsImpl::Y1 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoQuadraticAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X1:
+ return Number(x1());
+ case Y1:
+ return Number(y1());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoQuadraticAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X1:
+ m_x1 = value.toNumber(exec);
+ break;
+ case Y1:
+ m_y1 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegCurvetoQuadraticRelImpl::SVGPathSegCurvetoQuadraticRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoQuadraticRelImpl::~SVGPathSegCurvetoQuadraticRelImpl()
+{
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoQuadraticRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoQuadraticRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::setX1(const double &x1)
+{
+ m_x1 = x1;
+}
+
+double SVGPathSegCurvetoQuadraticRelImpl::x1() const
+{
+ return m_x1;
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::setY1(const double &y1)
+{
+ m_y1 = y1;
+}
+
+double SVGPathSegCurvetoQuadraticRelImpl::y1() const
+{
+ return m_y1;
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = x();
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(y1(), x1()));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y1(), x() - x1()));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoQuadraticRelImpl::s_hashTable 5
+ x SVGPathSegCurvetoQuadraticRelImpl::X DontDelete
+ y SVGPathSegCurvetoQuadraticRelImpl::Y DontDelete
+ x1 SVGPathSegCurvetoQuadraticRelImpl::X1 DontDelete
+ y1 SVGPathSegCurvetoQuadraticRelImpl::Y1 DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoQuadraticRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ case X1:
+ return Number(x1());
+ case Y1:
+ return Number(y1());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoQuadraticRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case X1:
+ m_x1 = value.toNumber(exec);
+ break;
+ case Y1:
+ m_y1 = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h
new file mode 100644
index 00000000..6fe9ef15
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h
@@ -0,0 +1,123 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoQuadraticImpl_H
+#define SVGPathSegCurvetoQuadraticImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoQuadraticAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoQuadraticAbsImpl();
+ virtual ~SVGPathSegCurvetoQuadraticAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "Q"; }
+ virtual QString toString() const { return QString("Q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX1(const double &);
+ double x1() const;
+
+ void setY1(const double &);
+ double y1() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x1;
+ double m_y1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X1, Y1
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegCurvetoQuadraticRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoQuadraticRelImpl();
+ virtual ~SVGPathSegCurvetoQuadraticRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "q"; }
+ virtual QString toString() const { return QString("q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setX1(const double &);
+ double x1() const;
+
+ void setY1(const double &);
+ double y1() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_x1;
+ double m_y1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, X1, Y1
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc
new file mode 100644
index 00000000..f8c141da
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc
@@ -0,0 +1,235 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegCurvetoQuadraticSmoothImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegCurvetoQuadraticSmoothImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegCurvetoQuadraticSmoothAbsImpl::SVGPathSegCurvetoQuadraticSmoothAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoQuadraticSmoothAbsImpl::~SVGPathSegCurvetoQuadraticSmoothAbsImpl()
+{
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::setPreviousX1(double x1)
+{
+ m_previousX1 = x1;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::setPreviousY1(double y1)
+{
+ m_previousY1 = y1;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothAbsImpl::x1(double curx) const
+{
+ return curx - (m_previousX1 - curx);
+}
+
+double SVGPathSegCurvetoQuadraticSmoothAbsImpl::y1(double cury) const
+{
+ return cury - (m_previousY1 - cury);
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(y1(cury) - cury, x1(curx) - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(y() - y1(cury), x() - x1(curx)));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoQuadraticSmoothAbsImpl::s_hashTable 3
+ x SVGPathSegCurvetoQuadraticSmoothAbsImpl::X DontDelete
+ y SVGPathSegCurvetoQuadraticSmoothAbsImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoQuadraticSmoothAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoQuadraticSmoothAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+
+SVGPathSegCurvetoQuadraticSmoothRelImpl::SVGPathSegCurvetoQuadraticSmoothRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegCurvetoQuadraticSmoothRelImpl::~SVGPathSegCurvetoQuadraticSmoothRelImpl()
+{
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::setPreviousAbsX1(double x1)
+{
+ m_previousAbsX1 = x1;
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::setPreviousAbsY1(double y1)
+{
+ m_previousAbsY1 = y1;
+}
+
+double SVGPathSegCurvetoQuadraticSmoothRelImpl::absX1(double curx) const
+{
+ return curx - (m_previousAbsX1 - curx);
+}
+
+double SVGPathSegCurvetoQuadraticSmoothRelImpl::absY1(double cury) const
+{
+ return cury - (m_previousAbsY1 - cury);
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::getDeltasAndSlopes(double curx, double cury, double *pDx, double *pDy, double *pStartSlope, double *pEndSlope) const
+{
+ double dx = x();
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(absY1(cury) - cury, absX1(curx) - curx));
+ double endSlope = SVGAngleImpl::todeg(atan2(cury + y() - absY1(cury), curx + x() - absX1(curx)));
+ *pDx = dx;
+ *pDy = dy;
+ *pStartSlope = startSlope;
+ *pEndSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegCurvetoQuadraticSmoothRelImpl::s_hashTable 3
+ x SVGPathSegCurvetoQuadraticSmoothRelImpl::X DontDelete
+ y SVGPathSegCurvetoQuadraticSmoothRelImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegCurvetoQuadraticSmoothRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegCurvetoQuadraticSmoothRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h
new file mode 100644
index 00000000..dffa3355
--- /dev/null
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h
@@ -0,0 +1,123 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegCurvetoQuadraticSmoothImpl_H
+#define SVGPathSegCurvetoQuadraticSmoothImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegCurvetoQuadraticSmoothAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoQuadraticSmoothAbsImpl();
+ virtual ~SVGPathSegCurvetoQuadraticSmoothAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "T"; }
+ virtual QString toString() const { return QString("T %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setPreviousX1(double x1);
+ void setPreviousY1(double y1);
+
+ double x1(double curx) const;
+ double y1(double cury) const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_previousX1;
+ double m_previousY1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegCurvetoQuadraticSmoothRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegCurvetoQuadraticSmoothRelImpl();
+ virtual ~SVGPathSegCurvetoQuadraticSmoothRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "t"; }
+ virtual QString toString() const { return QString("t %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ void setPreviousAbsX1(double x1);
+ void setPreviousAbsY1(double y1);
+
+ double absX1(double curx) const;
+ double absY1(double cury) const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+ double m_previousAbsX1;
+ double m_previousAbsY1;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegImpl.cc b/ksvg/impl/SVGPathSegImpl.cc
new file mode 100644
index 00000000..c1f2934d
--- /dev/null
+++ b/ksvg/impl/SVGPathSegImpl.cc
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_cacheimpl.h"
+
+SVGPathSegImpl::SVGPathSegImpl()
+{
+}
+
+SVGPathSegImpl::~SVGPathSegImpl()
+{
+}
+
+void SVGPathSegImpl::getDeltasAndSlopes(double, double, double *dx, double *dy, double *startSlope, double *endSlope) const
+{
+ *dx = 0;
+ *dy = 0;
+ *startSlope = 0;
+ *endSlope = 0;
+}
+
+// Exma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegImpl::s_hashTable 3
+ pathSegType SVGPathSegImpl::PathSegType DontDelete|ReadOnly
+ pathSegTypeAsLetter SVGPathSegImpl::PathSegTypeAsLetter DontDelete|ReadOnly
+@end
+*/
+
+Value SVGPathSegImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case PathSegType:
+ return Number(pathSegType());
+ case PathSegTypeAsLetter:
+ return String(pathSegTypeAsLetter().string());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+/*
+@namespace KSVG
+@begin SVGPathSegImplConstructor::s_hashTable 23
+ PATHSEG_UNKNOWN KSVG::PATHSEG_UNKNOWN DontDelete|ReadOnly
+ PATHSEG_CLOSEPATH KSVG::PATHSEG_CLOSEPATH DontDelete|ReadOnly
+ PATHSEG_MOVETO_ABS KSVG::PATHSEG_MOVETO_ABS DontDelete|ReadOnly
+ PATHSEG_MOVETO_REL KSVG::PATHSEG_MOVETO_REL DontDelete|ReadOnly
+ PATHSEG_LINETO_ABS KSVG::PATHSEG_LINETO_ABS DontDelete|ReadOnly
+ PATHSEG_LINETO_REL KSVG::PATHSEG_LINETO_REL DontDelete|ReadOnly
+ PATHSEG_CURVETO_CUBIC_ABS KSVG::PATHSEG_CURVETO_CUBIC_ABS DontDelete|ReadOnly
+ PATHSEG_CURVETO_CUBIC_REL KSVG::PATHSEG_CURVETO_CUBIC_REL DontDelete|ReadOnly
+ PATHSEG_CURVETO_QUADRATIC_ABS KSVG::PATHSEG_CURVETO_QUADRATIC_ABS DontDelete|ReadOnly
+ PATHSEG_CURVETO_QUADRATIC_REL KSVG::PATHSEG_CURVETO_QUADRATIC_REL DontDelete|ReadOnly
+ PATHSEG_ARC_ABS KSVG::PATHSEG_ARC_ABS DontDelete|ReadOnly
+ PATHSEG_ARC_REL KSVG::PATHSEG_ARC_REL DontDelete|ReadOnly
+ PATHSEG_LINETO_HORIZONTAL_ABS KSVG::PATHSEG_LINETO_HORIZONTAL_ABS DontDelete|ReadOnly
+ PATHSEG_LINETO_HORIZONTAL_REL KSVG::PATHSEG_LINETO_HORIZONTAL_REL DontDelete|ReadOnly
+ PATHSEG_LINETO_VERTICAL_ABS KSVG::PATHSEG_LINETO_VERTICAL_ABS DontDelete|ReadOnly
+ PATHSEG_LINETO_VERTICAL_REL KSVG::PATHSEG_LINETO_VERTICAL_REL DontDelete|ReadOnly
+ PATHSEG_CURVETO_CUBIC_SMOOTH_ABS KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS DontDelete|ReadOnly
+ PATHSEG_CURVETO_CUBIC_SMOOTH_REL KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_REL DontDelete|ReadOnly
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS DontDelete|ReadOnly
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL DontDelete|ReadOnly
+@end
+*/
+
+Value SVGPathSegImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGPathSegImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGPathSegImplConstructor>(exec, "[[svgpathseg.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegImpl.h b/ksvg/impl/SVGPathSegImpl.h
new file mode 100644
index 00000000..64d8b5b0
--- /dev/null
+++ b/ksvg/impl/SVGPathSegImpl.h
@@ -0,0 +1,75 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegImpl_H
+#define SVGPathSegImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSeg.h"
+
+namespace KSVG
+{
+
+class SVGPathElementImpl;
+class SVGPathSegImpl : public DOM::DomShared
+{
+public:
+ SVGPathSegImpl();
+ virtual ~SVGPathSegImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_UNKNOWN; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return ""; }
+ virtual QString toString() const { return ""; }
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+public:
+ KSVG_BASECLASS_GET
+
+ enum
+ {
+ // Properties
+ PathSegType, PathSegTypeAsLetter
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+};
+
+class SVGPathSegImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGPathSegImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGPathSegImplConstructor(KJS::ExecState *exec);
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.cc b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.cc
new file mode 100644
index 00000000..e36e49de
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.cc
@@ -0,0 +1,167 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegLinetoHorizontalImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegLinetoHorizontalImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegLinetoHorizontalAbsImpl::SVGPathSegLinetoHorizontalAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoHorizontalAbsImpl::~SVGPathSegLinetoHorizontalAbsImpl()
+{
+}
+
+void SVGPathSegLinetoHorizontalAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegLinetoHorizontalAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegLinetoHorizontalAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(cury);
+ double dx = x() - curx;
+ double dy = 0;
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoHorizontalAbsImpl::s_hashTable 2
+ x SVGPathSegLinetoHorizontalAbsImpl::X DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoHorizontalAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoHorizontalAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+
+
+SVGPathSegLinetoHorizontalRelImpl::SVGPathSegLinetoHorizontalRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoHorizontalRelImpl::~SVGPathSegLinetoHorizontalRelImpl()
+{
+}
+
+void SVGPathSegLinetoHorizontalRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegLinetoHorizontalRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegLinetoHorizontalRelImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = x();
+ double dy = 0;
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoHorizontalRelImpl::s_hashTable 2
+ x SVGPathSegLinetoHorizontalRelImpl::X DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoHorizontalRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoHorizontalRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h
new file mode 100644
index 00000000..020d29d7
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLinetoHorizontalImpl_H
+#define SVGPathSegLinetoHorizontalImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoHorizontalAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoHorizontalAbsImpl();
+ virtual ~SVGPathSegLinetoHorizontalAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "H"; }
+ virtual QString toString() const { return QString("H %1").arg(m_x); }
+
+ void setX(const double &);
+ double x() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegLinetoHorizontalRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoHorizontalRelImpl();
+ virtual ~SVGPathSegLinetoHorizontalRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "h"; }
+ virtual QString toString() const { return QString("h %1").arg(m_x); }
+
+ void setX(const double &);
+ double x() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoImpl.cc b/ksvg/impl/SVGPathSegLinetoImpl.cc
new file mode 100644
index 00000000..04203352
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoImpl.cc
@@ -0,0 +1,196 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegLinetoImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegLinetoImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegLinetoAbsImpl::SVGPathSegLinetoAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoAbsImpl::~SVGPathSegLinetoAbsImpl()
+{
+}
+
+void SVGPathSegLinetoAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegLinetoAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegLinetoAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegLinetoAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegLinetoAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoAbsImpl::s_hashTable 3
+ x SVGPathSegLinetoAbsImpl::X DontDelete
+ y SVGPathSegLinetoAbsImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegLinetoRelImpl::SVGPathSegLinetoRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoRelImpl::~SVGPathSegLinetoRelImpl()
+{
+}
+
+void SVGPathSegLinetoRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegLinetoRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegLinetoRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegLinetoRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegLinetoRelImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = x();
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoRelImpl::s_hashTable 3
+ x SVGPathSegLinetoRelImpl::X DontDelete
+ y SVGPathSegLinetoRelImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoImpl.h b/ksvg/impl/SVGPathSegLinetoImpl.h
new file mode 100644
index 00000000..3e315022
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoImpl.h
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLinetoImpl_H
+#define SVGPathSegLinetoImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoAbsImpl();
+ virtual ~SVGPathSegLinetoAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "L"; }
+ virtual QString toString() const { return QString("L %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegLinetoRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoRelImpl();
+ virtual ~SVGPathSegLinetoRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "l"; }
+ virtual QString toString() const { return QString("l %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoVerticalImpl.cc b/ksvg/impl/SVGPathSegLinetoVerticalImpl.cc
new file mode 100644
index 00000000..0eca1280
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoVerticalImpl.cc
@@ -0,0 +1,165 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegLinetoVerticalImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegLinetoVerticalImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegLinetoVerticalAbsImpl::SVGPathSegLinetoVerticalAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoVerticalAbsImpl::~SVGPathSegLinetoVerticalAbsImpl()
+{
+}
+
+void SVGPathSegLinetoVerticalAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegLinetoVerticalAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegLinetoVerticalAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(curx);
+ double dx = 0;
+ double dy = y() - cury;
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoVerticalAbsImpl::s_hashTable 2
+ y SVGPathSegLinetoVerticalAbsImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoVerticalAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoVerticalAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegLinetoVerticalRelImpl::SVGPathSegLinetoVerticalRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegLinetoVerticalRelImpl::~SVGPathSegLinetoVerticalRelImpl()
+{
+}
+
+void SVGPathSegLinetoVerticalRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegLinetoVerticalRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegLinetoVerticalRelImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = 0;
+ double dy = y();
+ double startSlope = SVGAngleImpl::todeg(atan2(dy, dx));
+ double endSlope = startSlope;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegLinetoVerticalRelImpl::s_hashTable 2
+ y SVGPathSegLinetoVerticalRelImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegLinetoVerticalRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegLinetoVerticalRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegLinetoVerticalImpl.h b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h
new file mode 100644
index 00000000..c50906d9
--- /dev/null
+++ b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegLinetoVerticalImpl_H
+#define SVGPathSegLinetoVerticalImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegLinetoVerticalAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoVerticalAbsImpl();
+ virtual~SVGPathSegLinetoVerticalAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "V"; }
+ virtual QString toString() const { return QString("V %1").arg(m_y); }
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegLinetoVerticalRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegLinetoVerticalRelImpl();
+ virtual ~SVGPathSegLinetoVerticalRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "v"; }
+ virtual QString toString() const { return QString("v %1").arg(m_y); }
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegListImpl.cc b/ksvg/impl/SVGPathSegListImpl.cc
new file mode 100644
index 00000000..ee316938
--- /dev/null
+++ b/ksvg/impl/SVGPathSegListImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGPathSegListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGPathSegList", SVGPathSegListImplProto, SVGPathSegListImplProtoFunc)
+
+Value SVGPathSegListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SVGPathSegImpl>::getValueProperty(exec, token);
+}
+
+Value SVGPathSegListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGPathSegListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SVGPathSegImpl> *>(obj), args, id);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegListImpl.h b/ksvg/impl/SVGPathSegListImpl.h
new file mode 100644
index 00000000..ef9c8c6e
--- /dev/null
+++ b/ksvg/impl/SVGPathSegListImpl.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegListImpl_H
+#define SVGPathSegListImpl_H
+
+#include "SVGList.h"
+
+#include "SVGPathSegImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGPathSegListImpl : public SVGList<SVGPathSegImpl>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGPathSegListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGPathSegListImplProtoFunc, SVGPathSegListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegMovetoImpl.cc b/ksvg/impl/SVGPathSegMovetoImpl.cc
new file mode 100644
index 00000000..2eb64b41
--- /dev/null
+++ b/ksvg/impl/SVGPathSegMovetoImpl.cc
@@ -0,0 +1,196 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPathSegMovetoImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPathSegMovetoImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGPathSegMovetoAbsImpl::SVGPathSegMovetoAbsImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegMovetoAbsImpl::~SVGPathSegMovetoAbsImpl()
+{
+}
+
+void SVGPathSegMovetoAbsImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegMovetoAbsImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegMovetoAbsImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegMovetoAbsImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegMovetoAbsImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ double dx = x() - curx;
+ double dy = y() - cury;
+ double startSlope = 0;
+ double endSlope = 0;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegMovetoAbsImpl::s_hashTable 3
+ x SVGPathSegMovetoAbsImpl::X DontDelete
+ y SVGPathSegMovetoAbsImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegMovetoAbsImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegMovetoAbsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+
+
+SVGPathSegMovetoRelImpl::SVGPathSegMovetoRelImpl() : SVGPathSegImpl()
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGPathSegMovetoRelImpl::~SVGPathSegMovetoRelImpl()
+{
+}
+
+void SVGPathSegMovetoRelImpl::setX(const double &x)
+{
+ m_x = x;
+}
+
+double SVGPathSegMovetoRelImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPathSegMovetoRelImpl::setY(const double &y)
+{
+ m_y = y;
+}
+
+double SVGPathSegMovetoRelImpl::y() const
+{
+ return m_y;
+}
+
+void SVGPathSegMovetoRelImpl::getDeltasAndSlopes(double curx, double cury, double *pdx, double *pdy, double *pstartSlope, double *pendSlope) const
+{
+ Q_UNUSED(curx);
+ Q_UNUSED(cury);
+ double dx = x();
+ double dy = y();
+ double startSlope = 0;
+ double endSlope = 0;
+ *pdx = dx;
+ *pdy = dy;
+ *pstartSlope = startSlope;
+ *pendSlope = endSlope;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPathSegMovetoRelImpl::s_hashTable 3
+ x SVGPathSegMovetoRelImpl::X DontDelete
+ y SVGPathSegMovetoRelImpl::Y DontDelete
+@end
+*/
+
+Value SVGPathSegMovetoRelImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPathSegMovetoRelImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPathSegMovetoImpl.h b/ksvg/impl/SVGPathSegMovetoImpl.h
new file mode 100644
index 00000000..dfbad355
--- /dev/null
+++ b/ksvg/impl/SVGPathSegMovetoImpl.h
@@ -0,0 +1,107 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPathSegMovetoImpl_H
+#define SVGPathSegMovetoImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPathSegImpl.h"
+
+namespace KSVG
+{
+
+class SVGPathSegMovetoAbsImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegMovetoAbsImpl();
+ virtual ~SVGPathSegMovetoAbsImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "M"; }
+ virtual QString toString() const { return QString("M %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPathSegMovetoRelImpl : public SVGPathSegImpl
+{
+public:
+ SVGPathSegMovetoRelImpl();
+ virtual ~SVGPathSegMovetoRelImpl();
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
+ virtual DOM::DOMString pathSegTypeAsLetter() const { return "m"; }
+ virtual QString toString() const { return QString("m %1 %2").arg(m_x).arg(m_y); }
+
+ void setX(const double &);
+ double x() const;
+
+ void setY(const double &);
+ double y() const;
+
+ virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
+
+private:
+ double m_x;
+ double m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPatternElementImpl.cc b/ksvg/impl/SVGPatternElementImpl.cc
new file mode 100644
index 00000000..0b591487
--- /dev/null
+++ b/ksvg/impl/SVGPatternElementImpl.cc
@@ -0,0 +1,509 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "SVGPatternElement.h"
+#include "SVGPatternElementImpl.h"
+
+#include "CanvasFactory.h"
+#include "KSVGCanvas.h"
+#include "CanvasItems.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGUnitConverter.h"
+#include "SVGShapeImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGRectImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPatternElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+QValueList<SVGPatternElementImpl *> SVGPatternElementImpl::m_patternElements;
+
+SVGPatternElementImpl::SVGPatternElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGFitToViewBoxImpl(), SVGPaintServerImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_patternUnits = new SVGAnimatedEnumerationImpl();
+ m_patternUnits->ref();
+
+ m_patternContentUnits = new SVGAnimatedEnumerationImpl();
+ m_patternContentUnits->ref();
+
+ m_patternTransform = new SVGAnimatedTransformListImpl();
+ m_patternTransform->ref();
+
+ m_x = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+
+ m_converter = new SVGUnitConverter();
+ m_converter->add(m_x);
+ m_converter->add(m_y);
+ m_converter->add(m_width);
+ m_converter->add(m_height);
+
+ m_patternElements.append(this);
+
+ m_canvas = 0;
+ m_location = this;
+
+ m_tileCache.setMaxTotalCost(1024 * 1024);
+}
+
+SVGPatternElementImpl::~SVGPatternElementImpl()
+{
+ if(m_patternUnits)
+ m_patternUnits->deref();
+ if(m_patternContentUnits)
+ m_patternContentUnits->deref();
+ if(m_patternTransform)
+ m_patternTransform->deref();
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ delete m_converter;
+ m_patternElements.remove(this);
+}
+
+SVGAnimatedEnumerationImpl *SVGPatternElementImpl::patternUnits() const
+{
+ return m_patternUnits;
+}
+
+SVGAnimatedEnumerationImpl *SVGPatternElementImpl::patternContentUnits() const
+{
+ return m_patternContentUnits;
+}
+
+SVGAnimatedTransformListImpl *SVGPatternElementImpl::patternTransform() const
+{
+ return m_patternTransform;
+}
+
+SVGAnimatedLengthImpl *SVGPatternElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGPatternElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGPatternElementImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGPatternElementImpl::height() const
+{
+ return m_height;
+}
+
+void SVGPatternElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_paintServer)
+ m_paintServer = c->createPaintServer(this);
+}
+
+void SVGPatternElementImpl::removeItem(KSVGCanvas *)
+{
+ delete m_paintServer;
+ m_paintServer = 0;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPatternElementImpl::s_hashTable 11
+ x SVGPatternElementImpl::X DontDelete|ReadOnly
+ y SVGPatternElementImpl::Y DontDelete|ReadOnly
+ width SVGPatternElementImpl::Width DontDelete|ReadOnly
+ height SVGPatternElementImpl::Height DontDelete|ReadOnly
+ patternUnits SVGPatternElementImpl::PatternUnits DontDelete|ReadOnly
+ patternContentUnits SVGPatternElementImpl::PatternContentUnits DontDelete|ReadOnly
+ patternTransform SVGPatternElementImpl::PatternTransform DontDelete|ReadOnly
+@end
+*/
+
+Value SVGPatternElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ case PatternUnits:
+ if(!attributeMode)
+ return m_patternUnits->cache(exec);
+ else
+ return Number(m_patternUnits->baseVal());
+ case PatternContentUnits:
+ if(!attributeMode)
+ return m_patternContentUnits->cache(exec);
+ else
+ return Number(m_patternContentUnits->baseVal());
+ case PatternTransform:
+ //if(!attributeMode)
+ return m_patternTransform->cache(exec);
+ //else
+ // return Number(m_patternTransform->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPatternElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ converter()->modify(x(), value.toString(exec).qstring());
+ break;
+ case Y:
+ converter()->modify(y(), value.toString(exec).qstring());
+ break;
+ case Width:
+ converter()->modify(width(), value.toString(exec).qstring());
+ if(width()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute width of element <pattern> is illegal"));
+ break;
+ case Height:
+ converter()->modify(height(), value.toString(exec).qstring());
+ if(height()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute height of element <pattern> is illegal"));
+ break;
+ case PatternUnits:
+ if(value.toString(exec).qstring() == "userSpaceOnUse")
+ m_patternUnits->setBaseVal(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
+ else
+ m_patternUnits->setBaseVal(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ break;
+ case PatternContentUnits:
+ if(value.toString(exec).qstring() == "userSpaceOnUse")
+ m_patternContentUnits->setBaseVal(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
+ else
+ m_patternContentUnits->setBaseVal(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+ break;
+ case PatternTransform:
+ m_patternTransform->baseVal()->clear();
+ SVGHelperImpl::parseTransformAttribute(m_patternTransform->baseVal(), value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGPatternElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if attribute not specified, use a value of 0
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "0")
+
+ // Spec: if attribute not specified, use a value of 0
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "0")
+
+ // Spec: if attribute not specified, use objectBoundingBox
+ if(KSVG_TOKEN_NOT_PARSED(PatternUnits))
+ KSVG_SET_ALT_ATTRIBUTE(PatternUnits, "objectBoundingBox")
+
+ // Spec: If attribute not specified, use userSpaceOnUse
+ if(KSVG_TOKEN_NOT_PARSED(PatternContentUnits))
+ KSVG_SET_ALT_ATTRIBUTE(PatternContentUnits, "userSpaceOnUse")
+
+ // Spec: default value
+ if(KSVG_TOKEN_NOT_PARSED(PreserveAspectRatio))
+ KSVG_SET_ALT_ATTRIBUTE(PreserveAspectRatio, "xMidYMid meet")
+}
+
+void SVGPatternElementImpl::flushCachedTiles()
+{
+ QValueList<SVGPatternElementImpl *>::iterator it;
+
+ for(it = m_patternElements.begin(); it != m_patternElements.end(); it++)
+ {
+ SVGPatternElementImpl *pattern = *it;
+
+ if(pattern->paintServer())
+ pattern->paintServer()->resetFinalized();
+ }
+}
+
+QImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight)
+{
+ converter()->finalize(referencingElement, ownerSVGElement(), patternUnits()->baseVal());
+
+ QImage image(imageWidth, imageHeight, 32);
+ image.setAlphaBuffer(true);
+
+ if(m_canvas == 0)
+ {
+ m_canvas = CanvasFactory::self()->loadCanvas(image.width(), image.height());
+ m_canvas->setBackgroundColor(qRgba(0, 0, 0, 0));
+ }
+
+ m_canvas->setup(image.bits(), image.width(), image.height());
+
+ SVGMatrixImpl *baseMatrix = SVGSVGElementImpl::createSVGMatrix();
+
+ // Set the scale to map the tile onto the integral sized image
+ double xScale = static_cast<double>(imageWidth) / width()->baseVal()->value();
+ double yScale = static_cast<double>(imageHeight) / height()->baseVal()->value();
+
+ baseMatrix->scaleNonUniform(xScale, yScale);
+
+ if(hasAttribute("viewBox"))
+ {
+ SVGMatrixImpl *viewboxMatrix = viewBoxToViewTransform(width()->baseVal()->value(), height()->baseVal()->value());
+
+ baseMatrix->multiply(viewboxMatrix);
+ viewboxMatrix->deref();
+ }
+ else
+ {
+ if(patternContentUnits()->baseVal() == SVGPatternElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ {
+ // Get local coordinate bounding box
+ SVGRectImpl *rect = referencingElement->getBBox();
+
+ baseMatrix->translate(rect->qrect().x(), rect->qrect().y());
+ baseMatrix->scaleNonUniform(rect->qrect().width(), rect->qrect().height());
+ rect->deref();
+ }
+ }
+
+ for(DOM::Node node = m_location->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+ if(element && shape && style && ok && style->getVisible() && style->getDisplay())
+ {
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element);
+ if(locatable)
+ locatable->updateCachedScreenCTM(baseMatrix);
+
+ element->createItem(m_canvas);
+ if(shape->item())
+ {
+ shape->item()->setReferenced(true);
+ m_canvas->invalidate(shape->item(), true);
+ }
+ }
+ }
+
+ baseMatrix->deref();
+
+ m_canvas->update(float(1));
+
+ if(getOverflow())
+ {
+ QPtrList<CanvasItem> items = m_canvas->allItems();
+ QRect allItemsBBox;
+
+ QPtrListIterator<CanvasItem> it(items);
+ CanvasItem *item;
+
+ while((item = *it) != 0)
+ {
+ QRect bbox = item->bbox();
+ allItemsBBox |= bbox;
+ ++it;
+ }
+
+ if(allItemsBBox.left() < 0 || allItemsBBox.right() >= imageWidth || allItemsBBox.top() < 0 || allItemsBBox.bottom() >= imageHeight)
+ {
+ // Get the range in whole-tile units that covers the bounding box, where (0, 0) is the
+ // usual tile position.
+ int tileLeft = (allItemsBBox.left() - (imageWidth - 1)) / imageWidth;
+ int tileRight = allItemsBBox.right() / imageWidth;
+ int tileTop = (allItemsBBox.top() - (imageHeight - 1)) / imageHeight;
+ int tileBottom = allItemsBBox.bottom() / imageHeight;
+
+ for(int tileX = tileLeft; tileX <= tileRight; tileX++)
+ {
+ for(int tileY = tileTop; tileY <= tileBottom; tileY++)
+ {
+ if(tileX != 0 || tileY !=0)
+ {
+ QPoint panPoint(-(tileX * imageWidth), -(tileY * imageHeight));
+ m_canvas->update(panPoint, false);
+ }
+ }
+ }
+ }
+ }
+
+ for(DOM::Node node = m_location->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+
+ if(element)
+ element->removeItem(m_canvas);
+ }
+
+ return image;
+}
+
+void SVGPatternElementImpl::reference(const QString &href)
+{
+ // Copy attributes
+ SVGElementImpl *src = ownerSVGElement()->getElementById(href);
+
+ if(src)
+ {
+ SVGHelperImpl::copyAttributes(src, this);
+
+ // Spec: Change location to referenced element so we
+ // can take the children elements to render from there
+ if(m_location == this)
+ m_location = src;
+ }
+}
+
+void SVGPatternElementImpl::finalizePaintServer()
+{
+ // Clear out any cached tiles since we may be being refinalised after an image
+ // inside a pattern has finished loading.
+ m_tileCache.clear();
+
+ QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+ if(!_href.isEmpty())
+ reference(_href);
+}
+
+SVGPatternElementImpl::Tile SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement)
+{
+ converter()->finalize(referencingElement, ownerSVGElement(), patternUnits()->baseVal());
+
+ SVGTransformableImpl *transformable = dynamic_cast<SVGTransformableImpl *>(referencingElement);
+ SVGMatrixImpl *matrix = 0;
+ if(transformable)
+ matrix = transformable->getScreenCTM();
+ else
+ matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ matrix->translate(x()->baseVal()->value(), y()->baseVal()->value());
+
+ SVGMatrixImpl *patTransform = patternTransform()->baseVal()->concatenate();
+ if(patTransform)
+ {
+ matrix->multiply(patTransform);
+ patTransform->deref();
+ }
+
+ double xScale, yScale;
+ matrix->removeScale(&xScale, &yScale);
+
+ double tileWidth = width()->baseVal()->value() * xScale;
+ double tileHeight = height()->baseVal()->value() * yScale;
+
+ int imageWidth = static_cast<int>(tileWidth + 0.5);
+ int imageHeight = static_cast<int>(tileHeight + 0.5);
+
+ Tile tile;
+
+ if(imageWidth > 0 && imageHeight > 0)
+ {
+ QSize size(imageWidth, imageHeight);
+ QImage image;
+
+ if(!m_tileCache.find(size, image))
+ {
+ image = createTile(referencingElement, imageWidth, imageHeight);
+ m_tileCache.insert(size, image, image.width() * image.height() * 4);
+ }
+
+ // Map integral tile dimensions onto its true size
+ double adjustXScale = tileWidth / imageWidth;
+ double adjustYScale = tileHeight / imageHeight;
+
+ matrix->scaleNonUniform(adjustXScale, adjustYScale);
+ QWMatrix screenToTile = matrix->qmatrix().invert();
+
+ tile = Tile(image, screenToTile);
+ }
+
+ matrix->deref();
+
+ return tile;
+}
+
diff --git a/ksvg/impl/SVGPatternElementImpl.h b/ksvg/impl/SVGPatternElementImpl.h
new file mode 100644
index 00000000..612fcfae
--- /dev/null
+++ b/ksvg/impl/SVGPatternElementImpl.h
@@ -0,0 +1,136 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPatternElementImpl_H
+#define SVGPatternElementImpl_H
+
+#include <qimage.h>
+#include <qwmatrix.h>
+
+#include "SVGTestsImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+#include "SVGPaintServerImpl.h"
+#include "LRUCache.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGUnitConverter;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGAnimatedTransformListImpl;
+class SVGShapeImpl;
+class SVGPatternElementImpl : public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGFitToViewBoxImpl,
+ public SVGPaintServerImpl
+{
+public:
+ SVGPatternElementImpl(DOM::ElementImpl *);
+ virtual ~SVGPatternElementImpl();
+
+ SVGAnimatedEnumerationImpl *patternUnits() const;
+ SVGAnimatedEnumerationImpl *patternContentUnits() const;
+ SVGAnimatedTransformListImpl *patternTransform() const;
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+
+ virtual void setAttributes();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void removeItem(KSVGCanvas *c);
+
+ SVGUnitConverter *converter() const { return m_converter; }
+
+ void reference(const QString &href);
+ void finalizePaintServer();
+
+ class Tile
+ {
+ public:
+ Tile() {}
+ Tile(const QImage& image, const QWMatrix& screenToTile) : m_image(image), m_screenToTile(screenToTile) {}
+
+ QImage image() const { return m_image; }
+ const QWMatrix& screenToTile() const { return m_screenToTile; }
+
+ private:
+ QImage m_image;
+ QWMatrix m_screenToTile;
+ };
+
+ Tile createTile(SVGShapeImpl *referencingElement);
+
+ static void flushCachedTiles();
+
+private:
+ QImage createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight);
+
+ SVGAnimatedEnumerationImpl *m_patternUnits;
+ SVGAnimatedEnumerationImpl *m_patternContentUnits;
+ SVGAnimatedTransformListImpl *m_patternTransform;
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+ SVGUnitConverter *m_converter;
+
+ KSVGCanvas *m_canvas;
+ SVGElementImpl *m_location; // the referenced element
+ MinOneLRUCache<QSize, QImage> m_tileCache;
+
+ static QValueList<SVGPatternElementImpl *> m_patternElements;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height, PatternUnits, PatternContentUnits, PatternTransform
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGPatternElementImpl, "pattern")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPointImpl.cc b/ksvg/impl/SVGPointImpl.cc
new file mode 100644
index 00000000..c3697f58
--- /dev/null
+++ b/ksvg/impl/SVGPointImpl.cc
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPointImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPointImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGPointImpl::SVGPointImpl() : DOM::DomShared()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = 0;
+ m_y = 0;
+}
+
+SVGPointImpl::~SVGPointImpl()
+{
+}
+
+void SVGPointImpl::setX(float x)
+{
+ m_x = x;
+}
+
+float SVGPointImpl::x() const
+{
+ return m_x;
+}
+
+void SVGPointImpl::setY(float y)
+{
+ m_y = y;
+}
+
+float SVGPointImpl::y() const
+{
+ return m_y;
+}
+
+SVGPointImpl *SVGPointImpl::matrixTransform(const SVGMatrixImpl &)
+{
+ SVGPointImpl *ret = SVGSVGElementImpl::createSVGPoint();
+ return ret;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPointImpl::s_hashTable 3
+ x SVGPointImpl::X DontDelete
+ y SVGPointImpl::Y DontDelete
+@end
+*/
+
+Value SVGPointImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(x());
+ case Y:
+ return Number(y());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGPointImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPointImpl.h b/ksvg/impl/SVGPointImpl.h
new file mode 100644
index 00000000..55132cf3
--- /dev/null
+++ b/ksvg/impl/SVGPointImpl.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPointImpl_H
+#define SVGPointImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGMatrixImpl;
+class SVGPointImpl : public DOM::DomShared
+{
+public:
+ SVGPointImpl();
+ virtual ~SVGPointImpl();
+
+ void setX(float x);
+ float x() const;
+
+ void setY(float y);
+ float y() const;
+
+ SVGPointImpl *matrixTransform(const SVGMatrixImpl &matrix);
+
+private:
+ float m_x;
+ float m_y;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
diff --git a/ksvg/impl/SVGPointListImpl.cc b/ksvg/impl/SVGPointListImpl.cc
new file mode 100644
index 00000000..34574b60
--- /dev/null
+++ b/ksvg/impl/SVGPointListImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPointListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPointListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPointListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGPointListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGPointList", SVGPointListImplProto, SVGPointListImplProtoFunc)
+
+Value SVGPointListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SVGPointImpl>::getValueProperty(exec, token);
+}
+
+Value SVGPointListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGPointListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SVGPointImpl> *>(obj), args, id);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPointListImpl.h b/ksvg/impl/SVGPointListImpl.h
new file mode 100644
index 00000000..61d93731
--- /dev/null
+++ b/ksvg/impl/SVGPointListImpl.h
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPointListImpl_H
+#define SVGPointListImpl_H
+
+#include "SVGList.h"
+
+#include "SVGPointImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGPointListImpl : public SVGList<SVGPointImpl>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGPointListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGPointListImplProtoFunc, SVGPointListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolyElementImpl.cc b/ksvg/impl/SVGPolyElementImpl.cc
new file mode 100644
index 00000000..69ef57cd
--- /dev/null
+++ b/ksvg/impl/SVGPolyElementImpl.cc
@@ -0,0 +1,141 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include <cfloat>
+
+#include <kdebug.h>
+
+#include "SVGRectImpl.h"
+#include "SVGPointListImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPolyElementImpl.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+SVGPolyElementImpl::SVGPolyElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl(), SVGAnimatedPointsImpl()
+{
+}
+
+SVGPolyElementImpl::~SVGPolyElementImpl()
+{
+}
+
+SVGRectImpl *SVGPolyElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+
+ unsigned int nrPoints = points()->numberOfItems();
+ float minx, miny, maxx, maxy, tempx, tempy;
+ minx = points()->getItem(0)->x();
+ miny = points()->getItem(0)->y();
+ maxx = points()->getItem(0)->x();
+ maxy = points()->getItem(0)->y();
+
+ for(unsigned int i = 1; i < nrPoints; ++i)
+ {
+ tempx = points()->getItem(i)->x();
+ tempy = points()->getItem(i)->y();
+
+ if(tempx < minx)
+ minx = tempx;
+ if(tempx > maxx)
+ maxx = tempx;
+ if(tempy < miny)
+ miny = tempy;
+ if(tempy > maxy)
+ maxy = tempy;
+ }
+
+ ret->setX(minx);
+ ret->setY(miny);
+ ret->setWidth(maxx - minx);
+ ret->setHeight(maxy - miny);
+ return ret;
+}
+
+bool SVGPolyElementImpl::findOutSlope(unsigned int point, double *outSlope) const
+{
+ unsigned int nextPoint;
+
+ if(point == points()->numberOfItems() - 1)
+ {
+ if(m_isOpenPath)
+ return false;
+ else
+ nextPoint = 0;
+ }
+ else
+ nextPoint = point + 1;
+
+ if(point == nextPoint)
+ return false;
+
+ double x = points()->getItem(point)->x();
+ double y = points()->getItem(point)->y();
+ double nextX = points()->getItem(nextPoint)->x();
+ double nextY = points()->getItem(nextPoint)->y();
+ const double epsilon = DBL_EPSILON;
+
+ if(fabs(x - nextX) < epsilon && fabs(y - nextY) < epsilon)
+ return findOutSlope(nextPoint, outSlope);
+ else
+ {
+ double slope = SVGAngleImpl::todeg(atan2(nextY - y, nextX - x));
+ *outSlope = slope;
+ return true;
+ }
+}
+
+bool SVGPolyElementImpl::findInSlope(unsigned int point, double *inSlope) const
+{
+ unsigned int prevPoint;
+
+ if(point == 0)
+ {
+ if(m_isOpenPath)
+ return false;
+ else
+ prevPoint = points()->numberOfItems() - 1;
+ }
+ else
+ prevPoint = point - 1;
+
+ if(point == prevPoint)
+ return false;
+
+ double x = points()->getItem(point)->x();
+ double y = points()->getItem(point)->y();
+ double prevX = points()->getItem(prevPoint)->x();
+ double prevY = points()->getItem(prevPoint)->y();
+ const double epsilon = DBL_EPSILON;
+
+ if(fabs(x - prevX) < epsilon && fabs(y - prevY) < epsilon)
+ return findInSlope(prevPoint, inSlope);
+ else
+ {
+ double slope = SVGAngleImpl::todeg(atan2(y - prevY, x - prevX));
+ *inSlope = slope;
+ return true;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolyElementImpl.h b/ksvg/impl/SVGPolyElementImpl.h
new file mode 100644
index 00000000..ded41d0c
--- /dev/null
+++ b/ksvg/impl/SVGPolyElementImpl.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPolyElementImpl_H
+#define SVGPolyElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGAnimatedPointsImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGPointListImpl;
+class SVGPolyElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl,
+ public SVGAnimatedPointsImpl
+{
+public:
+ SVGPolyElementImpl(DOM::ElementImpl *);
+ virtual ~SVGPolyElementImpl();
+
+ virtual SVGRectImpl *getBBox();
+
+ virtual void drawMarkers() = 0;
+
+protected:
+ bool findOutSlope(unsigned int point, double *outSlope) const;
+ bool findInSlope(unsigned int point, double *inSlope) const;
+
+ bool m_isOpenPath;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+ KSVG_NO_TAG_BRIDGE
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolygonElementImpl.cc b/ksvg/impl/SVGPolygonElementImpl.cc
new file mode 100644
index 00000000..bf38ff37
--- /dev/null
+++ b/ksvg/impl/SVGPolygonElementImpl.cc
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPointListImpl.h"
+#include "SVGPolygonElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "KSVGCanvas.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+SVGPolygonElementImpl::SVGPolygonElementImpl(DOM::ElementImpl *impl) : SVGPolyElementImpl(impl)
+{
+ m_isOpenPath = false;
+}
+
+void SVGPolygonElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createPolygon(this);
+ c->insert(m_item);
+ }
+}
+
+void SVGPolygonElementImpl::drawMarkers()
+{
+ SVGPointListImpl *pts = points();
+ unsigned int nrPoints = pts->numberOfItems();
+
+ if(nrPoints > 0 && hasMarkers())
+ {
+ for(unsigned int i = 0; i < nrPoints; ++i)
+ {
+ double inSlope;
+ double outSlope;
+ bool haveInSlope = findInSlope(i, &inSlope);
+ bool haveOutSlope = findOutSlope(i, &outSlope);
+
+ if(!haveInSlope && haveOutSlope)
+ inSlope = outSlope;
+ else if(haveInSlope && !haveOutSlope)
+ outSlope = inSlope;
+ else if(!haveInSlope && !haveOutSlope)
+ {
+ inSlope = 0;
+ outSlope = 0;
+ }
+
+ double bisector = SVGAngleImpl::shortestArcBisector(inSlope, outSlope);
+
+ if(i == 0)
+ {
+ if(hasStartMarker())
+ doStartMarker(this, this, pts->getItem(i)->x(), pts->getItem(i)->y(), bisector);
+ if(hasEndMarker())
+ doEndMarker(this, this, pts->getItem(i)->x(), pts->getItem(i)->y(), bisector);
+ }
+ else
+ {
+ if(hasMidMarker())
+ doMidMarker(this, this, pts->getItem(i)->x(), pts->getItem(i)->y(), bisector);
+ }
+ }
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolygonElementImpl.h b/ksvg/impl/SVGPolygonElementImpl.h
new file mode 100644
index 00000000..1c7e8c3b
--- /dev/null
+++ b/ksvg/impl/SVGPolygonElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPolygonElementImpl_H
+#define SVGPolygonElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPolyElementImpl.h"
+#include "CanvasItems.h"
+
+namespace KSVG
+{
+
+class SVGPolygonElementImpl : public SVGPolyElementImpl, public MarkerHelper
+{
+public:
+ SVGPolygonElementImpl(DOM::ElementImpl *);
+ virtual ~SVGPolygonElementImpl() { }
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+ virtual void drawMarkers();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGPolygonElementImpl, "polygon")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolylineElementImpl.cc b/ksvg/impl/SVGPolylineElementImpl.cc
new file mode 100644
index 00000000..9c95a928
--- /dev/null
+++ b/ksvg/impl/SVGPolylineElementImpl.cc
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGPointListImpl.h"
+#include "SVGPolylineElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "KSVGCanvas.h"
+#include "SVGAngleImpl.h"
+
+using namespace KSVG;
+
+SVGPolylineElementImpl::SVGPolylineElementImpl(DOM::ElementImpl *impl) : SVGPolyElementImpl(impl)
+{
+ m_isOpenPath = true;
+}
+
+void SVGPolylineElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createPolyline(this);
+ c->insert(m_item);
+ }
+}
+
+void SVGPolylineElementImpl::drawMarkers()
+{
+ SVGPointListImpl *pts = points();
+ unsigned int nrPoints = pts->numberOfItems();
+
+ if(nrPoints > 0 && hasMarkers())
+ {
+ if(hasStartMarker())
+ {
+ double outSlope;
+
+ if(!findOutSlope(0, &outSlope))
+ outSlope = 0;
+
+ doStartMarker(this, this, pts->getItem(0)->x(), pts->getItem(0)->y(), outSlope);
+ }
+
+ if(hasMidMarker())
+ {
+ for(unsigned int i = 1; i < nrPoints - 1; ++i)
+ {
+ double inSlope;
+ double outSlope;
+ bool haveInSlope = findInSlope(i, &inSlope);
+ bool haveOutSlope = findOutSlope(i, &outSlope);
+
+ if(!haveInSlope && haveOutSlope)
+ inSlope = outSlope;
+ else if(haveInSlope && !haveOutSlope)
+ outSlope = inSlope;
+ else if(!haveInSlope && !haveOutSlope)
+ {
+ inSlope = 0;
+ outSlope = 0;
+ }
+
+ double bisector = SVGAngleImpl::shortestArcBisector(inSlope, outSlope);
+
+ doMidMarker(this, this, pts->getItem(i)->x(), pts->getItem(i)->y(), bisector);
+ }
+ }
+
+ if(hasEndMarker())
+ {
+ double inSlope;
+
+ if(!findInSlope(nrPoints - 1, &inSlope))
+ inSlope = 0;
+
+ doEndMarker(this, this, pts->getItem(nrPoints - 1)->x(), pts->getItem(nrPoints - 1)->y(), inSlope);
+ }
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPolylineElementImpl.h b/ksvg/impl/SVGPolylineElementImpl.h
new file mode 100644
index 00000000..c6ea5885
--- /dev/null
+++ b/ksvg/impl/SVGPolylineElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPolylineElementImpl_H
+#define SVGPolylineElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGPolyElementImpl.h"
+#include "CanvasItems.h"
+
+namespace KSVG
+{
+
+class SVGPolylineElementImpl : public SVGPolyElementImpl, public MarkerHelper
+{
+public:
+ SVGPolylineElementImpl(DOM::ElementImpl *);
+ virtual ~SVGPolylineElementImpl() { }
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+ virtual void drawMarkers();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGPolylineElementImpl, "polyline")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPreserveAspectRatioImpl.cc b/ksvg/impl/SVGPreserveAspectRatioImpl.cc
new file mode 100644
index 00000000..c8660e61
--- /dev/null
+++ b/ksvg/impl/SVGPreserveAspectRatioImpl.cc
@@ -0,0 +1,217 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include "SVGPreserveAspectRatio.h"
+
+#include "SVGMatrixImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+
+using namespace KSVG;
+
+#include "SVGPreserveAspectRatioImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+SVGPreserveAspectRatioImpl::SVGPreserveAspectRatioImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_meetOrSlice = SVG_MEETORSLICE_UNKNOWN;
+ m_align = SVG_PRESERVEASPECTRATIO_UNKNOWN;
+}
+
+SVGPreserveAspectRatioImpl::~SVGPreserveAspectRatioImpl()
+{
+}
+
+void SVGPreserveAspectRatioImpl::setAlign(unsigned short align)
+{
+ m_align = align;
+}
+
+unsigned short SVGPreserveAspectRatioImpl::align() const
+{
+ return m_align;
+}
+
+void SVGPreserveAspectRatioImpl::setMeetOrSlice(unsigned short meetOrSlice)
+{
+ m_meetOrSlice = meetOrSlice;
+}
+
+unsigned short SVGPreserveAspectRatioImpl::meetOrSlice() const
+{
+ return m_meetOrSlice;
+}
+
+void SVGPreserveAspectRatioImpl::parsePreserveAspectRatio(const QString &str)
+{
+ // Spec: set the defaults
+ setAlign(SVG_PRESERVEASPECTRATIO_NONE);
+ setMeetOrSlice(SVG_MEETORSLICE_MEET);
+
+ QStringList params = QStringList::split(' ', str.simplifyWhiteSpace());
+
+ if(params[0].compare("none") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_NONE;
+ else if(params[0].compare("xMinYMin") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMINYMIN;
+ else if(params[0].compare("xMidYMin") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMIDYMIN;
+ else if(params[0].compare("xMaxYMin") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMAXYMIN;
+ else if(params[0].compare("xMinYMid") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMINYMID;
+ else if(params[0].compare("xMidYMid") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMIDYMID;
+ else if(params[0].compare("xMaxYMid") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMAXYMID;
+ else if(params[0].compare("xMinYMax") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMINYMAX;
+ else if(params[0].compare("xMidYMax") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMIDYMAX;
+ else if(params[0].compare("xMaxYMax") == 0)
+ m_align = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
+
+ if(params[1].compare("slice") == 0)
+ m_meetOrSlice = SVG_MEETORSLICE_SLICE;
+ else
+ m_meetOrSlice = SVG_MEETORSLICE_MEET;
+}
+
+SVGMatrixImpl *SVGPreserveAspectRatioImpl::getCTM(float logicX, float logicY, float logicWidth, float logicHeight,
+ float /*physX*/, float /*physY*/, float physWidth, float physHeight)
+{
+ SVGMatrixImpl *temp = SVGSVGElementImpl::createSVGMatrix();
+
+ if(align() == SVG_PRESERVEASPECTRATIO_UNKNOWN)
+ return temp;
+
+ float vpar = logicWidth / logicHeight;
+ float svgar = physWidth / physHeight;
+
+ if(align() == SVG_PRESERVEASPECTRATIO_NONE)
+ {
+ temp->scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
+ temp->translate(-logicX, -logicY);
+ }
+ else if(vpar < svgar && (meetOrSlice() == SVG_MEETORSLICE_MEET) || vpar >= svgar && (meetOrSlice() == SVG_MEETORSLICE_SLICE))
+ {
+ temp->scale(physHeight / logicHeight);
+
+ if(align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMINYMID || align() == SVG_PRESERVEASPECTRATIO_XMINYMAX)
+ temp->translate(-logicX, -logicY);
+ else if(align() == SVG_PRESERVEASPECTRATIO_XMIDYMIN || align() == SVG_PRESERVEASPECTRATIO_XMIDYMID || align() == SVG_PRESERVEASPECTRATIO_XMIDYMAX)
+ temp->translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight) / 2, -logicY);
+ else
+ temp->translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight), -logicY);
+ }
+ else
+ {
+ temp->scale(physWidth / logicWidth);
+
+ if(align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMIDYMIN || align() == SVG_PRESERVEASPECTRATIO_XMAXYMIN)
+ temp->translate(-logicX, -logicY);
+ else if(align() == SVG_PRESERVEASPECTRATIO_XMINYMID || align() == SVG_PRESERVEASPECTRATIO_XMIDYMID || align() == SVG_PRESERVEASPECTRATIO_XMAXYMID)
+ temp->translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth) / 2);
+ else
+ temp->translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth));
+ }
+
+ return temp;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGPreserveAspectRatioImpl::s_hashTable 3
+ align SVGPreserveAspectRatioImpl::Align DontDelete
+ meetOrSlice SVGPreserveAspectRatioImpl::MeetOrSlice DontDelete
+@end
+*/
+
+Value SVGPreserveAspectRatioImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Align:
+ return Number(align());
+ case MeetOrSlice:
+ return Number(meetOrSlice());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+void SVGPreserveAspectRatioImpl::putValueProperty(ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Align:
+ m_align = static_cast<unsigned short>(value.toNumber(exec));
+ break;
+ case MeetOrSlice:
+ m_meetOrSlice = static_cast<unsigned short>(value.toNumber(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+/*
+@namespace KSVG
+@begin SVGPreserveAspectRatioImplConstructor::s_hashTable 17
+ SVG_PRESERVEASPECTRATIO_UNKNOWN KSVG::SVG_PRESERVEASPECTRATIO_UNKNOWN DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_NONE KSVG::SVG_PRESERVEASPECTRATIO_NONE DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMINYMIN KSVG::SVG_PRESERVEASPECTRATIO_XMINYMIN DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMIDYMIN KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMIN DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMAXYMIN KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMIN DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMINYMID KSVG::SVG_PRESERVEASPECTRATIO_XMINYMID DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMIDYMID KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMID DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMAXYMID KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMID DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMINYMAX KSVG::SVG_PRESERVEASPECTRATIO_XMINYMAX DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMIDYMAX KSVG::SVG_PRESERVEASPECTRATIO_XMIDYMAX DontDelete|ReadOnly
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX KSVG::SVG_PRESERVEASPECTRATIO_XMAXYMAX DontDelete|ReadOnly
+ SVG_MEETORSLICE_UNKNOWN KSVG::SVG_MEETORSLICE_UNKNOWN DontDelete|ReadOnly
+ SVG_MEETORSLICE_MEET KSVG::SVG_MEETORSLICE_MEET DontDelete|ReadOnly
+ SVG_MEETORSLICE_SLICE KSVG::SVG_MEETORSLICE_SLICE DontDelete|ReadOnly
+@end
+*/
+
+Value SVGPreserveAspectRatioImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token > SVG_PRESERVEASPECTRATIO_XMAXYMAX ? token - SVG_MEETORSLICE_UNKNOWN : token);
+}
+
+Value KSVG::getSVGPreserveAspectRatioImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGPreserveAspectRatioImplConstructor>(exec, "[[svgpreserveaspectratio.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGPreserveAspectRatioImpl.h b/ksvg/impl/SVGPreserveAspectRatioImpl.h
new file mode 100644
index 00000000..4a14a6b0
--- /dev/null
+++ b/ksvg/impl/SVGPreserveAspectRatioImpl.h
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGPreserveAspectRatioImpl_H
+#define SVGPreserveAspectRatioImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+class QString;
+
+namespace KSVG
+{
+
+class SVGMatrixImpl;
+class SVGPreserveAspectRatioImpl : public DOM::DomShared
+{
+public:
+ SVGPreserveAspectRatioImpl();
+ virtual ~SVGPreserveAspectRatioImpl();
+
+ void setAlign(unsigned short);
+ unsigned short align() const;
+
+ void setMeetOrSlice(unsigned short);
+ unsigned short meetOrSlice() const;
+
+ void parsePreserveAspectRatio(const QString &);
+ SVGMatrixImpl *getCTM(float logicX, float logicY, float logicWidth, float logicHeight,
+ float physX, float physY, float physWidth, float physHeight);
+
+protected:
+ unsigned short m_align;
+ unsigned short m_meetOrSlice;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Align, MeetOrSlice
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGPreserveAspectRatioImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGPreserveAspectRatioImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGPreserveAspectRatioImplConstructor(KJS::ExecState *exec);
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRadialGradientElementImpl.cc b/ksvg/impl/SVGRadialGradientElementImpl.cc
new file mode 100644
index 00000000..8d00cf15
--- /dev/null
+++ b/ksvg/impl/SVGRadialGradientElementImpl.cc
@@ -0,0 +1,216 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGGradientElement.h"
+#include "SVGRadialGradientElementImpl.h"
+
+#include "SVGDocumentImpl.h"
+#include "KSVGCanvas.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGUnitConverter.h"
+
+using namespace KSVG;
+
+#include "SVGRadialGradientElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGRadialGradientElementImpl::SVGRadialGradientElementImpl(DOM::ElementImpl *impl) : SVGGradientElementImpl(impl)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_cx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_cx->ref();
+
+ m_cy = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_cy->ref();
+
+ m_r = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, this);
+ m_r->ref();
+
+ m_fx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_fx->ref();
+
+ m_fy = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_fy->ref();
+
+ converter()->add(m_cx);
+ converter()->add(m_cy);
+ converter()->add(m_r);
+ converter()->add(m_fx);
+ converter()->add(m_fy);
+}
+
+SVGRadialGradientElementImpl::~SVGRadialGradientElementImpl()
+{
+ if(m_cx)
+ m_cx->deref();
+ if(m_cy)
+ m_cy->deref();
+ if(m_r)
+ m_r->deref();
+ if(m_fx)
+ m_fx->deref();
+ if(m_fy)
+ m_fy->deref();
+}
+
+SVGAnimatedLengthImpl *SVGRadialGradientElementImpl::cx() const
+{
+ return m_cx;
+}
+
+SVGAnimatedLengthImpl *SVGRadialGradientElementImpl::cy() const
+{
+ return m_cy;
+}
+
+SVGAnimatedLengthImpl *SVGRadialGradientElementImpl::r() const
+{
+ return m_r;
+}
+
+SVGAnimatedLengthImpl *SVGRadialGradientElementImpl::fx() const
+{
+ return m_fx;
+}
+
+SVGAnimatedLengthImpl *SVGRadialGradientElementImpl::fy() const
+{
+ return m_fy;
+}
+
+/*
+@namespace KSVG
+@begin SVGRadialGradientElementImpl::s_hashTable 7
+ cx SVGRadialGradientElementImpl::Cx DontDelete|ReadOnly
+ cy SVGRadialGradientElementImpl::Cy DontDelete|ReadOnly
+ r SVGRadialGradientElementImpl::R DontDelete|ReadOnly
+ fx SVGRadialGradientElementImpl::Fx DontDelete|ReadOnly
+ fy SVGRadialGradientElementImpl::Fy DontDelete|ReadOnly
+@end
+*/
+
+Value SVGRadialGradientElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Cx:
+ if(!attributeMode)
+ return m_cx->cache(exec);
+ else
+ return Number(m_cx->baseVal()->value());
+ case Cy:
+ if(!attributeMode)
+ return m_cy->cache(exec);
+ else
+ return Number(m_cy->baseVal()->value());
+ case R:
+ if(!attributeMode)
+ return m_r->cache(exec);
+ else
+ return Number(m_r->baseVal()->value());
+ case Fx:
+ if(!attributeMode)
+ return m_fx->cache(exec);
+ else
+ return Number(m_fx->baseVal()->value());
+ case Fy:
+ if(!attributeMode)
+ return m_fy->cache(exec);
+ else
+ return Number(m_fy->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGRadialGradientElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Cx:
+ converter()->modify(cx(), value.toString(exec).qstring());
+ break;
+ case Cy:
+ converter()->modify(cy(), value.toString(exec).qstring());
+ break;
+ case R:
+ converter()->modify(r(), value.toString(exec).qstring());
+ break;
+ case Fx:
+ converter()->modify(fx(), value.toString(exec).qstring());
+ break;
+ case Fy:
+ converter()->modify(fy(), value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGRadialGradientElementImpl::setAttributes()
+{
+ SVGGradientElementImpl::setAttributes();
+
+ // Spec: no attribute, effect is af value 50% is specified
+ if(KSVG_TOKEN_NOT_PARSED(Cx))
+ KSVG_SET_ALT_ATTRIBUTE(Cx, "50%")
+
+ // Spec: no attribute, effect is af value 50% is specified
+ if(KSVG_TOKEN_NOT_PARSED(Cy))
+ KSVG_SET_ALT_ATTRIBUTE(Cy, "50%")
+
+ // Spec: no attribute, effect is af value 50% is specified
+ if(KSVG_TOKEN_NOT_PARSED(R))
+ KSVG_SET_ALT_ATTRIBUTE(R, "50%")
+}
+
+QMap<QString, DOM::DOMString> SVGRadialGradientElementImpl::gradientAttributes()
+{
+ setAttributes();
+
+ QMap<QString, DOM::DOMString> gradAttributes;
+ QDictIterator<DOM::DOMString> it(attributes());
+
+ for(; it.current(); ++it)
+ {
+ DOM::DOMString name = it.currentKey();
+ DOM::DOMString value = it.current()->string();
+
+ if(name == "gradientUnits" || name == "gradientTransform" || name == "spreadMethod" || name == "cx" || name == "cy" || name == "r" || name == "fx" || name == "fy")
+ {
+ gradAttributes.insert(name.string(), value.copy());
+ }
+ }
+
+ return gradAttributes;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRadialGradientElementImpl.h b/ksvg/impl/SVGRadialGradientElementImpl.h
new file mode 100644
index 00000000..2f6c58c1
--- /dev/null
+++ b/ksvg/impl/SVGRadialGradientElementImpl.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGRadialGradientElementImpl_H
+#define SVGRadialGradientElementImpl_H
+
+#include "SVGGradientElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGRadialGradientElementImpl : public SVGGradientElementImpl
+{
+public:
+ SVGRadialGradientElementImpl(DOM::ElementImpl *);
+ virtual ~SVGRadialGradientElementImpl();
+
+ SVGAnimatedLengthImpl *cx() const;
+ SVGAnimatedLengthImpl *cy() const;
+ SVGAnimatedLengthImpl *r() const;
+ SVGAnimatedLengthImpl *fx() const;
+ SVGAnimatedLengthImpl *fy() const;
+
+ virtual void setAttributes();
+
+ virtual QMap<QString, DOM::DOMString> gradientAttributes();
+
+private:
+ SVGAnimatedLengthImpl *m_cx;
+ SVGAnimatedLengthImpl *m_cy;
+ SVGAnimatedLengthImpl *m_r;
+ SVGAnimatedLengthImpl *m_fx;
+ SVGAnimatedLengthImpl *m_fy;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Cx, Cy, R, Fx, Fy, Href
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGRadialGradientElementImpl, "radialGradient")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRectElementImpl.cc b/ksvg/impl/SVGRectElementImpl.cc
new file mode 100644
index 00000000..3dad7cbf
--- /dev/null
+++ b/ksvg/impl/SVGRectElementImpl.cc
@@ -0,0 +1,244 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "SVGRectImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGRectElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+#include "KSVGCanvas.h"
+#include "CanvasItem.h"
+
+using namespace KSVG;
+
+#include "SVGRectElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGRectElementImpl::SVGRectElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x->ref();
+ m_x->baseVal()->setValueAsString("-1");
+
+ m_y = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y->ref();
+ m_y->baseVal()->setValueAsString("-1");
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+ m_width->baseVal()->setValueAsString("-1");
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+ m_height->baseVal()->setValueAsString("-1");
+
+ m_rx = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_rx->ref();
+ m_rx->baseVal()->setValueAsString("-1");
+
+ m_ry = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_ry->ref();
+ m_ry->baseVal()->setValueAsString("-1");
+}
+
+SVGRectElementImpl::~SVGRectElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_rx)
+ m_rx->deref();
+ if(m_ry)
+ m_ry->deref();
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::x()
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::y()
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::width()
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::height()
+{
+ return m_height;
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::rx()
+{
+ return m_rx;
+}
+
+SVGAnimatedLengthImpl *SVGRectElementImpl::ry()
+{
+ return m_ry;
+}
+
+/*
+@namespace KSVG
+@begin SVGRectElementImpl::s_hashTable 7
+ x SVGRectElementImpl::X DontDelete|ReadOnly
+ y SVGRectElementImpl::Y DontDelete|ReadOnly
+ width SVGRectElementImpl::Width DontDelete|ReadOnly
+ height SVGRectElementImpl::Height DontDelete|ReadOnly
+ rx SVGRectElementImpl::Rx DontDelete|ReadOnly
+ ry SVGRectElementImpl::Ry DontDelete|ReadOnly
+@end
+*/
+
+Value SVGRectElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ case Rx:
+ if(!attributeMode)
+ return m_rx->cache(exec);
+ else
+ return Number(m_rx->baseVal()->value());
+ case Ry:
+ if(!attributeMode)
+ return m_ry->cache(exec);
+ else
+ return Number(m_ry->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGRectElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ x()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y:
+ y()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Width:
+ width()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(width()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute width of element <rect> is illegal"));
+ break;
+ case Height:
+ height()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(height()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute height of element <rect> is illegal"));
+ break;
+ case Rx:
+ rx()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(rx()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute rx of element <rect> is illegal"));
+ break;
+ case Ry:
+ ry()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ if(ry()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute ry of element <rect> is illegal"));
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGRectElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_x->baseVal()->value());
+ ret->setY(m_y->baseVal()->value());
+ ret->setWidth(m_width->baseVal()->value());
+ ret->setHeight(m_height->baseVal()->value());
+ return ret;
+}
+
+void SVGRectElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "0")
+}
+
+void SVGRectElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createRectangle(this);
+ c->insert(m_item);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRectElementImpl.h b/ksvg/impl/SVGRectElementImpl.h
new file mode 100644
index 00000000..690084d7
--- /dev/null
+++ b/ksvg/impl/SVGRectElementImpl.h
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGRectElementImpl_H
+#define SVGRectElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGAnimatedLengthImpl;
+class SVGRectElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGRectElementImpl(DOM::ElementImpl *);
+ virtual ~SVGRectElementImpl();
+
+ SVGAnimatedLengthImpl *x();
+ SVGAnimatedLengthImpl *y();
+ SVGAnimatedLengthImpl *width();
+ SVGAnimatedLengthImpl *height();
+ SVGAnimatedLengthImpl *rx();
+ SVGAnimatedLengthImpl *ry();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual void setAttributes();
+
+ virtual SVGRectImpl *getBBox();
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+ SVGAnimatedLengthImpl *m_rx;
+ SVGAnimatedLengthImpl *m_ry;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height, Rx, Ry
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGRectElementImpl, "rect")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRectImpl.cc b/ksvg/impl/SVGRectImpl.cc
new file mode 100644
index 00000000..1f6c0d51
--- /dev/null
+++ b/ksvg/impl/SVGRectImpl.cc
@@ -0,0 +1,157 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qrect.h>
+
+#include "SVGRectImpl.h"
+
+using namespace KSVG;
+
+#include "SVGRectImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGRectImpl::SVGRectImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = 0;
+ m_y = 0;
+ m_width = 0;
+ m_height = 0;
+}
+
+SVGRectImpl::SVGRectImpl(const QRect &other)
+{
+ (*this) = other;
+}
+
+SVGRectImpl::~SVGRectImpl()
+{
+}
+
+void SVGRectImpl::setX(float x)
+{
+ m_x = x;
+}
+
+float SVGRectImpl::x() const
+{
+ return m_x;
+}
+
+void SVGRectImpl::setY(float y)
+{
+ m_y = y;
+}
+
+float SVGRectImpl::y() const
+{
+ return m_y;
+}
+
+void SVGRectImpl::setWidth(float width)
+{
+ m_width = width;
+}
+
+float SVGRectImpl::width() const
+{
+ return m_width;
+}
+
+void SVGRectImpl::setHeight(float height)
+{
+ m_height = height;
+}
+
+float SVGRectImpl::height() const
+{
+ return m_height;
+}
+
+QRect SVGRectImpl::qrect() const
+{
+ // ceil() so the integer rectangle contains the whole real one.
+ return QRect(int(m_x), int(m_y), int(ceil(m_width)), int(ceil(m_height)));
+}
+
+SVGRectImpl &SVGRectImpl::operator=(const QRect &other)
+{
+ m_x = other.x();
+ m_y = other.y();
+ m_width = other.width();
+ m_height = other.height();
+
+ return *this;
+}
+
+/*
+@namespace KSVG
+@begin SVGRectImpl::s_hashTable 5
+ x SVGRectImpl::X DontDelete
+ y SVGRectImpl::Y DontDelete
+ width SVGRectImpl::Width DontDelete
+ height SVGRectImpl::Height DontDelete
+@end
+*/
+
+Value SVGRectImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case X:
+ return Number(m_x);
+ case Y:
+ return Number(m_y);
+ case Width:
+ return Number(m_width);
+ case Height:
+ return Number(m_height);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGRectImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case X:
+ m_x = value.toNumber(exec);
+ break;
+ case Y:
+ m_y = value.toNumber(exec);
+ break;
+ case Width:
+ m_width = value.toNumber(exec);
+ break;
+ case Height:
+ m_height = value.toNumber(exec);
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGRectImpl.h b/ksvg/impl/SVGRectImpl.h
new file mode 100644
index 00000000..e0b0e889
--- /dev/null
+++ b/ksvg/impl/SVGRectImpl.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGRectImpl_H
+#define SVGRectImpl_H
+
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+class QRect;
+
+namespace KSVG
+{
+
+class SVGRectImpl : public DOM::DomShared
+{
+public:
+ SVGRectImpl();
+ SVGRectImpl(const QRect &);
+ virtual ~SVGRectImpl();
+
+ void setX(float x);
+ float x() const;
+
+ void setY(float y);
+ float y() const;
+
+ void setWidth(float width);
+ float width() const;
+
+ void setHeight(float height);
+ float height() const;
+
+ QRect qrect() const;
+
+ SVGRectImpl &operator=(const QRect &);
+
+private:
+ float m_x;
+ float m_y;
+ float m_width;
+ float m_height;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSVGElementImpl.cc b/ksvg/impl/SVGSVGElementImpl.cc
new file mode 100644
index 00000000..b54cf521
--- /dev/null
+++ b/ksvg/impl/SVGSVGElementImpl.cc
@@ -0,0 +1,982 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qtimer.h>
+#include <qstringlist.h>
+#include <qdatetime.h>
+
+#define USE_VALGRIND 0
+
+#if USE_VALGRIND
+#include <valgrind/calltree.h>
+#endif
+
+#include "SVGLength.h"
+
+#include "SVGRectImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGPointImpl.h"
+#include "SVGNumberImpl.h"
+#include "SVGMatrixImpl.h"
+
+#include "SVGEventImpl.h"
+#include "SVGAElementImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGViewSpecImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+#include "SVGSVGElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGSVGElementImpl::SVGSVGElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGLocatableImpl(), SVGFitToViewBoxImpl(), SVGZoomAndPanImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+
+ m_viewport = SVGSVGElementImpl::createSVGRect();
+
+ m_currentTranslate = SVGSVGElementImpl::createSVGPoint();
+
+ m_currentView = new SVGViewSpecImpl();
+ m_currentView->ref();
+
+ m_currentScale = 1.0;
+
+ m_useCurrentView = false;
+
+ m_clip[0] = 0;
+ m_clip[1] = 0;
+ m_clip[2] = 0;
+ m_clip[3] = 0;
+
+ m_rootParentScreenCTM = 0;
+
+ m_localMatrix = SVGSVGElementImpl::createSVGMatrix();
+}
+
+SVGSVGElementImpl::~SVGSVGElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_viewport)
+ m_viewport->deref();
+ if(m_currentTranslate)
+ m_currentTranslate->deref();
+ if(m_currentView)
+ m_currentView->deref();
+ if(m_rootParentScreenCTM)
+ m_rootParentScreenCTM->deref();
+ if(m_localMatrix)
+ m_localMatrix->deref();
+}
+
+bool SVGSVGElementImpl::isRootElement() const
+{
+ return ownerDoc()->rootElement() == this;
+}
+
+void SVGSVGElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "0")
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "0")
+
+ // Spec: If the attribute is not specified, the effect is as if a value of "100%" were specified.
+ if(KSVG_TOKEN_NOT_PARSED(Width))
+ KSVG_SET_ALT_ATTRIBUTE(Width, "100%")
+
+ // Spec: If the attribute is not specified, the effect is as if a value of "100%" were specified.
+ if(KSVG_TOKEN_NOT_PARSED(Height))
+ KSVG_SET_ALT_ATTRIBUTE(Height, "100%")
+
+ // Spec: The contentScriptType should default to "text/ecmascript".
+ if(KSVG_TOKEN_NOT_PARSED(ContentScriptType))
+ KSVG_SET_ALT_ATTRIBUTE(ContentScriptType, "text/ecmascript")
+
+ // Spec: The contentStyleType should default to "text/css".
+ if(KSVG_TOKEN_NOT_PARSED(ContentStyleType))
+ KSVG_SET_ALT_ATTRIBUTE(ContentStyleType, "text/css")
+
+ if(m_useCurrentView)
+ {
+ parseViewBox(m_currentView->viewBoxString().string());
+ preserveAspectRatio()->baseVal()->parsePreserveAspectRatio(m_currentView->preserveAspectRatioString().string());
+ }
+
+ m_viewport->setX(x()->baseVal()->value());
+ m_viewport->setY(y()->baseVal()->value());
+ m_viewport->setWidth(width()->baseVal()->value());
+ m_viewport->setHeight(height()->baseVal()->value());
+
+ if(isRootElement() && ownerDoc()->parentImage() == 0)
+ {
+ if(ownerDoc()->canvas())
+ ownerDoc()->canvas()->setViewportDimension(int(ceil(width()->baseVal()->value() * currentScale())), int(ceil(height()->baseVal()->value() * currentScale())));
+
+ // Special case for outermost svg element:
+ // We need to register our id manually, because
+ // m_ownerSVGElement is 0 in SVGElementImpl::setAttributes (Niko)
+ if(!id().isNull())
+ addToIdMap(id().string(), this);
+ }
+}
+
+SVGAnimatedLengthImpl *SVGSVGElementImpl::x()
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGSVGElementImpl::y()
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGSVGElementImpl::width()
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGSVGElementImpl::height()
+{
+ return m_height;
+}
+
+void SVGSVGElementImpl::setContentScriptType(const DOM::DOMString &contentScriptType)
+{
+ setAttribute("contentScriptType", contentScriptType);
+}
+
+DOM::DOMString SVGSVGElementImpl::contentScriptType() const
+{
+ return getAttribute("contentScriptType");
+}
+
+void SVGSVGElementImpl::setContentStyleType(const DOM::DOMString &contentStyleType)
+{
+ setAttribute("contentStyleType", contentStyleType);
+}
+
+DOM::DOMString SVGSVGElementImpl::contentStyleType() const
+{
+ return getAttribute("contentStyleType");
+}
+
+SVGRectImpl *SVGSVGElementImpl::viewport()
+{
+ return m_viewport;
+}
+
+SVGRectImpl *SVGSVGElementImpl::getBBox()
+{
+ SVGRectImpl *ret = new SVGRectImpl(getCTM()->qmatrix().invert().map(m_viewport->qrect()));
+ ret->ref();
+ return ret;
+}
+
+float SVGSVGElementImpl::pixelUnitToMillimeterX() const
+{
+ return ownerDoc()->screenPixelsPerMillimeterX();
+}
+
+float SVGSVGElementImpl::pixelUnitToMillimeterY() const
+{
+ return ownerDoc()->screenPixelsPerMillimeterY();
+}
+
+float SVGSVGElementImpl::screenPixelToMillimeterX() const
+{
+ return pixelUnitToMillimeterX();
+}
+
+float SVGSVGElementImpl::screenPixelToMillimeterY() const
+{
+ return pixelUnitToMillimeterY();
+}
+
+void SVGSVGElementImpl::setUseCurrentView(bool useCurrentView)
+{
+ m_useCurrentView = useCurrentView;
+}
+
+bool SVGSVGElementImpl::useCurrentView() const
+{
+ return m_useCurrentView;
+}
+
+SVGViewSpecImpl *SVGSVGElementImpl::currentView() const
+{
+ return m_currentView;
+}
+
+void SVGSVGElementImpl::setCurrentScale(float currentScale)
+{
+ if( m_currentScale != currentScale )
+ {
+ m_currentScale = currentScale;
+ invalidateCachedMatrices();
+
+ if(hasEventListener(SVGEvent::ZOOM_EVENT, true))
+ dispatchEvent(SVGEvent::ZOOM_EVENT, false, false);
+ }
+}
+
+float SVGSVGElementImpl::currentScale() const
+{
+ return m_currentScale;
+}
+
+void SVGSVGElementImpl::setCurrentTranslate(const QPoint &p)
+{
+ if(m_currentTranslate->x() != p.x() || m_currentTranslate->y() != p.y())
+ {
+ m_currentTranslate->setX(p.x());
+ m_currentTranslate->setY(p.y());
+ invalidateCachedMatrices();
+ if(hasEventListener(SVGEvent::SCROLL_EVENT, true))
+ dispatchEvent(SVGEvent::SCROLL_EVENT, false, false);
+ }
+}
+
+SVGPointImpl *SVGSVGElementImpl::currentTranslate()
+{
+ return m_currentTranslate;
+}
+
+unsigned long SVGSVGElementImpl::suspendRedraw(unsigned long)
+{
+ return 0;
+}
+
+void SVGSVGElementImpl::unsuspendRedraw(unsigned long)
+{
+}
+
+void SVGSVGElementImpl::unsuspendRedrawAll()
+{
+}
+
+void SVGSVGElementImpl::forceRedraw()
+{
+#if USE_VALGRIND
+ CALLTREE_ZERO_STATS();
+#endif
+
+ QTime timer;
+ timer.start();
+
+ if(ownerDoc() && ownerDoc()->canvas())
+ ownerDoc()->canvas()->update();
+
+ kdDebug(26000) << "forceRedraw in " << timer.elapsed()/1000.0 << " seconds" << endl;
+
+#if USE_VALGRIND
+ CALLTREE_DUMP_STATS();
+#endif
+}
+
+void SVGSVGElementImpl::pauseAnimations()
+{
+ if(!ownerDoc()->timeScheduler()->animationsPaused())
+ ownerDoc()->timeScheduler()->toggleAnimations();
+}
+
+void SVGSVGElementImpl::unpauseAnimations()
+{
+ if(ownerDoc()->timeScheduler()->animationsPaused())
+ ownerDoc()->timeScheduler()->toggleAnimations();
+}
+
+bool SVGSVGElementImpl::animationsPaused()
+{
+ return ownerDoc()->timeScheduler()->animationsPaused();
+}
+
+float SVGSVGElementImpl::getCurrentTime() const
+{
+ return ownerDoc()->timeScheduler()->elapsed();
+}
+
+void SVGSVGElementImpl::setCurrentTime(float)
+{
+}
+
+DOM::NodeList SVGSVGElementImpl::getIntersectionList(SVGRectImpl *, SVGElementImpl *)
+{
+ // TODO : implement me
+ return DOM::NodeList();
+}
+
+DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementImpl */*referenceElement*/)
+{
+ DOM::NodeList list;
+
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ if(shape)
+ {
+ if(shape->isContainer())
+ // TODO : pass it on to container::getEnclosureList() which should return a NodeList
+ kdDebug() << "!shape" << endl;
+ else
+ {
+ // TODO : add the shape to list if the test succeeds
+ SVGRectImpl *current = shape->getBBox();
+ if(rect->qrect().contains(current->qrect(), true))
+ kdDebug() << "shape : " << element->nodeName().string() << " is fully enclosed" << endl;
+
+ current->deref();
+ }
+ }
+ }
+
+ return list;
+}
+
+bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *rect)
+{
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ if(!shape)
+ return false;
+
+ SVGRectImpl *current = shape->getBBox();
+ bool result = rect->qrect().intersects(current->qrect());
+ current->deref();
+ return result;
+}
+
+bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect)
+{
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ if(!shape)
+ return false;
+
+ SVGRectImpl *current = shape->getBBox();
+ bool result = rect->qrect().contains(current->qrect());
+ current->deref();
+ return result;
+}
+
+void SVGSVGElementImpl::deSelectAll()
+{
+}
+
+SVGNumberImpl *SVGSVGElementImpl::createSVGNumber()
+{
+ // Spec: Creates an SVGNumber object outside of any document
+ // trees. The object is initialized to a value of zero.
+ SVGNumberImpl *ret = new SVGNumberImpl();
+ ret->ref();
+ return ret;
+}
+
+SVGLengthImpl *SVGSVGElementImpl::createSVGLength()
+{
+ // Spec: Creates an SVGLength object outside of any document
+ // trees. The object is initialized to the value of 0 user units.
+ SVGLengthImpl *ret = new SVGLengthImpl();
+ ret->ref();
+ return ret;
+}
+
+SVGAngleImpl *SVGSVGElementImpl::createSVGAngle()
+{
+ // Spec: Creates an SVGAngle object outside of any document
+ // trees. The object is initialized to the value 0 degrees (unitless).
+ SVGAngleImpl *ret = new SVGAngleImpl();
+ ret->ref();
+ return ret;
+}
+
+SVGPointImpl *SVGSVGElementImpl::createSVGPoint()
+{
+ // Spec: Creates an SVGPoint object outside of any document
+ // trees. The object is initialized to the point (0,0) in the user coordinate system.
+ SVGPointImpl *ret = new SVGPointImpl();
+ ret->ref();
+ return ret;
+}
+
+SVGMatrixImpl *SVGSVGElementImpl::createSVGMatrix()
+{
+ // Spec: Creates an SVGMatrix object outside of any document
+ // trees. The object is initialized to the identity matrix.
+ SVGMatrixImpl *ret = new SVGMatrixImpl(QWMatrix(1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F));
+ ret->ref();
+ return ret;
+}
+
+SVGRectImpl *SVGSVGElementImpl::createSVGRect()
+{
+ // Spec: Creates an SVGRect object outside of any document
+ // trees. The object is initialized such that all values are set to 0 user units.
+ SVGRectImpl *ret = new SVGRectImpl();
+ ret->ref();
+ return ret;
+}
+
+SVGTransformImpl *SVGSVGElementImpl::createSVGTransform()
+{
+ // Spec: Creates an SVGTransform object outside of any document
+ // trees. The object is initialized to an identity matrix transform (SVG_TRANSFORM_MATRIX).
+ SVGTransformImpl *transform = createSVGTransformFromMatrix(createSVGMatrix());
+
+ // createSVGMatrix already ref's the matrix, the SVGTransformImpl->setMatrix
+ // call also does this, prevent non deleting of the object by deref'ing (Niko)
+ transform->matrix()->deref();
+
+ return transform;
+}
+
+SVGTransformImpl *SVGSVGElementImpl::createSVGTransformFromMatrix(SVGMatrixImpl *mat)
+{
+ // Spec: Creates an SVGTransform object outside of any document
+ // trees. The object is initialized to the given matrix transform (i.e., SVG_TRANSFORM_MATRIX).
+ SVGTransformImpl *ret = new SVGTransformImpl();
+ ret->setMatrix(mat);
+ ret->ref();
+ return ret;
+}
+
+SVGElementImpl *SVGSVGElementImpl::getElementById(const DOM::DOMString &elementId)
+{
+ return m_map[elementId.string()];
+}
+
+void SVGSVGElementImpl::addToIdMap(const QString &id, SVGElementImpl *obj)
+{
+ m_map.insert(id, obj);
+}
+
+SVGMatrixImpl *SVGSVGElementImpl::getCTM()
+{
+ return viewBoxToViewTransform(width()->baseVal()->value(), height()->baseVal()->value());
+}
+
+const SVGMatrixImpl *SVGSVGElementImpl::localMatrix()
+{
+ // TODO: only update the matrix when needed and just return m_localMatrix
+
+ m_localMatrix->reset();
+
+ if(ownerSVGElement() == 0)
+ {
+ if(m_rootParentScreenCTM != 0)
+ m_localMatrix->copy(m_rootParentScreenCTM);
+
+ // We're the outermost svg element.
+ // Put the zoom scale and translate into the matrix.
+ m_localMatrix->translate(currentTranslate()->x(), currentTranslate()->y());
+ m_localMatrix->scale(currentScale());
+ }
+
+ // Apply viewport translation.
+ m_localMatrix->translate(x()->baseVal()->value(), y()->baseVal()->value());
+
+ // And viewbox.
+ SVGMatrixImpl *viewboxMatrix = viewBoxToViewTransform(width()->baseVal()->value(), height()->baseVal()->value());
+
+ m_localMatrix->multiply(viewboxMatrix);
+ viewboxMatrix->deref();
+
+ return m_localMatrix;
+}
+
+void SVGSVGElementImpl::setClip(const QString &clip)
+{
+ // TODO : this routine should probably be shared between all classes that establish new viewports (Rob)
+ if(!clip.startsWith("rect(") || !clip.endsWith(")"))
+ return;
+
+ QString work = clip.mid(5, clip.length() - 6);
+ QStringList substrings = QStringList::split(',', clip);
+ QStringList::ConstIterator it = substrings.begin();
+
+ if(m_clip[0])
+ m_clip[0]->deref();
+ m_clip[0] = SVGSVGElementImpl::createSVGLength();
+
+ if(*it != "auto")
+ m_clip[0]->setValueAsString(*it);
+ ++it;
+
+ if(m_clip[1])
+ m_clip[1]->deref();
+ m_clip[1] = SVGSVGElementImpl::createSVGLength();
+
+ if(*it != "auto")
+ m_clip[1]->setValueAsString(*it);
+ ++it;
+
+ if(m_clip[2])
+ m_clip[2]->deref();
+ m_clip[2] = SVGSVGElementImpl::createSVGLength();
+
+ if(*it != "auto")
+ m_clip[2]->setValueAsString(*it);
+ ++it;
+
+ if(m_clip[3])
+ m_clip[3]->deref();
+ m_clip[3] = SVGSVGElementImpl::createSVGLength();
+
+ if(*it != "auto")
+ m_clip[3]->setValueAsString(*it);
+}
+
+QRect SVGSVGElementImpl::clip()
+{
+ // Get viewport in user coordinates.
+ QRect v(0, 0, m_viewport->qrect().width(), m_viewport->qrect().height());
+
+ SVGMatrixImpl *ctm = getCTM();
+ QRect r = ctm->qmatrix().invert().mapRect(v);
+ ctm->deref();
+
+ if(m_clip[0])
+ r.setTop(static_cast<int>(r.top() + m_clip[0]->value()));
+ if(m_clip[1])
+ r.setRight(static_cast<int>(r.right() - m_clip[1]->value()));
+ if(m_clip[2])
+ r.setBottom(static_cast<int>(r.bottom() - m_clip[2]->value()));
+ if(m_clip[3])
+ r.setLeft(static_cast<int>(r.left() + m_clip[3]->value()));
+
+ return r;
+}
+
+void SVGSVGElementImpl::setRootParentScreenCTM(SVGMatrixImpl *screenCTM)
+{
+ if(m_rootParentScreenCTM != 0)
+ m_rootParentScreenCTM->deref();
+
+ m_rootParentScreenCTM = screenCTM;
+ screenCTM->ref();
+}
+
+bool SVGSVGElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev)
+{
+ // mop: central bool var which turns to true once the current "mouseover" element has been found
+ bool ret = false, dorerender = false;
+ SVGElementImpl *elem = 0;
+
+ SVGMatrixImpl *ctm = getCTM();
+ QPoint userA = ctm->qmatrix().invert().map(a);
+ ctm->deref();
+
+ // Just check the lastTarget once (mop)
+ if(ownerDoc()->lastTarget())
+ {
+ elem = ownerDoc()->lastTarget();
+ ret = elem->prepareMouseEvent(p, userA, mev);
+
+ // mop: only proceed if element is not the current element anymore. rest is done in the lower part
+ if(!ret)
+ {
+ if(elem->hasEventListener(SVGEvent::MOUSEOUT_EVENT, false))
+ {
+ dorerender = true;
+ elem->setMouseOver(false);
+ elem->dispatchMouseEvent(SVGEvent::MOUSEOUT_EVENT, true, true, 0, mev->screenX(), mev->screenY(), mev->clientX(), mev->clientY(), mev->ctrlKey(), mev->altKey(), mev->shiftKey(), mev->metaKey(), mev->button(), elem);
+ }
+
+ if(elem->hasEventListener(SVGEvent::DOMFOCUSOUT_EVENT, false) && elem->focus())
+ {
+ dorerender = true;
+ elem->setFocus(false);
+ elem->dispatchEvent(SVGEvent::DOMFOCUSOUT_EVENT, true, true);
+ }
+
+ // mop: unset last target once we left it
+ ownerDoc()->setLastTarget(0);
+ }
+ }
+
+ // mop: DAMN...logic doesn't work :(
+ // we cant use the results of the above check because something like this
+ // _________
+ // | ____ |
+ // ||____| |
+ // |_________|
+ //
+ // wouldn't work because even if the mousepointer would be in the inner rect it would still be inside the bbox
+ // of the outer (assuming that the outer is the lastTarget). :(
+ ret = false;
+
+ // mop: just check for a node until the element where the mouse is over is found
+ // mop: "ret" can be set from the above stuff too...
+ // find the element here and do the event stuff in the lower part..much cleaner
+ CanvasItemList hits = ownerDoc()->canvas()->collisions(p, true);
+ for(CanvasItemList::Iterator it = hits.begin(); it != hits.end(); ++it)
+ {
+ elem = (*it)->element();
+ if(elem)
+ {
+ // Check if mouse is over a certain shape...
+ // mop: once an element has been found check eventlisteners and leave immediately
+ ret = elem->prepareMouseEvent(p, userA, mev);
+ if(ret) break;
+ }
+ }
+
+ // mop: has an element been found?
+ if(ret)
+ {
+ int events = mev->target()->getEventListeners(false);
+
+ // Dispatch mousemove, mousedown, mouseup and mouseclick events
+ bool cancel = (mev->id() != SVGEvent::MOUSEMOVE_EVENT);
+
+ if(events & 1 << mev->id())
+ {
+ mev->target()->dispatchMouseEvent(mev->id(), true, cancel, 0, mev->screenX(), mev->screenY(), mev->clientX(), mev->clientY(), mev->ctrlKey(), mev->altKey(), mev->shiftKey(), mev->metaKey(), mev->button(), elem);
+ dorerender = true; // mop: if it has the event then rerender
+ }
+
+ // If a mouse "moves" over a shape, it's also "over" the shape
+ if(mev->id() == SVGEvent::MOUSEMOVE_EVENT)
+ {
+ mev->target()->setMouseOver(true);
+ if(events & 1 << SVGEvent::MOUSEOVER_EVENT)
+ {
+ mev->target()->dispatchMouseEvent(SVGEvent::MOUSEOVER_EVENT, true, cancel, 0, mev->screenX(), mev->screenY(), mev->clientX(), mev->clientY(), mev->ctrlKey(), mev->altKey(), mev->shiftKey(), mev->metaKey(), mev->button(), elem);
+ dorerender = true;
+ }
+
+ }
+
+ // Also send an domactivate + focusin event on mouseup
+ bool dolinktest = true;
+ if(mev->id() == SVGEvent::MOUSEUP_EVENT)
+ {
+ mev->target()->setFocus(true);
+
+ if(events & 1 << SVGEvent::CLICK_EVENT)
+ {
+ dolinktest = mev->target()->dispatchEvent(SVGEvent::CLICK_EVENT, true, true);
+ dorerender = true;
+ }
+
+ if(events & 1 << SVGEvent::DOMACTIVATE_EVENT)
+ {
+ mev->target()->dispatchEvent(SVGEvent::DOMACTIVATE_EVENT, true, true);
+ dorerender = true;
+ }
+
+ if(events & 1 << SVGEvent::DOMFOCUSIN_EVENT)
+ {
+ mev->target()->dispatchEvent(SVGEvent::DOMFOCUSIN_EVENT, true, true);
+ dorerender = true;
+ }
+ }
+
+ // Hyperlink support
+ SVGAElementImpl* link=0;
+ if(dolinktest && !mev->defaultPrevented())
+ {
+ link = SVGAElementImpl::getLink(elem);
+ if(link)
+ {
+ mev->setURL(link->href()->baseVal());
+ emit ownerDoc()->gotURL(link->target()->baseVal().string());
+ }
+ }
+
+ // The mouse is over a shape, so we have a target..we need to register that for a mouseout
+ ownerDoc()->setLastTarget(mev->target());
+ }
+
+ // mop: all events may trigger changed style, add elements etc. this is definately needed :(
+ if(dorerender)
+ ownerDoc()->rerender();
+
+ return dorerender; // mop: some kind of event has been found and executed
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGSVGElementImpl::s_hashTable 23
+ x SVGSVGElementImpl::X DontDelete|ReadOnly
+ y SVGSVGElementImpl::Y DontDelete|ReadOnly
+ width SVGSVGElementImpl::Width DontDelete|ReadOnly
+ height SVGSVGElementImpl::Height DontDelete|ReadOnly
+ viewport SVGSVGElementImpl::Viewport DontDelete|ReadOnly
+ contentScriptType SVGSVGElementImpl::ContentScriptType DontDelete
+ contentStyleType SVGSVGElementImpl::ContentStyleType DontDelete
+ pixelUnitToMillimeterX SVGSVGElementImpl::PixelUnitToMillimeterX DontDelete|ReadOnly
+ pixelUnitToMillimeterY SVGSVGElementImpl::PixelUnitToMillimeterY DontDelete|ReadOnly
+ screenPixelToMillimeterX SVGSVGElementImpl::ScreenPixelToMillimeterX DontDelete|ReadOnly
+ screenPixelToMillimeterY SVGSVGElementImpl::ScreenPixelToMillimeterY DontDelete|ReadOnly
+ useCurrentView SVGSVGElementImpl::UseCurrentView DontDelete
+ currentScale SVGSVGElementImpl::CurrentScale DontDelete
+ currentTranslate SVGSVGElementImpl::CurrentTranslate DontDelete|ReadOnly
+ onunload SVGSVGElementImpl::OnUnload DontDelete
+ onerror SVGSVGElementImpl::OnError DontDelete
+ onresize SVGSVGElementImpl::OnResize DontDelete
+ onzoom SVGSVGElementImpl::OnZoom DontDelete
+ onscroll SVGSVGElementImpl::OnScroll DontDelete
+@end
+@namespace KSVG
+@begin SVGSVGElementImplProto::s_hashTable 29
+ createSVGNumber SVGSVGElementImpl::CreateSVGNumber DontDelete|Function 0
+ createSVGLength SVGSVGElementImpl::CreateSVGLength DontDelete|Function 0
+ createSVGAngle SVGSVGElementImpl::CreateSVGAngle DontDelete|Function 0
+ createSVGPoint SVGSVGElementImpl::CreateSVGPoint DontDelete|Function 0
+ createSVGMatrix SVGSVGElementImpl::CreateSVGMatrix DontDelete|Function 0
+ createSVGRect SVGSVGElementImpl::CreateSVGRect DontDelete|Function 0
+ createSVGTransform SVGSVGElementImpl::CreateSVGTransform DontDelete|Function 0
+ createSVGTransformFromMatrix SVGSVGElementImpl::CreateSVGTransformFromMatrix DontDelete|Function 1
+ suspendRedraw SVGSVGElementImpl::SuspendRedraw DontDelete|Function 1
+ unsuspendRedraw SVGSVGElementImpl::UnsuspendRedraw DontDelete|Function 1
+ unsuspendRedrawAll SVGSVGElementImpl::UnsuspendRedrawAll DontDelete|Function 0
+ forceRedraw SVGSVGElementImpl::ForceRedraw DontDelete|Function 0
+ pauseAnimations SVGSVGElementImpl::PauseAnimations DontDelete|Function 0
+ unpauseAnimations SVGSVGElementImpl::UnpauseAnimations DontDelete|Function 0
+ animationsPaused SVGSVGElementImpl::AnimationsPaused DontDelete|Function 0
+ getCurrentTime SVGSVGElementImpl::GetCurrentTime DontDelete|Function 0
+ setCurrentTime SVGSVGElementImpl::SetCurrentTime DontDelete|Function 1
+ getIntersectionList SVGSVGElementImpl::GetIntersectionList DontDelete|Function 2
+ getEnclosureList SVGSVGElementImpl::GetEnclosureList DontDelete|Function 2
+ checkIntersection SVGSVGElementImpl::CheckIntersection DontDelete|Function 2
+ checkEnclosure SVGSVGElementImpl::CheckEnclosure DontDelete|Function 2
+ deselectAll SVGSVGElementImpl::DeselectAll DontDelete|Function 0
+ getElementById SVGSVGElementImpl::GetElementById DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGSVGElement", SVGSVGElementImplProto, SVGSVGElementImplProtoFunc)
+
+Value SVGSVGElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ case Viewport:
+ return m_viewport->cache(exec);
+ case ContentScriptType:
+ return String(contentScriptType().string());
+ case ContentStyleType:
+ return String(contentStyleType().string());
+ case PixelUnitToMillimeterX:
+ return Number(pixelUnitToMillimeterX());
+ case PixelUnitToMillimeterY:
+ return Number(pixelUnitToMillimeterY());
+ case ScreenPixelToMillimeterX:
+ return Number(screenPixelToMillimeterX());
+ case ScreenPixelToMillimeterY:
+ return Number(screenPixelToMillimeterY());
+ case UseCurrentView:
+ return Boolean(useCurrentView());
+ case CurrentScale:
+ return Number(currentScale());
+ case CurrentTranslate:
+ return m_currentTranslate->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGSVGElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int)
+{
+ switch(token)
+ {
+ case ContentScriptType:
+ setContentScriptType(value.toString(exec).string());
+ break;
+ case ContentStyleType:
+ setContentStyleType(value.toString(exec).string());
+ break;
+ case CurrentScale:
+ m_currentScale = value.toNumber(exec);
+ break;
+ case X:
+ x()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Y:
+ y()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Width:
+ width()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Height:
+ height()->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case OnUnload:
+ // Spec: only applicable to outermost 'svg' elements
+ if(isRootElement())
+ setEventListener(SVGEvent::UNLOAD_EVENT, ownerDoc()->createEventListener(value.toString(exec).qstring()));
+ break;
+ case OnError:
+ setEventListener(SVGEvent::ERROR_EVENT, ownerDoc()->createEventListener(value.toString(exec).qstring()));
+ break;
+ case OnResize:
+ // Spec: only applicable to outermost 'svg' elements
+ if(isRootElement())
+ setEventListener(SVGEvent::RESIZE_EVENT, ownerDoc()->createEventListener(value.toString(exec).qstring()));
+ break;
+ case OnZoom:
+ // Spec: only applicable to outermost 'svg' elements
+ if(isRootElement())
+ setEventListener(SVGEvent::ZOOM_EVENT, ownerDoc()->createEventListener(value.toString(exec).qstring()));
+ break;
+ case OnScroll:
+ // Spec: only applicable to outermost 'svg' elements
+ if(isRootElement())
+ setEventListener(SVGEvent::SCROLL_EVENT, ownerDoc()->createEventListener(value.toString(exec).qstring()));
+ break;
+ default:
+ kdWarning() << k_funcinfo << "unhandled token " << token << endl;
+ }
+}
+
+Value SVGSVGElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGSVGElementImpl)
+
+ switch(id)
+ {
+ case SVGSVGElementImpl::CreateSVGNumber:
+ return obj->createSVGNumber()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGLength:
+ return obj->createSVGLength()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGAngle:
+ return obj->createSVGAngle()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGPoint:
+ return obj->createSVGPoint()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGMatrix:
+ return obj->createSVGMatrix()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGRect:
+ return obj->createSVGRect()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGTransform:
+ return obj->createSVGTransform()->cache(exec);
+ case SVGSVGElementImpl::CreateSVGTransformFromMatrix:
+ return obj->createSVGTransformFromMatrix(static_cast<KSVGBridge<SVGMatrixImpl> *>(args[0].imp())->impl())->cache(exec);
+ case SVGSVGElementImpl::GetElementById:
+ {
+ // Keep in sync with SVGDocumentImpl's version.
+ Value ret;
+
+ SVGElementImpl *element = obj->getElementById(args[0].toString(exec).string());
+
+ if(element)
+ ret = getDOMNode(exec, *element);
+ else
+ {
+ element = obj->ownerDoc()->recursiveSearch(*(obj->ownerDoc()), args[0].toString(exec).string());
+ if(!element)
+ return Null();
+
+ ret = getDOMNode(exec, *element);
+ }
+
+ return ret;
+ }
+ case SVGSVGElementImpl::GetCurrentTime:
+ return Number(obj->getCurrentTime());
+ case SVGSVGElementImpl::SetCurrentTime:
+ obj->setCurrentTime(args[0].toNumber(exec));
+ return Undefined();
+ case SVGSVGElementImpl::DeselectAll:
+ obj->deSelectAll();
+ return Undefined();
+ case SVGSVGElementImpl::PauseAnimations:
+ obj->pauseAnimations();
+ return Undefined();
+ case SVGSVGElementImpl::UnpauseAnimations:
+ obj->unpauseAnimations();
+ return Undefined();
+ case SVGSVGElementImpl::AnimationsPaused:
+ return Boolean(obj->animationsPaused());
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSVGElementImpl.h b/ksvg/impl/SVGSVGElementImpl.h
new file mode 100644
index 00000000..2405458e
--- /dev/null
+++ b/ksvg/impl/SVGSVGElementImpl.h
@@ -0,0 +1,198 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSVGElementImpl_H
+#define SVGSVGElementImpl_H
+
+#include <dom/dom_string.h>
+
+#include <qmap.h>
+
+#include "SVGTestsImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLocatableImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGZoomAndPanImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGPointImpl;
+class SVGAngleImpl;
+class SVGNumberImpl;
+class SVGLengthImpl;
+class SVGMatrixImpl;
+class SVGViewSpecImpl;
+class SVGTransformImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimationElementImpl;
+class SVGSVGElementImpl : public SVGContainerImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGLocatableImpl,
+ public SVGFitToViewBoxImpl,
+ public SVGZoomAndPanImpl
+{
+public:
+ SVGSVGElementImpl(DOM::ElementImpl *);
+ virtual ~SVGSVGElementImpl();
+
+ bool isRootElement() const;
+
+ SVGAnimatedLengthImpl *x();
+ SVGAnimatedLengthImpl *y();
+ SVGAnimatedLengthImpl *width();
+ SVGAnimatedLengthImpl *height();
+
+ void setContentScriptType(const DOM::DOMString &);
+ DOM::DOMString contentScriptType() const;
+
+ void setContentStyleType(const DOM::DOMString &);
+ DOM::DOMString contentStyleType() const;
+
+ SVGRectImpl *viewport();
+ SVGRectImpl *getBBox();
+
+ float pixelUnitToMillimeterX() const;
+ float pixelUnitToMillimeterY() const;
+ float screenPixelToMillimeterX() const;
+ float screenPixelToMillimeterY() const;
+
+ void setUseCurrentView(bool);
+ bool useCurrentView() const;
+ SVGViewSpecImpl *currentView() const;
+
+ void setCurrentScale(float);
+ float currentScale() const;
+
+ SVGPointImpl *currentTranslate();
+ void setCurrentTranslate(const QPoint &p);
+
+ unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
+ void unsuspendRedraw(unsigned long suspend_handle_id);
+ void unsuspendRedrawAll();
+ void forceRedraw();
+
+ void pauseAnimations();
+ void unpauseAnimations();
+
+ bool animationsPaused();
+
+ float getCurrentTime() const;
+ void setCurrentTime(float seconds);
+ DOM::NodeList getIntersectionList(SVGRectImpl *rect, SVGElementImpl *referenceElement);
+ DOM::NodeList getEnclosureList(SVGRectImpl *rect, SVGElementImpl *referenceElement);
+ bool checkIntersection(SVGElementImpl *element, SVGRectImpl *rect);
+ bool checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect);
+ void deSelectAll();
+
+ // Static creators for svg primitives
+ static SVGNumberImpl *createSVGNumber();
+ static SVGLengthImpl *createSVGLength();
+ static SVGAngleImpl *createSVGAngle();
+ static SVGPointImpl *createSVGPoint();
+ static SVGMatrixImpl *createSVGMatrix();
+ static SVGRectImpl *createSVGRect();
+ static SVGTransformImpl *createSVGTransform();
+ static SVGTransformImpl *createSVGTransformFromMatrix(SVGMatrixImpl *matrix);
+
+ SVGElementImpl *getElementById(const DOM::DOMString &elementId);
+ void addToIdMap(const QString &id, SVGElementImpl *obj);
+
+ virtual SVGMatrixImpl *getCTM();
+ virtual const SVGMatrixImpl *localMatrix();
+
+ void setAttributes();
+
+ bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *event);
+
+ virtual bool isContainer() const { return true; }
+
+ virtual void setClip(const QString &clip);
+ virtual QRect clip();
+
+ void setRootParentScreenCTM(SVGMatrixImpl *screenCTM);
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+ SVGRectImpl *m_viewport;
+
+ bool m_useCurrentView;
+
+ SVGViewSpecImpl *m_currentView;
+
+ float m_currentScale;
+
+ SVGPointImpl *m_currentTranslate;
+
+ SVGLengthImpl *m_clip[4];
+
+ QMap<QString, SVGElementImpl *> m_map;
+
+ // Transformation provided by the 'parent' of the outermost svg element
+ SVGMatrixImpl *m_rootParentScreenCTM;
+
+ SVGMatrixImpl *m_localMatrix;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height, ContentScriptType, ContentStyleType, Viewport,
+ PixelUnitToMillimeterX, PixelUnitToMillimeterY, ScreenPixelToMillimeterX, ScreenPixelToMillimeterY,
+ UseCurrentView, CurrentScale, CurrentTranslate, OnUnload, OnError, OnResize, OnZoom, OnScroll,
+ // Functions
+ CreateSVGNumber, CreateSVGLength, CreateSVGAngle, CreateSVGPoint, CreateSVGMatrix, CreateSVGRect, CreateSVGTransform,
+ CreateSVGTransformFromMatrix, SuspendRedraw, UnsuspendRedraw, UnsuspendRedrawAll, ForceRedraw,
+ PauseAnimations, UnpauseAnimations, AnimationsPaused, GetCurrentTime, SetCurrentTime,
+ GetIntersectionList, GetEnclosureList, CheckIntersection, CheckEnclosure,
+ DeselectAll, GetElementById
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGSVGElementImpl, "svg")
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGSVGElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGSVGElementImplProtoFunc, SVGSVGElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGScriptElementImpl.cc b/ksvg/impl/SVGScriptElementImpl.cc
new file mode 100644
index 00000000..9a211425
--- /dev/null
+++ b/ksvg/impl/SVGScriptElementImpl.cc
@@ -0,0 +1,185 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <kio/job.h>
+#include <kfilterdev.h>
+#include <qbuffer.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGScriptElementImpl.moc"
+
+using namespace KSVG;
+
+#include "SVGScriptElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGScriptElementImpl::SVGScriptElementImpl(DOM::ElementImpl *impl) : QObject(), SVGElementImpl(impl), SVGURIReferenceImpl(), SVGExternalResourcesRequiredImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_job = 0;
+ m_added = false;
+}
+
+SVGScriptElementImpl::~SVGScriptElementImpl()
+{
+}
+
+void SVGScriptElementImpl::setType(const DOM::DOMString &type)
+{
+ setAttribute("type", type);
+}
+
+DOM::DOMString SVGScriptElementImpl::type() const
+{
+ return getAttribute("type");
+}
+
+void SVGScriptElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: provide a default type
+ if(KSVG_TOKEN_NOT_PARSED(Type))
+ KSVG_SET_ALT_ATTRIBUTE(Type, "text/ecmascript")
+
+ // Remote downloading
+ QString href = m_href->baseVal().string();
+
+ if(!href.isEmpty())
+ {
+ KURL url(ownerDoc()->baseUrl(), href);
+
+ if(m_job == 0)
+ m_job = KIO::get(url, false, false);
+
+ connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
+ connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ }
+}
+
+void SVGScriptElementImpl::slotData(KIO::Job *, const QByteArray &data)
+{
+ QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
+ dataStream.writeRawBytes(data.data(), data.size());
+}
+
+void SVGScriptElementImpl::slotResult(KIO::Job *)
+{
+ m_job = 0;
+
+ // Append a NULL terminator so we don't die
+ m_data.resize(m_data.size() + 1);
+ m_data[m_data.size() - 1] = '\0';
+
+ QBuffer buf(m_data);
+ QIODevice *dev = KFilterDev::device(&buf, "application/x-gzip", false);
+ QByteArray contents;
+ if(dev->open(IO_ReadOnly))
+ contents = dev->readAll();
+ delete dev;
+ m_text = QString::fromUtf8(contents.data());
+
+ m_data.resize(0);
+}
+
+bool SVGScriptElementImpl::canExecuteScript()
+{
+ if(!m_added)
+ {
+ m_added = true;
+ m_text += collectText();
+ }
+
+ if(m_text.isEmpty() && !getAttribute("href").isNull() && !getAttribute("href").string().isEmpty())
+ return false;
+
+ return true;
+}
+
+bool SVGScriptElementImpl::executeScript(DOM::Node node)
+{
+ return SVGScriptElementImpl::executeScript(node, ownerDoc(), m_text);
+}
+
+bool SVGScriptElementImpl::executeScript(DOM::Node node, SVGDocumentImpl *document, const QString &text)
+{
+#ifdef KJS_VERBOSE
+ kdDebug(6070) << "SVGScriptElementImpl::executeScript n=" << node.nodeName().string().latin1() << "(" << (node.isNull() ? 0 : node.nodeType()) << ") " << text << endl;
+#endif
+ KSVGEcma *ecmaEngine = document->ecmaEngine();
+
+ if(!ecmaEngine->initialized())
+ ecmaEngine->setup();
+
+ KJS::Value thisNode = node.isNull() ? ecmaEngine->globalObject() : getDOMNode(ecmaEngine->globalExec(), node);
+
+ KJS::UString code(text);
+ KJS::Completion comp = ecmaEngine->evaluate(code, thisNode);
+
+ // TODO: If that's needed find a better solution which
+ // doesn't cause endless loops if the func, specified in
+ // onerror="..." isn't yet available
+ // onerror support
+// if(comp.complType() == Throw)
+// document->rootElement()->dispatchEvent(SVGEventImpl::ERROR_EVENT, false, false);
+
+ return (comp.complType() == KJS::Normal) || (comp.complType() == KJS::ReturnValue);
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGScriptElementImpl::s_hashTable 2
+ type SVGScriptElementImpl::Type DontDelete
+@end
+*/
+
+Value SVGScriptElementImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case Type:
+ return String(type());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGScriptElementImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Type:
+ setType(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGScriptElementImpl.h b/ksvg/impl/SVGScriptElementImpl.h
new file mode 100644
index 00000000..95affee2
--- /dev/null
+++ b/ksvg/impl/SVGScriptElementImpl.h
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGScriptElementImpl_H
+#define SVGScriptElementImpl_H
+
+#include <dom/dom_string.h>
+
+#include <kio/jobclasses.h>
+
+#include <qobject.h>
+
+#include "SVGElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGScriptElementImpl : public QObject,
+ public SVGElementImpl,
+ public SVGURIReferenceImpl,
+ public SVGExternalResourcesRequiredImpl
+{
+Q_OBJECT
+public:
+ SVGScriptElementImpl(DOM::ElementImpl *);
+ virtual ~SVGScriptElementImpl();
+
+ void setType(const DOM::DOMString &type);
+ DOM::DOMString type() const;
+
+ virtual void setAttributes();
+
+ bool canExecuteScript();
+ bool executeScript(DOM::Node node);
+
+ static bool executeScript(DOM::Node node, SVGDocumentImpl *document, const QString &text);
+
+private slots:
+ void slotData(KIO::Job *, const QByteArray &);
+ void slotResult(KIO::Job *);
+
+private:
+ KIO::TransferJob *m_job;
+ QByteArray m_data;
+ QString m_text;
+ bool m_added;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Type
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGScriptElementImpl, "script")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSetElementImpl.cc b/ksvg/impl/SVGSetElementImpl.cc
new file mode 100644
index 00000000..66460db9
--- /dev/null
+++ b/ksvg/impl/SVGSetElementImpl.cc
@@ -0,0 +1,48 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGSetElementImpl.h"
+
+using namespace KSVG;
+
+SVGSetElementImpl::SVGSetElementImpl(DOM::ElementImpl *impl) : SVGAnimationElementImpl(impl)
+{
+}
+
+SVGSetElementImpl::~SVGSetElementImpl()
+{
+}
+
+void SVGSetElementImpl::setAttributes()
+{
+ SVGAnimationElementImpl::setAttributes();
+
+ // Always create singleShot timers when used by <set> (Niko)
+ // Those are automatically deleted by the scheduler after timeout.
+ ownerDoc()->timeScheduler()->addTimer(this, int(getStartTime() * 1000.0));
+}
+
+void SVGSetElementImpl::handleTimerEvent()
+{
+ applyAttribute(getAttributeName(), getTo());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSetElementImpl.h b/ksvg/impl/SVGSetElementImpl.h
new file mode 100644
index 00000000..ab9f5ec5
--- /dev/null
+++ b/ksvg/impl/SVGSetElementImpl.h
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSetElementImpl_H
+#define SVGSetElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGAnimationElementImpl.h"
+
+class QTimer;
+
+namespace KSVG
+{
+
+class SVGSetElementImpl : public SVGAnimationElementImpl
+{
+public:
+ SVGSetElementImpl(DOM::ElementImpl *);
+ virtual ~SVGSetElementImpl();
+
+ virtual void handleTimerEvent();
+ virtual void setAttributes();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGSetElementImpl, "set")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGShapeImpl.cc b/ksvg/impl/SVGShapeImpl.cc
new file mode 100644
index 00000000..68e89aaa
--- /dev/null
+++ b/ksvg/impl/SVGShapeImpl.cc
@@ -0,0 +1,162 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGPaint.h"
+
+#include "SVGRectImpl.h"
+#include "SVGEventImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+SVGShapeImpl::SVGShapeImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ m_item = 0;
+}
+
+SVGShapeImpl::~SVGShapeImpl()
+{
+ if(hasChildNodes())
+ {
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGShapeImpl *rend = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle()));
+ if(rend)
+ rend->deref();
+ }
+ }
+}
+
+bool SVGShapeImpl::directRender()
+{
+ SVGShapeImpl *parent = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(parentNode().handle()));
+ if(parent)
+ return parent->directRender();
+ else
+ return true;
+}
+
+SVGRectImpl *SVGShapeImpl::getBBox()
+{
+ SVGRectImpl *rect = SVGSVGElementImpl::createSVGRect();
+ return rect;
+}
+
+SVGRectImpl *SVGShapeImpl::getBBoxInternal()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ if(m_item)
+ {
+ QRect r = m_item->bbox();
+ ret->setX(r.x());
+ ret->setY(r.y());
+ ret->setWidth(r.width());
+ ret->setHeight(r.height());
+ }
+ return ret;
+}
+
+bool SVGShapeImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+{
+ // TODO : pointer-events should be stored here, not in SVGStylableImpl.
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
+ if(!style || style->getPointerEvents() == PE_NONE)
+ return false;
+ bool testFill = false;
+ bool testStroke = false;
+ switch(style->getPointerEvents())
+ {
+ case PE_VISIBLE: testFill = testStroke = style->getVisible(); break;
+ case PE_VISIBLE_PAINTED: testStroke = style->getVisible() && style->isStroked();
+ case PE_VISIBLE_FILL: testFill = style->getVisible() && style->isFilled(); break;
+ case PE_VISIBLE_STROKE: testStroke = style->getVisible() && style->isStroked(); break;
+ case PE_PAINTED: testStroke = style->isStroked();
+ case PE_FILL: testFill = style->isFilled(); break;
+ case PE_STROKE: testStroke = style->isStroked(); break;
+ case PE_ALL:
+ default: testFill = testStroke = true;
+ };
+
+ if(testFill || testStroke)
+ {
+ if((testFill && m_item->fillContains(p)) || (testStroke && m_item->strokeContains(p)))
+ {
+ mev->setTarget(this);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void SVGShapeImpl::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(m_item)
+ m_item->update(reason, param1, param2);
+}
+
+void SVGShapeImpl::invalidate(KSVGCanvas *c, bool recalc)
+{
+ if(m_item && c)
+ c->invalidate(m_item, recalc);
+}
+
+void SVGShapeImpl::setReferenced(bool referenced)
+{
+ if(m_item)
+ m_item->setReferenced(referenced);
+}
+
+void SVGShapeImpl::draw()
+{
+ if(m_item)
+ m_item->draw();
+}
+
+void SVGShapeImpl::blit(KSVGCanvas *c)
+{
+ SVGRectImpl *rect = getBBoxInternal();
+ c->blit(rect->qrect(), true);
+ rect->deref();
+}
+
+void SVGShapeImpl::removeItem(KSVGCanvas *c)
+{
+ if(m_item && c)
+ {
+ c->removeItem(m_item);
+ m_item = 0;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGShapeImpl.h b/ksvg/impl/SVGShapeImpl.h
new file mode 100644
index 00000000..ae183251
--- /dev/null
+++ b/ksvg/impl/SVGShapeImpl.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGShapeImpl_H
+#define SVGShapeImpl_H
+
+#include "SVGElementImpl.h"
+#include "CanvasItem.h"
+
+class QPoint;
+
+namespace KSVG
+{
+
+class KSVGCanvas;
+
+class SVGRectImpl;
+class SVGMouseEventImpl;
+
+class SVGShapeImpl : public SVGElementImpl
+{
+public:
+ SVGShapeImpl(DOM::ElementImpl *);
+ virtual ~SVGShapeImpl();
+
+ virtual SVGRectImpl *getBBox();
+ virtual SVGRectImpl *getBBoxInternal();
+
+ virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+
+ virtual bool directRender();
+ virtual bool isContainer() const { return false; }
+
+ virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
+ virtual void invalidate(KSVGCanvas *c, bool recalc);
+ virtual void setReferenced(bool referenced);
+ virtual void draw();
+ virtual void blit(KSVGCanvas *);
+
+ virtual void removeItem(KSVGCanvas *c);
+
+ CanvasItem *item() { return m_item; }
+
+protected:
+ CanvasItem *m_item;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStopElementImpl.cc b/ksvg/impl/SVGStopElementImpl.cc
new file mode 100644
index 00000000..09761232
--- /dev/null
+++ b/ksvg/impl/SVGStopElementImpl.cc
@@ -0,0 +1,125 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGLengthImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGStopElementImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGColorImpl.h"
+
+using namespace KSVG;
+
+#include "SVGStopElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGStopElementImpl::SVGStopElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGStylableImpl(this)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_offset = new SVGAnimatedNumberImpl();
+ m_offset->ref();
+
+ m_stopOpacity = 1;
+}
+
+SVGStopElementImpl::~SVGStopElementImpl()
+{
+ if(m_offset)
+ m_offset->deref();
+}
+
+SVGAnimatedNumberImpl *SVGStopElementImpl::offset() const
+{
+ return m_offset;
+}
+
+float SVGStopElementImpl::stopOpacity() const
+{
+ return m_stopOpacity;
+}
+
+
+/*
+@namespace KSVG
+@begin SVGStopElementImpl::s_hashTable 3
+ offset SVGStopElementImpl::Offset DontDelete|ReadOnly
+ stop-opacity SVGStopElementImpl::StopOpacity DontDelete|ReadOnly
+@end
+*/
+
+Value SVGStopElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Offset:
+ if(!attributeMode)
+ return m_offset->cache(exec);
+ else
+ return Number(m_offset->baseVal());
+ case StopOpacity:
+ if(!attributeMode)
+ return Undefined();
+ else
+ return Number(m_stopOpacity);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGStopElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Offset:
+ float temp;
+ SVGLengthImpl::convertPercentageToFloat(value.toString(exec).qstring(), temp);
+ offset()->setBaseVal(temp);
+ break;
+ case StopOpacity:
+ {
+ SVGLengthImpl::convertPercentageToFloat(value.toString(exec).qstring(), m_stopOpacity);
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGStopElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not set, specifiy 0
+ if(KSVG_TOKEN_NOT_PARSED(Offset))
+ KSVG_SET_ALT_ATTRIBUTE(Offset, "0")
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStopElementImpl.h b/ksvg/impl/SVGStopElementImpl.h
new file mode 100644
index 00000000..369b7867
--- /dev/null
+++ b/ksvg/impl/SVGStopElementImpl.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStopElementImpl_H
+#define SVGStopElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedNumberImpl;
+class SVGStopElementImpl : public SVGElementImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGStopElementImpl(DOM::ElementImpl *);
+ virtual ~SVGStopElementImpl();
+
+ SVGAnimatedNumberImpl *offset() const;
+ float stopOpacity() const;
+
+ virtual void setAttributes();
+
+private:
+ SVGAnimatedNumberImpl *m_offset;
+ float m_stopOpacity;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Offset, StopOpacity
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGStopElementImpl, "stop")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStringListImpl.cc b/ksvg/impl/SVGStringListImpl.cc
new file mode 100644
index 00000000..b70adfdd
--- /dev/null
+++ b/ksvg/impl/SVGStringListImpl.cc
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGStringListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGStringListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SharedString::s_hashTable 2
+ dummy SharedString::Dummy DontDelete|ReadOnly
+@end
+*/
+
+/*
+@namespace KSVG
+@begin SVGStringListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGStringListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGStringList", SVGStringListImplProto, SVGStringListImplProtoFunc)
+
+Value SVGStringListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SharedString>::getValueProperty(exec, token);
+}
+
+Value SVGStringListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGStringListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SharedString> *>(obj), args, id);
+}
+
+QString SVGStringListImpl::join(const QString &seperator) const
+{
+ SVGStringListImpl *self = const_cast<SVGStringListImpl *>(this);
+
+ QString result;
+
+ if(!self->getItem(0))
+ return result;
+ else
+ result += self->getItem(0)->string();
+
+ for(unsigned int i = 1; i <= numberOfItems(); i++)
+ {
+ DOM::DOMString *string = self->getItem(i);
+
+ if(string)
+ result += seperator + string->string();
+ }
+
+ return result;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStringListImpl.h b/ksvg/impl/SVGStringListImpl.h
new file mode 100644
index 00000000..7f69a3c9
--- /dev/null
+++ b/ksvg/impl/SVGStringListImpl.h
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStringListImpl_H
+#define SVGStringListImpl_H
+
+#include <dom/dom_string.h>
+
+#include "SVGList.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SharedString : public DOM::DomShared,
+ public DOM::DOMString
+{
+public:
+ SharedString() : DOM::DomShared(), DOM::DOMString() { }
+ SharedString(const QString &string) : DOM::DomShared(), DOM::DOMString(string) { }
+ SharedString(const SharedString &string) : DOM::DomShared(), DOM::DOMString(string) { }
+ SharedString(DOM::DOMString *string) : DOM::DomShared(), DOM::DOMString(string->implementation()) { }
+ virtual ~SharedString() { }
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ Dummy
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const
+ {
+ switch(token)
+ {
+ case Dummy:
+ return KJS::Undefined();
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+ }
+};
+
+class SVGStringListImpl : public SVGList<SharedString>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+ QString join(const QString &seperator) const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGStringListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGStringListImplProtoFunc, SVGStringListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStylableImpl.cc b/ksvg/impl/SVGStylableImpl.cc
new file mode 100644
index 00000000..096ebf93
--- /dev/null
+++ b/ksvg/impl/SVGStylableImpl.cc
@@ -0,0 +1,1309 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qrect.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include "SVGPaint.h"
+#include "SVGColorImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGLengthImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGColorProfileElementImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGStylableImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGStylableImpl::SVGStylableImpl(SVGElementImpl *object) : m_object(object)
+{
+ KSVG_EMPTY_FLAGS
+
+ // View propidx.html, if you want to verify those default values (Niko)
+ m_flags = SVG_STYLE_FLAG_NONE;
+
+ // Initialize all pointers to 0
+ // Important!
+ m_color = 0;
+ m_fillColor = 0;
+ m_stopColor = 0;
+ m_dashArray = 0;
+ m_dashOffset = 0;
+ m_strokeWidth = 0;
+ m_strokeColor = 0;
+ m_fontFamily = 0;
+
+ m_fillOpacity = 1;
+ m_strokeOpacity = 1;
+ m_opacity = 1;
+
+ // Special case, getFontSize() could be accessed
+ // _before_ processStyle() is called -> no default
+ // value for font-size yet -> crash
+ // SVGLengthImpl access it when parsing em/ex values (Niko)
+ m_fontSize = -1;
+}
+
+SVGStylableImpl::~SVGStylableImpl()
+{
+ if(m_strokeWidth)
+ m_strokeWidth->deref();
+ if(m_fontFamily)
+ m_fontFamily->deref();
+ if(m_strokeColor)
+ m_strokeColor->deref();
+ if(m_fillColor)
+ m_fillColor->deref();
+ if(m_color)
+ m_color->deref();
+ if(m_stopColor)
+ m_stopColor->deref();
+ if(m_dashOffset)
+ m_dashOffset->deref();
+ if(m_dashArray)
+ m_dashArray->deref();
+}
+
+void SVGStylableImpl::processStyle()
+{
+ SVGStylableImpl *parentStyle = 0;
+ if(m_object && m_object->ownerDoc())
+ parentStyle = dynamic_cast<SVGStylableImpl *>(m_object->ownerDoc()->getElementFromHandle((*m_object).parentNode().handle()));
+
+ // Spec: default "none"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE)
+ {
+ m_strokeColor = new SVGPaintImpl(m_object);
+ m_strokeColor->ref();
+
+ SVGPaintImpl *strokeColor = 0L;
+ if(parentStyle)
+ strokeColor = parentStyle->getStrokeColor();
+
+ if(strokeColor)
+ *m_strokeColor = *strokeColor;
+ else
+ m_strokeColor->setPaint(SVG_PAINTTYPE_NONE);
+ }
+
+ // Spec: default "black"
+ if(~m_flags & SVG_STYLE_FLAG_FILL)
+ {
+ m_fillColor = new SVGPaintImpl(m_object);
+ m_fillColor->ref();
+
+ SVGPaintImpl *fillColor = 0;
+ if(parentStyle)
+ fillColor = parentStyle->getFillColor();
+
+ if(fillColor)
+ *m_fillColor = *fillColor;
+ else
+ m_fillColor->setRGBColor(DOM::DOMString("black"));
+ }
+
+ // Spec: no real default
+ if(~m_flags & SVG_STYLE_FLAG_COLOR)
+ {
+ m_color = new SVGColorImpl(m_object);
+ m_color->ref();
+ SVGColorImpl *color = 0;
+ if(parentStyle)
+ color = parentStyle->getColor();
+
+ if(color)
+ *m_color = *color;
+ }
+
+ // Spec: default sRGB
+ if(~m_flags & SVG_STYLE_FLAG_COLOR_INTERPOLATION)
+ {
+ if(parentStyle)
+ m_colorInterpolation = parentStyle->getColorInterpolation();
+ else
+ m_colorInterpolation = CI_SRGB;
+ }
+
+ // Spec: default "1"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_WIDTH)
+ {
+ m_strokeWidth = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, m_object);
+ m_strokeWidth->ref();
+
+ SVGAnimatedLengthImpl *strokeWidth = 0;
+ if(parentStyle)
+ strokeWidth = parentStyle->getStrokeWidth();
+
+ if(strokeWidth)
+ *m_strokeWidth = *strokeWidth;
+ else
+ m_strokeWidth->baseVal()->setValue(1.0);
+ }
+
+ // Spec: default "4"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_MITER_LIMIT)
+ {
+ if(parentStyle)
+ m_strokeMiterlimit = parentStyle->getStrokeMiterlimit();
+ else
+ m_strokeMiterlimit = 4;
+ }
+
+ // Spec: default "butt"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_CAP)
+ {
+ if(parentStyle)
+ m_capStyle = parentStyle->getCapStyle();
+ else
+ m_capStyle = PATH_STROKE_CAP_BUTT;
+ }
+
+ // Spec: default "miter"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_JOIN)
+ {
+ if(parentStyle)
+ m_joinStyle = parentStyle->getJoinStyle();
+ else
+ m_joinStyle = PATH_STROKE_JOIN_MITER;
+ }
+
+ // Spec: default "auto"
+ if(~m_flags & SVG_STYLE_FLAG_CURSOR)
+ {
+ if(parentStyle)
+ m_cursor = parentStyle->getCursor();
+ else
+ m_cursor = CURSOR_AUTO;
+ }
+
+ // Spec: default "visiblePainted"
+ if(~m_flags & SVG_STYLE_FLAG_POINTER_EVENTS)
+ {
+ if(parentStyle)
+ m_pointerEvents = parentStyle->getPointerEvents();
+ else
+ m_pointerEvents = PE_VISIBLE_PAINTED;
+ }
+
+ // Spec: default "0"
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_DASH_OFFSET)
+ {
+ m_dashOffset = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, m_object);
+ m_dashOffset->ref();
+
+ SVGAnimatedLengthImpl *dashOffset = 0;
+ if(parentStyle)
+ dashOffset = parentStyle->getDashOffset();
+
+ if(dashOffset)
+ *m_dashOffset = *dashOffset;
+ else
+ m_dashOffset->baseVal()->setValue(0);
+ }
+
+ // Spec: default "none" -> 0 == empty dash array
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_DASH_ARRAY)
+ {
+ SVGAnimatedLengthListImpl *dashArray = 0;
+ if(parentStyle)
+ dashArray = parentStyle->getDashArray();
+
+ if(dashArray)
+ {
+ if (!m_dashArray)
+ {
+ m_dashArray = new SVGAnimatedLengthListImpl();
+ m_dashArray->ref();
+ }
+ *m_dashArray = *dashArray;
+ }
+ else
+ m_dashArray = 0;
+ }
+
+ // Spec: default "1" -> 1 == Not opaque
+ if(~m_flags & SVG_STYLE_FLAG_FILL_OPACITY)
+ {
+ if(parentStyle)
+ m_fillOpacity = parentStyle->getFillOpacity();
+ else
+ m_fillOpacity = 1;
+ }
+
+ if(~m_flags & SVG_STYLE_FLAG_STROKE_OPACITY)
+ {
+ if(parentStyle)
+ m_strokeOpacity = parentStyle->getStrokeOpacity();
+ else
+ m_strokeOpacity = 1;
+ }
+
+ // Fake group opacity by multiplying by our parent's group opacity
+ if(~m_flags & SVG_STYLE_FLAG_OPACITY)
+ {
+ if(parentStyle)
+ m_opacity = parentStyle->getOpacity();
+ else
+ m_opacity = 1;
+ }
+ else
+ if(parentStyle)
+ m_opacity *= parentStyle->getOpacity();
+
+ if(~m_flags & SVG_STYLE_FLAG_CLIP_PATH)
+ m_clipPath = "";
+
+ if(~m_flags & SVG_STYLE_FLAG_MASK)
+ m_mask = "";
+
+ // Spec: default "nonzero"
+ if(~m_flags & SVG_STYLE_FLAG_FILL_RULE)
+ {
+ if(parentStyle)
+ m_fillRule = parentStyle->getFillRule();
+ else
+ m_fillRule = RULE_NONZERO;
+ }
+
+ if(~m_flags & SVG_STYLE_FLAG_CLIP_RULE)
+ {
+ if(parentStyle)
+ m_clipRule = parentStyle->getClipRule();
+ else
+ m_clipRule = RULE_NONZERO;
+ }
+
+ // Spec: default "hidden"
+ if(~m_flags & SVG_STYLE_FLAG_OVERFLOW)
+ {
+ if(parentStyle)
+ m_overflow = parentStyle->getOverflow();
+ else
+ m_overflow = false;
+ }
+
+ // We are not really, spec compatible here, we just
+ // define a bool, to indicate wheter an element should
+ // be rendered or not.
+ if(~m_flags & SVG_STYLE_FLAG_DISPLAY)
+ m_display = true;
+
+ if(~m_flags & SVG_STYLE_FLAG_VISIBILITY)
+ {
+ if(parentStyle)
+ m_visible = parentStyle->getVisible();
+ else
+ m_visible = true;
+ }
+
+ // Spec: default "medium"
+ if(~m_flags & SVG_STYLE_FLAG_FONT_SIZE)
+ {
+ if(parentStyle)
+ m_fontSize = parentStyle->getFontSize();
+ else
+ m_fontSize = fontSizeForText("medium");
+ }
+
+ // Spec: default "depends on user agent" -> "Arial" for SVG
+ if(~m_flags & SVG_STYLE_FLAG_FONT_FAMILY)
+ {
+ if(!m_fontFamily)
+ {
+ m_fontFamily = new SVGStringListImpl();
+ m_fontFamily->ref();
+ }
+
+ SVGStringListImpl *fontFamily = 0;
+ if(parentStyle)
+ fontFamily = parentStyle->getFontFamily();
+
+ if(fontFamily)
+ *m_fontFamily = *fontFamily;
+ else
+ {
+ SharedString *string = new SharedString("Arial");
+ string->ref();
+
+ m_fontFamily->appendItem(string);
+ }
+ }
+
+ // Spec: default "normal"
+ if(~m_flags & SVG_STYLE_FLAG_FONT_STYLE)
+ {
+ if(parentStyle)
+ m_fontStyle = parentStyle->getFontStyle();
+ else
+ m_fontStyle = FSNORMAL;
+ }
+
+ // Spec: default "normal"
+ if(~m_flags & SVG_STYLE_FLAG_FONT_WEIGHT)
+ {
+ if(parentStyle)
+ m_fontWeight = parentStyle->getFontWeight();
+ else
+ m_fontWeight = "normal";
+ }
+
+ // Spec: default "start"
+ if(~m_flags & SVG_STYLE_FLAG_TEXT_ANCHOR)
+ {
+ if(parentStyle)
+ m_textAnchor = parentStyle->getTextAnchor();
+ else
+ m_textAnchor = TASTART;
+ }
+
+ // Spec: default "LTR"
+ if(~m_flags & SVG_STYLE_FLAG_TEXT_DIRECTION)
+ {
+ if(parentStyle)
+ m_textDirection = parentStyle->getTextDirection();
+ else
+ m_textDirection = LTR;
+ }
+
+ // Spec: default "none"
+ if(~m_flags & SVG_STYLE_FLAG_TEXT_DECORATION)
+ {
+ if(parentStyle)
+ m_textDecoration = parentStyle->getTextDecoration();
+ else
+ m_textDecoration = TDNONE;
+ }
+
+ // Spec: default "baseline"
+ if(~m_flags & SVG_STYLE_FLAG_BASELINE_SHIFT)
+ {
+ if(parentStyle)
+ m_baselineShift = parentStyle->getBaselineShift();
+ else
+ m_baselineShift = "baseline";
+ }
+
+ // Spec: default "lr-tb", FIXME
+ if(~m_flags & SVG_STYLE_FLAG_TEXT_WRITING_MODE)
+ {
+ if(parentStyle)
+ m_textWritingMode = parentStyle->getTextWritingMode();
+ else
+ m_textWritingMode = LR;
+ }
+
+ // Spec: default "normal"
+ if(~m_flags & SVG_STYLE_FLAG_TEXT_UNICODE_BIDI)
+ {
+ if(parentStyle)
+ m_textUnicodeBidi = parentStyle->getTextUnicodeBidi();
+ else
+ m_textUnicodeBidi = UBNORMAL;
+ }
+
+ // Spec: default "auto"
+ if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL)
+ {
+ if(parentStyle)
+ m_glyphOrientationVertical = parentStyle->getGlyphOrientationVertical();
+ else
+ m_glyphOrientationVertical = "auto";
+ }
+
+ // Spec: default "auto"
+ if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL)
+ {
+ if(parentStyle)
+ m_glyphOrientationHorizontal = parentStyle->getGlyphOrientationHorizontal();
+ else
+ m_glyphOrientationHorizontal = "auto";
+ }
+
+ // Spec: default "normal"
+ if(~m_flags & SVG_STYLE_FLAG_LETTER_SPACING)
+ {
+ if(parentStyle)
+ m_letterSpacing = parentStyle->getLetterSpacing();
+ else
+ m_letterSpacing = "normal";
+ }
+
+ // Spec: default "normal"
+ if(~m_flags & SVG_STYLE_FLAG_WORD_SPACING)
+ {
+ if(parentStyle)
+ m_wordSpacing = parentStyle->getWordSpacing();
+ else
+ m_wordSpacing = "normal";
+ }
+
+ // Spec: default "black"
+ if(~m_flags & SVG_STYLE_FLAG_STOP)
+ {
+ m_stopColor = new SVGColorImpl(m_object);
+ m_stopColor->ref();
+
+ m_stopColor->setRGBColor(DOM::DOMString("black"));
+ }
+
+ // Spec: default "none"
+ if(~m_flags & SVG_STYLE_FLAG_MARKER_START)
+ {
+ if(parentStyle)
+ m_startMarker = parentStyle->getStartMarker();
+ else
+ m_startMarker = QString::null;
+ }
+
+ // Spec: default "none"
+ if(~m_flags & SVG_STYLE_FLAG_MARKER_MID)
+ {
+ if(parentStyle)
+ m_midMarker = parentStyle->getMidMarker();
+ else
+ m_midMarker = QString::null;
+ }
+
+ // Spec: default "none"
+ if(~m_flags & SVG_STYLE_FLAG_MARKER_END)
+ {
+ if(parentStyle)
+ m_endMarker = parentStyle->getEndMarker();
+ else
+ m_endMarker = QString::null;
+ }
+}
+
+bool SVGStylableImpl::isStroked() const
+{
+ if(!m_strokeColor)
+ return false;
+
+ return m_strokeColor->paintType() != SVG_PAINTTYPE_UNKNOWN &&
+ m_strokeColor->paintType() != SVG_PAINTTYPE_NONE &&
+ m_strokeColor->paintType() != SVG_PAINTTYPE_URI_NONE;
+}
+
+bool SVGStylableImpl::isFilled() const
+{
+ if(!m_fillColor)
+ return false;
+
+ return m_fillColor->paintType() != SVG_PAINTTYPE_UNKNOWN &&
+ m_fillColor->paintType() != SVG_PAINTTYPE_NONE &&
+ m_fillColor->paintType() != SVG_PAINTTYPE_URI_NONE;
+}
+
+QString SVGStylableImpl::extractUrlId(const QString &url)
+{
+ QString id;
+
+ if(url.startsWith("url(#"))
+ {
+ int idstart = url.find("#") + 1;
+ id = url.mid(idstart, url.length() - idstart - 1);
+ }
+ else
+ id = url;
+
+ return id;
+}
+
+void SVGStylableImpl::setMarkers(const QString &marker)
+{
+ setStartMarker(marker);
+ setMidMarker(marker);
+ setEndMarker(marker);
+}
+
+void SVGStylableImpl::setStartMarker(const QString &startMarker)
+{
+ if(startMarker.startsWith("url(#"))
+ {
+ int idstart = startMarker.find("#") + 1;
+ m_startMarker = startMarker.mid(idstart, startMarker.length() - idstart - 1);
+ }
+ else if(startMarker == "none")
+ m_startMarker = QString::null;
+}
+
+void SVGStylableImpl::setMidMarker(const QString &midMarker)
+{
+ if(midMarker.startsWith("url(#"))
+ {
+ int idstart = midMarker.find("#") + 1;
+ m_midMarker = midMarker.mid(idstart, midMarker.length() - idstart - 1);
+ }
+ else if(midMarker == "none")
+ m_midMarker = QString::null;
+}
+
+void SVGStylableImpl::setEndMarker(const QString &endMarker)
+{
+ if(endMarker.startsWith("url(#"))
+ {
+ int idstart = endMarker.find("#") + 1;
+ m_endMarker = endMarker.mid(idstart, endMarker.length() - idstart - 1);
+ }
+ else if(endMarker == "none")
+ m_endMarker = QString::null;
+}
+
+bool SVGStylableImpl::hasMarkers() const
+{
+ return !m_startMarker.isEmpty() || !m_midMarker.isEmpty() || !m_endMarker.isEmpty();
+}
+
+void SVGStylableImpl::setPaint(const QString &param, SVGPaintImpl *svgPaint)
+{
+ if(param.stripWhiteSpace() == "none")
+ svgPaint->setPaint(SVG_PAINTTYPE_NONE, DOM::DOMString(""), DOM::DOMString(""));
+ else if(SVGURIReferenceImpl::isUrl(param))
+ svgPaint->setUri(SVGURIReferenceImpl::getTarget(param));
+ else
+ setColor(param, svgPaint);
+}
+
+void SVGStylableImpl::setColor(const QString &param, SVGColorImpl *svgColor)
+{
+ if(param.stripWhiteSpace().startsWith("#"))
+ {
+ if(param.contains("icc-color"))
+ {
+ QString first = param.left(7);
+ QString last = param.right(param.length() - 8);
+
+ svgColor->setRGBColorICCColor(first, last);
+ }
+ else
+ {
+ QColor color;
+ color.setNamedColor(param.stripWhiteSpace());
+ svgColor->setRGBColor(color);
+ }
+ }
+ else if(param.stripWhiteSpace().startsWith("rgb("))
+ {
+ QString parse = param.stripWhiteSpace();
+ QStringList colors = QStringList::split(',', parse);
+ QString r = colors[0].right((colors[0].length() - 4));
+ QString g = colors[1];
+ QString b = colors[2].left((colors[2].length() - 1));
+
+ if(r.contains("%"))
+ {
+ r = r.left(r.length() - 1);
+ r = QString::number(int((double(255 * r.toDouble()) / 100.0)));
+ }
+
+ if(g.contains("%"))
+ {
+ g = g.left(g.length() - 1);
+ g = QString::number(int((double(255 * g.toDouble()) / 100.0)));
+ }
+
+ if(b.contains("%"))
+ {
+ b = b.left(b.length() - 1);
+ b = QString::number(int((double(255 * b.toDouble()) / 100.0)));
+ }
+
+ svgColor->setRGBColor(int(r.toFloat()), int(g.toFloat()), int(b.toFloat()));
+ }
+ else
+ {
+ if(param.stripWhiteSpace().lower() == "currentcolor")
+ svgColor->setColor(SVG_COLORTYPE_CURRENTCOLOR, DOM::DOMString(""), DOM::DOMString(""));
+ else
+ svgColor->setRGBColor(DOM::DOMString(param.stripWhiteSpace().lower()));
+ }
+}
+
+QRect SVGStylableImpl::clip()
+{
+ return QRect();
+}
+
+void SVGStylableImpl::setClip(const QString &)
+{
+}
+
+float SVGStylableImpl::fontSizeForText(const QString &value)
+{
+ float ret = -1;
+
+ // Spec: "On a computer screen a scaling factor of 1.2 is suggested between adjacent indexes"
+ const float factor = 1.2;
+
+ // Spec: "If the 'medium' font is 12pt, the 'large' font could be 14.4pt."
+ const float mediumFont = 12.0;
+
+ if(value == "xx-small")
+ ret = mediumFont - (3.0 * factor);
+ else if(value == "x-small")
+ ret = mediumFont - (2.0 * factor);
+ else if(value == "small")
+ ret = mediumFont - factor;
+ else if(value == "medium")
+ ret = mediumFont;
+ else if(value == "large")
+ ret = mediumFont + factor;
+ else if(value == "x-large")
+ ret = mediumFont + (2.0 * factor);
+ else if(value == "xx-large")
+ ret = mediumFont + (3.0 * factor);
+
+ return ret;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGStylableImpl::s_hashTable 47
+ className SVGStylableImpl::ClassName DontDelete|ReadOnly
+ style SVGStylableImpl::Style DontDelete|ReadOnly
+ stroke-width SVGStylableImpl::StrokeWidth DontDelete|ReadOnly
+ stroke-miterlimit SVGStylableImpl::StrokeMiterlimit DontDelete|ReadOnly
+ stroke-linecap SVGStylableImpl::StrokeLineCap DontDelete|ReadOnly
+ stroke-linejoin SVGStylableImpl::StrokeLineJoin DontDelete|ReadOnly
+ stroke SVGStylableImpl::Stroke DontDelete|ReadOnly
+ fill SVGStylableImpl::Fill DontDelete|ReadOnly
+ color SVGStylableImpl::Color DontDelete|ReadOnly
+ stop-color SVGStylableImpl::StopColor DontDelete|ReadOnly
+ font-size SVGStylableImpl::FontSize DontDelete|ReadOnly
+ font-family SVGStylableImpl::FontFamily DontDelete|ReadOnly
+ font-weight SVGStylableImpl::FontWeight DontDelete|ReadOnly
+ font-style SVGStylableImpl::FontStyle DontDelete|ReadOnly
+ text-decoration SVGStylableImpl::TextDecoration DontDelete|ReadOnly
+ text-anchor SVGStylableImpl::TextAnchor DontDelete|ReadOnly
+ direction SVGStylableImpl::Direction DontDelete|ReadOnly
+ writing-mode SVGStylableImpl::WritingMode DontDelete|ReadOnly
+ unicode-bidi SVGStylableImpl::UnicodeBidi DontDelete|ReadOnly
+ opacity SVGStylableImpl::Opacity DontDelete|ReadOnly
+ fill-opacity SVGStylableImpl::FillOpacity DontDelete|ReadOnly
+ stroke-opacity SVGStylableImpl::StrokeOpacity DontDelete|ReadOnly
+ clip-path SVGStylableImpl::ClipPath DontDelete|ReadOnly
+ marker-start SVGStylableImpl::MarkerStart DontDelete|ReadOnly
+ marker-mid SVGStylableImpl::MarkerMid DontDelete|ReadOnly
+ marker-end SVGStylableImpl::MarkerEnd DontDelete|ReadOnly
+ marker SVGStylableImpl::Marker DontDelete|ReadOnly
+ cursor SVGStylableImpl::Cursor DontDelete|ReadOnly
+ display SVGStylableImpl::Display DontDelete|ReadOnly
+ overflow SVGStylableImpl::Overflow DontDelete|ReadOnly
+ clip SVGStylableImpl::Clip DontDelete|ReadOnly
+ visibility SVGStylableImpl::Visibility DontDelete|ReadOnly
+ fill-rule SVGStylableImpl::FillRule DontDelete|ReadOnly
+ clip-rule SVGStylableImpl::ClipRule DontDelete|ReadOnly
+ stroke-dashoffset SVGStylableImpl::StrokeDashOffset DontDelete|ReadOnly
+ stroke-dasharray SVGStylableImpl::StrokeDashArray DontDelete|ReadOnly
+ color-profile SVGStylableImpl::ColorProfile DontDelete|ReadOnly
+ baseline-shift SVGStylableImpl::BaselineShift DontDelete|ReadOnly
+ letter-spacing SVGStylableImpl::LetterSpacing DontDelete|ReadOnly
+ word-spacing SVGStylableImpl::WordSpacing DontDelete|ReadOnly
+ pointer-events SVGStylableImpl::PointerEvents DontDelete|ReadOnly
+ glyph-orientation-vertical SVGStylableImpl::GlyphOrientationVertical DontDelete|ReadOnly
+ glyph-orientation-horizontal SVGStylableImpl::GlyphOrientationHorizontal DontDelete|ReadOnly
+ color-interpolation SVGStylableImpl::ColorInterpolation DontDelete|ReadOnly
+ mask SVGStylableImpl::Mask DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGStylableImplProto::s_hashTable 2
+ getStyle SVGStylableImpl::GetStyle DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGStylable", SVGStylableImplProto, SVGStylableImplProtoFunc)
+
+Value SVGStylableImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ //case ClassName:
+ // return String(className().string());
+ case Style:
+ return String(m_object ? m_object->DOM::Element::getAttribute("style") : "");
+ case Visibility:
+ return String(m_visible ? "visible" : "hidden");
+ case Display:
+ return String(m_display ? "inline" : "none");
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ QString param = value.toString(exec).qstring();
+
+ if (param.isEmpty())
+ return;
+
+ bool redraw = false;
+ bool inherit = (param == "inherit");
+ int update = -1;
+
+ switch(token)
+ {
+ case Style:
+ {
+ if(!m_object)
+ return;
+
+ QStringList substyles = QStringList::split(';', param);
+ for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ {
+ QStringList substyle = QStringList::split(':', (*it));
+ m_object->setAttributeInternal(substyle[0].stripWhiteSpace(), substyle[1].stripWhiteSpace());
+ }
+ break;
+ }
+ case StrokeWidth:
+ if(m_flags & SVG_STYLE_FLAG_STROKE_WIDTH)
+ {
+ redraw = true;
+ update = UPDATE_LINEWIDTH;
+ }
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_STROKE_WIDTH;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_STROKE_WIDTH;
+
+ if(!m_strokeWidth)
+ {
+ m_strokeWidth = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, m_object);
+ m_strokeWidth->ref();
+ }
+
+ m_strokeWidth->baseVal()->setValueAsString(param);
+ }
+ break;
+ case StrokeMiterlimit:
+ m_flags |= SVG_STYLE_FLAG_STROKE_MITER_LIMIT;
+ if(!inherit)
+ m_strokeMiterlimit = param.toUInt();
+ break;
+ case StrokeLineCap:
+ m_flags |= SVG_STYLE_FLAG_STROKE_LINE_CAP;
+ if(param == "butt")
+ m_capStyle = PATH_STROKE_CAP_BUTT;
+ else if(param == "round")
+ m_capStyle = PATH_STROKE_CAP_ROUND;
+ else if(param == "square")
+ m_capStyle = PATH_STROKE_CAP_SQUARE;
+ break;
+ case StrokeLineJoin:
+ m_flags |= SVG_STYLE_FLAG_STROKE_LINE_JOIN;
+ if(param == "miter")
+ m_joinStyle = PATH_STROKE_JOIN_MITER;
+ else if(param == "round")
+ m_joinStyle = PATH_STROKE_JOIN_ROUND;
+ else if(param == "bevel")
+ m_joinStyle = PATH_STROKE_JOIN_BEVEL;
+ break;
+ case Stroke:
+ if(m_flags & SVG_STYLE_FLAG_STROKE)
+ redraw = true;
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_STROKE;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_STROKE;
+
+ if(!m_strokeColor)
+ {
+ m_strokeColor = new SVGPaintImpl(m_object);
+ m_strokeColor->ref();
+ }
+
+ setPaint(param, m_strokeColor);
+ }
+ break;
+ case Fill:
+ if(m_flags & SVG_STYLE_FLAG_FILL)
+ {
+ redraw = true;
+ update = UPDATE_STYLE;
+ }
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_FILL;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_FILL;
+
+ if(!m_fillColor)
+ {
+ m_fillColor = new SVGPaintImpl(m_object);
+ m_fillColor->ref();
+ }
+
+ setPaint(param, m_fillColor);
+ }
+ break;
+ case Color:
+ if(m_flags & SVG_STYLE_FLAG_COLOR)
+ redraw = true;
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_COLOR;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_COLOR;
+
+ if(!m_color)
+ {
+ m_color = new SVGColorImpl(m_object);
+ m_color->ref();
+ }
+ setColor(param, m_color);
+ }
+ break;
+ case StopColor:
+ m_flags |= SVG_STYLE_FLAG_STOP;
+
+ if(!m_stopColor)
+ {
+ m_stopColor = new SVGColorImpl(m_object);
+ m_stopColor->ref();
+ }
+
+ if(!inherit)
+ setColor(param, m_stopColor);
+ break;
+ case ColorInterpolation:
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_COLOR_INTERPOLATION;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_COLOR_INTERPOLATION;
+ if(param == "auto" || param == "sRGB")
+ m_colorInterpolation = CI_SRGB;
+ else
+ if(param == "linearRGB")
+ m_colorInterpolation = CI_LINEARRGB;
+ }
+ break;
+ case FontSize:
+ {
+ m_flags |= SVG_STYLE_FLAG_FONT_SIZE;
+ if(!inherit)
+ {
+ double temp = fontSizeForText(param);
+ if(temp != -1) // Is "absolute-size"
+ {
+ m_fontSize = temp;
+ break;
+ }
+
+ SVGLengthImpl *length = SVGSVGElementImpl::createSVGLength();
+ length->setContext(m_object);
+ length->setValueAsString(DOM::DOMString(param));
+ m_fontSize = length->value();
+ length->deref();
+ }
+ break;
+ }
+ case FontFamily:
+ m_flags |= SVG_STYLE_FLAG_FONT_FAMILY;
+
+ // Hacks
+ // #1 Replace "'" characters by ""
+ param = param.replace('\'', QString::null);
+ // #2 Replace "MS-Gothic" by "MS Gothic"
+ param = param.replace("MS-Gothic", "MS Gothic");
+ // #3 Replace "Helvetica" by "Arial"
+ param = param.replace("Helvetica", "Arial");
+ param = param.replace("helvetica", "Arial");
+
+ if(!m_fontFamily)
+ {
+ m_fontFamily = new SVGStringListImpl();
+ m_fontFamily->ref();
+ }
+
+ if(!inherit)
+ SVGHelperImpl::parseCommaSeperatedList(m_fontFamily, param);
+ break;
+ case FontWeight:
+ m_flags |= SVG_STYLE_FLAG_FONT_WEIGHT;
+ if(!inherit)
+ m_fontWeight = param;
+ break;
+ case FontStyle:
+ m_flags |= SVG_STYLE_FLAG_FONT_STYLE;
+ if(param == "normal")
+ m_fontStyle = FSNORMAL;
+ else if(param == "italic")
+ m_fontStyle = ITALIC;
+ else if(param == "oblique")
+ m_fontStyle = OBLIQUE;
+ break;
+ case TextDecoration:
+ m_flags |= SVG_STYLE_FLAG_TEXT_DECORATION;
+ if(param == "none")
+ m_textDecoration = TDNONE;
+ {
+ // CSS2 allows multiple decorations
+ m_textDecoration = TDNONE;
+ QStringList decorations = QStringList::split(' ', param);
+ for(QStringList::Iterator it = decorations.begin(); it != decorations.end(); ++it)
+ {
+ if(*it == "underline")
+ m_textDecoration |= UNDERLINE;
+ else if(*it == "overline")
+ m_textDecoration |= OVERLINE;
+ else if(*it == "line-through")
+ m_textDecoration |= LINE_THROUGH;
+ }
+ }
+ break;
+ case TextAnchor:
+ m_flags |= SVG_STYLE_FLAG_TEXT_ANCHOR;
+ if(param == "start")
+ m_textAnchor = TASTART;
+ else if(param == "middle")
+ m_textAnchor = TAMIDDLE;
+ else if(param == "end")
+ m_textAnchor = TAEND;
+ break;
+ case Direction:
+ m_flags |= SVG_STYLE_FLAG_TEXT_DIRECTION;
+ // Spec: direction is only processed when unicode-bidi
+ // is set to bidi-override or embedded
+ if(m_textUnicodeBidi == OVERRIDE ||
+ m_textUnicodeBidi == EMBED ||
+ m_textUnicodeBidi == UBNORMAL)
+ {
+ if(param == "rtl")
+ m_textDirection = RTL;
+ else if(param == "ltr")
+ m_textDirection = LTR;
+ }
+ break;
+ case WritingMode:
+ m_flags |= SVG_STYLE_FLAG_TEXT_WRITING_MODE;
+ if(param == "lr-tb" || param == "lr")
+ m_textWritingMode = LR;
+ else if(param == "rl-tb" || param == "rl")
+ m_textWritingMode = RL;
+ else if(param == "tb-lr" || param == "tb")
+ m_textWritingMode = TB;
+ break;
+ case UnicodeBidi:
+ m_flags |= SVG_STYLE_FLAG_TEXT_UNICODE_BIDI;
+ if(param == "normal")
+ m_textUnicodeBidi = UBNORMAL;
+ else if(param == "embed")
+ m_textUnicodeBidi = EMBED;
+ else if(param == "bidi-override")
+ m_textUnicodeBidi = OVERRIDE;
+ break;
+ case GlyphOrientationVertical:
+ m_flags |= SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL;
+ m_glyphOrientationVertical = param;
+ break;
+ case GlyphOrientationHorizontal:
+ m_flags |= SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL;
+ m_glyphOrientationHorizontal = param;
+ break;
+ case Opacity:
+ m_flags |= SVG_STYLE_FLAG_OPACITY;
+
+ if(!inherit)
+ {
+ SVGLengthImpl::convertPercentageToFloat(value.toString(exec).qstring(), m_opacity);
+ }
+ break;
+ case FillOpacity:
+ m_flags |= SVG_STYLE_FLAG_FILL_OPACITY;
+
+ if(!inherit)
+ {
+ SVGLengthImpl::convertPercentageToFloat(value.toString(exec).qstring(), m_fillOpacity);
+ }
+ break;
+ case StrokeOpacity:
+ m_flags |= SVG_STYLE_FLAG_STROKE_OPACITY;
+
+ if(!inherit)
+ {
+ SVGLengthImpl::convertPercentageToFloat(value.toString(exec).qstring(), m_strokeOpacity);
+ }
+ break;
+ case ClipPath:
+ m_flags |= SVG_STYLE_FLAG_CLIP_PATH;
+ if(!inherit)
+ m_clipPath = extractUrlId(param);
+ break;
+ case Mask:
+ m_flags |= SVG_STYLE_FLAG_MASK;
+ if(!inherit)
+ m_mask = extractUrlId(param);
+ break;
+ case MarkerStart:
+ m_flags |= SVG_STYLE_FLAG_MARKER_START;
+ if(!inherit)
+ setStartMarker(param);
+ break;
+ case MarkerMid:
+ m_flags |= SVG_STYLE_FLAG_MARKER_MID;
+ if(!inherit)
+ setMidMarker(param);
+ break;
+ case MarkerEnd:
+ m_flags |= SVG_STYLE_FLAG_MARKER_END;
+ if(!inherit)
+ setEndMarker(param);
+ break;
+ case Marker:
+ m_flags |= (SVG_STYLE_FLAG_MARKER_START | SVG_STYLE_FLAG_MARKER_MID | SVG_STYLE_FLAG_MARKER_END);
+ if(!inherit)
+ setMarkers(param);
+ break;
+ case PointerEvents:
+ m_flags |= SVG_STYLE_FLAG_POINTER_EVENTS;
+ if(param == "none")
+ m_pointerEvents = PE_NONE;
+ else if(param == "stroke")
+ m_pointerEvents = PE_STROKE;
+ else if(param == "fill")
+ m_pointerEvents = PE_FILL;
+ else if(param == "painted")
+ m_pointerEvents = PE_PAINTED;
+ else if(param == "visibleStroke")
+ m_pointerEvents = PE_VISIBLE_STROKE;
+ else if(param == "visibleFill")
+ m_pointerEvents = PE_VISIBLE_FILL;
+ else if(param == "visiblePainted")
+ m_pointerEvents = PE_VISIBLE_PAINTED;
+ else if(param == "visible")
+ m_pointerEvents = PE_VISIBLE;
+ else if(param == "all")
+ m_pointerEvents = PE_ALL;
+ break;
+ case Cursor:
+ m_flags |= SVG_STYLE_FLAG_CURSOR;
+ if(param == "auto")
+ m_cursor = CURSOR_AUTO;
+ else if(param == "crosshair")
+ m_cursor = CURSOR_CROSSHAIR;
+ else if(param == "default")
+ m_cursor = CURSOR_DEFAULT;
+ else if(param == "pointer")
+ m_cursor = CURSOR_POINTER;
+ else if(param == "move")
+ m_cursor = CURSOR_MOVE;
+ else if(param == "e-resize")
+ m_cursor = CURSOR_E_RESIZE;
+ else if(param == "ne-resize")
+ m_cursor = CURSOR_NE_RESIZE;
+ else if(param == "nw-resize")
+ m_cursor = CURSOR_NW_RESIZE;
+ else if(param == "n-resize")
+ m_cursor = CURSOR_N_RESIZE;
+ else if(param == "se-resize")
+ m_cursor = CURSOR_SE_RESIZE;
+ else if(param == "sw-resize")
+ m_cursor = CURSOR_SW_RESIZE;
+ else if(param == "s-resize")
+ m_cursor = CURSOR_S_RESIZE;
+ else if(param == "w-resize")
+ m_cursor = CURSOR_W_RESIZE;
+ else if(param == "text")
+ m_cursor = CURSOR_TEXT;
+ else if(param == "wait")
+ m_cursor = CURSOR_WAIT;
+ else if(param == "help")
+ m_cursor = CURSOR_HELP;
+ break;
+ case Display:
+ m_flags |= SVG_STYLE_FLAG_DISPLAY;
+
+ if(param == "none")
+ m_display = false;
+ else if(!inherit)
+ m_display = true;
+ break;
+ case Overflow:
+ m_flags |= SVG_STYLE_FLAG_OVERFLOW;
+ if(param == "hidden" || param == "scroll")
+ m_overflow = false;
+ else if(!inherit)
+ m_overflow = true;
+ break;
+ case Clip:
+ m_flags |= SVG_STYLE_FLAG_CLIP_PATH;
+ if(!inherit)
+ setClip(param);
+ break;
+ case Visibility:
+ if(m_flags & SVG_STYLE_FLAG_VISIBILITY)
+ redraw = true;
+ if(inherit)
+ m_flags &= ~SVG_STYLE_FLAG_COLOR;
+ else
+ {
+ m_flags |= SVG_STYLE_FLAG_VISIBILITY;
+
+ if(param == "visible")
+ m_visible = true;
+ else if(!inherit)
+ m_visible = false;
+
+ // Just a quick fix for the script-* files (Niko)
+ // Any better solution??
+ update = UPDATE_TRANSFORM;
+ redraw = true;
+ }
+ SVGHelperImpl::applyContainer<SVGStylableImpl>(this, Visibility, param);
+ break;
+ case FillRule:
+ m_flags |= SVG_STYLE_FLAG_FILL_RULE;
+ if(!inherit)
+ m_fillRule = (param == "evenodd" ? RULE_EVENODD : RULE_NONZERO);
+ break;
+ case ClipRule:
+ m_flags |= SVG_STYLE_FLAG_CLIP_RULE;
+ if(!inherit)
+ m_clipRule = (param == "evenodd" ? RULE_EVENODD : RULE_NONZERO);
+ break;
+ case StrokeDashOffset:
+ m_flags |= SVG_STYLE_FLAG_STROKE_DASH_OFFSET;
+
+ if(!m_dashOffset)
+ {
+ m_dashOffset = new SVGAnimatedLengthImpl(LENGTHMODE_OTHER, m_object);
+ m_dashOffset->ref();
+ }
+
+ if(!inherit)
+ m_dashOffset->baseVal()->setValueAsString(param);
+ break;
+ case StrokeDashArray:
+ {
+ m_flags |= SVG_STYLE_FLAG_STROKE_DASH_ARRAY;
+
+ if(!m_dashArray)
+ {
+ m_dashArray = new SVGAnimatedLengthListImpl();
+ m_dashArray->ref();
+ }
+ else
+ m_dashArray->baseVal()->clear();
+
+ if(param != "none" && !inherit)
+ SVGHelperImpl::parseLengthList(m_dashArray, param);
+ break;
+ }
+ case ColorProfile:
+ {
+ m_flags |= SVG_STYLE_FLAG_COLOR_PROFILE;
+ if(!inherit)
+ {
+ if(!m_object)
+ return;
+
+ SVGColorProfileElementImpl *handle = static_cast<SVGColorProfileElementImpl *>(m_object->ownerSVGElement()->getElementById(SVGURIReferenceImpl::getTarget(param)));
+ if(handle)
+ SVGImageElementImpl::applyColorProfile(handle, static_cast<SVGImageElementImpl *>(this));
+ }
+ break;
+ }
+ case BaselineShift:
+ {
+ m_flags |= SVG_STYLE_FLAG_BASELINE_SHIFT;
+ if(!inherit)
+ m_baselineShift = param;
+ break;
+ }
+ case LetterSpacing:
+ m_flags |= SVG_STYLE_FLAG_LETTER_SPACING;
+ case WordSpacing:
+ {
+ if(!inherit)
+ {
+ if(token == WordSpacing)
+ {
+ m_flags |= SVG_STYLE_FLAG_WORD_SPACING;
+ m_wordSpacing = param;
+ }
+ else
+ m_letterSpacing = param;
+ }
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+
+ if(redraw)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_object);
+ if(inherit)
+ processStyle();
+
+ if(shape && shape->item())
+ {
+ if(update > -1)
+ shape->item()->update(static_cast<CanvasItemUpdate>(update));
+ else if(m_object)
+ m_object->ownerDoc()->canvas()->invalidate(shape->item(), false);
+ }
+ }
+}
+
+Value SVGStylableImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &)
+{
+ KSVG_CHECK_THIS(SVGStylableImpl)
+
+ switch(id)
+ {
+ case SVGStylableImpl::GetStyle:
+ return Undefined();
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStylableImpl.h b/ksvg/impl/SVGStylableImpl.h
new file mode 100644
index 00000000..0a399a4c
--- /dev/null
+++ b/ksvg/impl/SVGStylableImpl.h
@@ -0,0 +1,327 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStylableImpl_H
+#define SVGStylableImpl_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+class QRect;
+
+// from libart, but now no dependency
+typedef enum
+{
+ PATH_STROKE_JOIN_MITER,
+ PATH_STROKE_JOIN_ROUND,
+ PATH_STROKE_JOIN_BEVEL
+} PathStrokeJoinType;
+
+typedef enum
+{
+ PATH_STROKE_CAP_BUTT,
+ PATH_STROKE_CAP_ROUND,
+ PATH_STROKE_CAP_SQUARE
+} PathStrokeCapType;
+
+#define SVG_STYLE_FLAG_NONE 0x0000000000000ULL
+#define SVG_STYLE_FLAG_BASELINE_SHIFT 0x0000000000001ULL
+#define SVG_STYLE_FLAG_CLIP_PATH 0x0000000000002ULL
+#define SVG_STYLE_FLAG_CLIP_RULE 0x0000000000004ULL
+#define SVG_STYLE_FLAG_COLOR 0x0000000000008ULL
+#define SVG_STYLE_FLAG_COLOR_INTERPOLATION 0x0000000000010ULL
+#define SVG_STYLE_FLAG_COLOR_INTERPOLATION_FILTERS 0x0000000000020ULL
+#define SVG_STYLE_FLAG_COLOR_PROFILE 0x0000000000040ULL
+#define SVG_STYLE_FLAG_COLOR_RENDERING 0x0000000000080ULL
+#define SVG_STYLE_FLAG_CURSOR 0x0000000000100ULL
+#define SVG_STYLE_FLAG_DIRECTION 0x0000000000200ULL
+#define SVG_STYLE_FLAG_DISPLAY 0x0000000000400ULL
+#define SVG_STYLE_FLAG_FILL 0x0000000000800ULL
+#define SVG_STYLE_FLAG_FILL_OPACITY 0x0000000001000ULL
+#define SVG_STYLE_FLAG_FILL_RULE 0x0000000002000ULL
+#define SVG_STYLE_FLAG_FONT_FAMILY 0x0000000004000ULL
+#define SVG_STYLE_FLAG_FONT_SIZE 0x0000000008000ULL
+#define SVG_STYLE_FLAG_FONT_SIZE_ADJUST 0x0000000010000ULL
+#define SVG_STYLE_FLAG_FONT_STRETCH 0x0000000020000ULL
+#define SVG_STYLE_FLAG_FONT_STYLE 0x0000000040000ULL
+#define SVG_STYLE_FLAG_FONT_VARIANT 0x0000000080000ULL
+#define SVG_STYLE_FLAG_FONT_WEIGHT 0x0000000100000ULL
+#define SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL 0x0000000200000ULL
+#define SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL 0x0000000400000ULL
+#define SVG_STYLE_FLAG_IMAGE_RENDERING 0x0000000800000ULL
+#define SVG_STYLE_FLAG_KERNING 0x0000001000000ULL
+#define SVG_STYLE_FLAG_LETTER_SPACING 0x0000002000000ULL
+#define SVG_STYLE_FLAG_MARKER 0x0000004000000ULL
+#define SVG_STYLE_FLAG_MARKER_END 0x0000008000000ULL
+#define SVG_STYLE_FLAG_MARKER_MID 0x0000010000000ULL
+#define SVG_STYLE_FLAG_MARKER_START 0x0000020000000ULL
+#define SVG_STYLE_FLAG_OPACITY 0x0000040000000ULL
+#define SVG_STYLE_FLAG_POINTER_EVENTS 0x0000080000000ULL
+#define SVG_STYLE_FLAG_SHAPE_RENDERING 0x0000100000000ULL
+#define SVG_STYLE_FLAG_STOP 0x0000200000000ULL
+#define SVG_STYLE_FLAG_STROKE_DASH_ARRAY 0x0000400000000ULL
+#define SVG_STYLE_FLAG_STROKE_DASH_OFFSET 0x0000800000000ULL
+#define SVG_STYLE_FLAG_STROKE_LINE_CAP 0x0001000000000ULL
+#define SVG_STYLE_FLAG_STROKE_LINE_JOIN 0x0002000000000ULL
+#define SVG_STYLE_FLAG_STROKE_MITER_LIMIT 0x0004000000000ULL
+#define SVG_STYLE_FLAG_STROKE_OPACITY 0x0008000000000ULL
+#define SVG_STYLE_FLAG_STROKE 0x0010000000000ULL
+#define SVG_STYLE_FLAG_STROKE_WIDTH 0x0020000000000ULL
+#define SVG_STYLE_FLAG_TEXT_ANCHOR 0x0040000000000ULL
+#define SVG_STYLE_FLAG_TEXT_DECORATION 0x0080000000000ULL
+#define SVG_STYLE_FLAG_TEXT_DIRECTION 0x0100000000000ULL
+#define SVG_STYLE_FLAG_TEXT_RENDERING 0x0200000000000ULL
+#define SVG_STYLE_FLAG_TEXT_UNICODE_BIDI 0x0400000000000ULL
+#define SVG_STYLE_FLAG_TEXT_WRITING_MODE 0x0800000000000ULL
+#define SVG_STYLE_FLAG_VISIBILITY 0x1000000000000ULL
+#define SVG_STYLE_FLAG_WORD_SPACING 0x2000000000000ULL
+#define SVG_STYLE_FLAG_OVERFLOW 0x4000000000000ULL
+#define SVG_STYLE_FLAG_MASK 0x0008000000000000ULL
+
+//?#define SVG_STYLE_FLAG_MASK_INHERIT 0x0010000000000000ULL
+
+// Helper macros
+#define STYLE_GET(Return, Name, Member) \
+protected:\
+ Return Member;\
+public:\
+Return get ##Name () const { return Member; }
+
+#define STYLE_GET_OPTIM(Return, Name, Member, Optim) \
+protected:\
+ Return Member : Optim;\
+public:\
+Return get ##Name () const { return Member; }
+
+#define STYLE_HAS(Name, Member) \
+bool has##Name () { return ! Member .isEmpty(); }
+
+namespace KSVG
+{
+
+enum ECursor
+{
+ CURSOR_AUTO,
+ CURSOR_CROSSHAIR,
+ CURSOR_DEFAULT,
+ CURSOR_POINTER,
+ CURSOR_MOVE,
+ CURSOR_E_RESIZE,
+ CURSOR_NE_RESIZE,
+ CURSOR_N_RESIZE,
+ CURSOR_NW_RESIZE,
+ CURSOR_SE_RESIZE,
+ CURSOR_SW_RESIZE,
+ CURSOR_S_RESIZE,
+ CURSOR_W_RESIZE,
+ CURSOR_TEXT,
+ CURSOR_WAIT,
+ CURSOR_HELP
+};
+
+enum ETextDirection
+{
+ LTR, RTL
+};
+
+enum ETextDecoration
+{
+ TDNONE = 0, UNDERLINE = 1, OVERLINE = 2, LINE_THROUGH = 4
+};
+
+enum ETextAnchor
+{
+ TASTART, TAMIDDLE, TAEND
+};
+
+enum EUnicodeBidi
+{
+ UBNORMAL, EMBED, OVERRIDE, INHERIT
+};
+
+enum EFontStyle
+{
+ FSNORMAL, ITALIC, OBLIQUE
+};
+
+enum ETextWritingMode
+{
+ LR, RL, TB
+};
+
+enum EWindRule
+{
+ RULE_NONZERO,
+ RULE_EVENODD
+};
+
+enum EPointerEvents
+{
+ PE_NONE,
+ PE_STROKE,
+ PE_FILL,
+ PE_PAINTED,
+ PE_VISIBLE,
+ PE_VISIBLE_STROKE,
+ PE_VISIBLE_FILL,
+ PE_VISIBLE_PAINTED,
+ PE_ALL,
+ PE_INHERIT
+};
+
+enum EColorInterpolation
+{
+ CI_SRGB,
+ CI_LINEARRGB
+};
+
+class SVGColorImpl;
+class SVGPaintImpl;
+class SVGLengthImpl;
+class SVGAnimatedLengthImpl;
+class SVGAnimatedLengthListImpl;
+class SVGMatrixImpl;
+class SVGStringListImpl;
+class SVGElementImpl;
+class SVGStylableImpl
+{
+public:
+ SVGStylableImpl(SVGElementImpl *object);
+ virtual ~SVGStylableImpl();
+
+ static void setColor(const QString &, SVGColorImpl *);
+
+ STYLE_GET(SVGAnimatedLengthImpl *, DashOffset, m_dashOffset)
+ STYLE_GET(SVGAnimatedLengthListImpl *, DashArray, m_dashArray)
+ STYLE_GET(SVGPaintImpl *, StrokeColor, m_strokeColor)
+ STYLE_GET(SVGPaintImpl *, FillColor, m_fillColor)
+ STYLE_GET(SVGColorImpl *, StopColor, m_stopColor)
+ STYLE_GET(SVGColorImpl *, Color, m_color)
+ STYLE_GET(SVGAnimatedLengthImpl *, StrokeWidth, m_strokeWidth)
+ STYLE_GET(SVGStringListImpl *, FontFamily, m_fontFamily);
+ STYLE_GET(float, FontSize, m_fontSize)
+ STYLE_GET(QString, LetterSpacing, m_letterSpacing)
+ STYLE_GET(QString, WordSpacing, m_wordSpacing)
+ STYLE_GET(QString, FontWeight, m_fontWeight)
+ STYLE_GET(QString, ClipPath, m_clipPath)
+ STYLE_GET(QString, Mask, m_mask)
+ STYLE_GET(QString, StartMarker, m_startMarker)
+ STYLE_GET(QString, MidMarker, m_midMarker)
+ STYLE_GET(QString, EndMarker, m_endMarker)
+ STYLE_GET(QString, BaselineShift, m_baselineShift)
+ STYLE_GET(QString, GlyphOrientationVertical, m_glyphOrientationVertical)
+ STYLE_GET(QString, GlyphOrientationHorizontal, m_glyphOrientationHorizontal)
+ STYLE_GET(float, Opacity, m_opacity)
+ STYLE_GET(float, FillOpacity, m_fillOpacity)
+ STYLE_GET(float, StrokeOpacity, m_strokeOpacity)
+ STYLE_GET(unsigned int, StrokeMiterlimit, m_strokeMiterlimit)
+
+ STYLE_GET_OPTIM(EPointerEvents, PointerEvents, m_pointerEvents, 4)
+ STYLE_GET_OPTIM(ECursor, Cursor, m_cursor, 4)
+ STYLE_GET_OPTIM(EWindRule, FillRule, m_fillRule, 1)
+ STYLE_GET_OPTIM(EWindRule, ClipRule, m_clipRule, 1)
+ STYLE_GET_OPTIM(PathStrokeCapType, CapStyle, m_capStyle, 2)
+ STYLE_GET_OPTIM(PathStrokeJoinType, JoinStyle, m_joinStyle, 2)
+ STYLE_GET_OPTIM(ETextDirection, TextDirection, m_textDirection, 1)
+ STYLE_GET_OPTIM(unsigned int, TextDecoration, m_textDecoration, 3)
+ STYLE_GET_OPTIM(ETextAnchor, TextAnchor, m_textAnchor, 2)
+ STYLE_GET_OPTIM(EUnicodeBidi, TextUnicodeBidi, m_textUnicodeBidi, 2)
+ STYLE_GET_OPTIM(ETextWritingMode, TextWritingMode, m_textWritingMode, 2)
+ STYLE_GET_OPTIM(EFontStyle, FontStyle, m_fontStyle, 2)
+ STYLE_GET_OPTIM(bool, Overflow, m_overflow, 1)
+ STYLE_GET_OPTIM(bool, Visible, m_visible, 1)
+ STYLE_GET_OPTIM(bool, Display, m_display, 1)
+ STYLE_GET_OPTIM(EColorInterpolation, ColorInterpolation, m_colorInterpolation, 1)
+
+ STYLE_HAS(ClipPath, m_clipPath)
+ STYLE_HAS(Mask, m_mask)
+ STYLE_HAS(StartMarker, m_startMarker)
+ STYLE_HAS(MidMarker, m_midMarker)
+ STYLE_HAS(EndMarker, m_endMarker)
+
+ // Special "set" cases
+ void setStartMarker(const QString &);
+ void setMidMarker(const QString &);
+ void setEndMarker(const QString &);
+ void setMarkers(const QString &);
+
+ // Special "has" cases
+ bool hasMarkers() const;
+
+ // Special "is" cases
+ bool isStroked() const;
+ bool isFilled() const;
+
+ // Function which sets default values
+ void processStyle();
+
+ // Special virtual functions
+ virtual void setClip(const QString &clip);
+ virtual QRect clip();
+
+protected:
+ float fontSizeForText(const QString &);
+
+ SVGElementImpl *m_object;
+
+private:
+ void setPaint(const QString &, SVGPaintImpl *);
+ QString extractUrlId(const QString& string);
+
+ unsigned long long m_flags;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ ClassName, Style,
+ StrokeWidth, StrokeMiterlimit, StrokeLineCap, StrokeLineJoin,
+ Stroke, Fill, Color, StopColor, FontSize, FontFamily, FontWeight,
+ FontStyle, TextDecoration, TextAnchor, Direction, WritingMode,
+ UnicodeBidi, Opacity, FillOpacity, StrokeOpacity, ClipPath,
+ MarkerStart, MarkerMid, MarkerEnd, Marker, Cursor, Display,
+ Overflow, Clip, Visibility, FillRule, ClipRule,
+ StrokeDashOffset, StrokeDashArray, ColorProfile, BaselineShift,
+ LetterSpacing, WordSpacing, PointerEvents,
+ GlyphOrientationVertical, GlyphOrientationHorizontal,
+ ColorInterpolation, Mask,
+ // Functions
+ GetStyle
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGStylableImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGStylableImplProtoFunc, SVGStylableImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStyleElementImpl.cc b/ksvg/impl/SVGStyleElementImpl.cc
new file mode 100644
index 00000000..d826441b
--- /dev/null
+++ b/ksvg/impl/SVGStyleElementImpl.cc
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGStyleElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGStyleElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGStyleElementImpl::SVGStyleElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+ KSVG_EMPTY_FLAGS
+}
+
+SVGStyleElementImpl::~SVGStyleElementImpl()
+{
+}
+
+void SVGStyleElementImpl::setXmlspace(const DOM::DOMString &xmlspace)
+{
+ setAttribute("xml:space", xmlspace);
+}
+
+DOM::DOMString SVGStyleElementImpl::xmlspace() const
+{
+ return getAttribute("xml:space");
+}
+
+void SVGStyleElementImpl::setType(const DOM::DOMString &type)
+{
+ setAttribute("type", type);
+}
+
+DOM::DOMString SVGStyleElementImpl::type() const
+{
+ return getAttribute("type");
+}
+
+void SVGStyleElementImpl::setMedia(const DOM::DOMString &media)
+{
+ setAttribute("media", media);
+}
+
+DOM::DOMString SVGStyleElementImpl::media() const
+{
+ return getAttribute("media");
+}
+
+void SVGStyleElementImpl::setTitle(const DOM::DOMString &title)
+{
+ setAttribute("title", title);
+}
+
+DOM::DOMString SVGStyleElementImpl::title() const
+{
+ return getAttribute("title");
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGStyleElementImpl::s_hashTable 5
+ xmlspace SVGStyleElementImpl::Xmlspace DontDelete
+ type SVGStyleElementImpl::Type DontDelete
+ media SVGStyleElementImpl::Media DontDelete
+ title SVGStyleElementImpl::Title DontDelete
+@end
+*/
+
+Value SVGStyleElementImpl::getValueProperty(ExecState *, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Xmlspace:
+ return String(xmlspace());
+ case Type:
+ return String(type());
+ case Media:
+ return String(media());
+ case Title:
+ return String(title());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGStyleElementImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case Xmlspace:
+ setXmlspace(value.toString(exec).string());
+ break;
+ case Type:
+ setType(value.toString(exec).string());
+ break;
+ case Media:
+ setMedia(value.toString(exec).string());
+ break;
+ case Title:
+ setTitle(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ break;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGStyleElementImpl.h b/ksvg/impl/SVGStyleElementImpl.h
new file mode 100644
index 00000000..fcf7b152
--- /dev/null
+++ b/ksvg/impl/SVGStyleElementImpl.h
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGStyleElementImpl_H
+#define SVGStyleElementImpl_H
+
+#include <dom/dom_string.h>
+
+#include "SVGElementImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGStyleElementImpl : public SVGElementImpl
+{
+public:
+ SVGStyleElementImpl(DOM::ElementImpl *);
+ virtual ~SVGStyleElementImpl();
+
+ void setXmlspace(const DOM::DOMString &xmlspace);
+ DOM::DOMString xmlspace() const;
+
+ void setType(const DOM::DOMString &type);
+ DOM::DOMString type() const;
+
+ void setMedia(const DOM::DOMString &media);
+ DOM::DOMString media() const;
+
+ void setTitle(const DOM::DOMString &title);
+ DOM::DOMString title() const;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Xmlspace, Type, Media, Title
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGStyleElementImpl, "style")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSwitchElementImpl.cc b/ksvg/impl/SVGSwitchElementImpl.cc
new file mode 100644
index 00000000..613a1982
--- /dev/null
+++ b/ksvg/impl/SVGSwitchElementImpl.cc
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGSwitchElementImpl.h"
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+SVGSwitchElementImpl::SVGSwitchElementImpl(DOM::ElementImpl *impl) : SVGContainerImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+}
+
+SVGSwitchElementImpl::~SVGSwitchElementImpl()
+{
+}
+
+void SVGSwitchElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ DOM::Node node = firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+
+ if(element && shape && ok && style->getVisible() && style->getDisplay() && (shape->directRender() || !directRender()))
+ {
+ element->createItem(c);
+ break;
+ }
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSwitchElementImpl.h b/ksvg/impl/SVGSwitchElementImpl.h
new file mode 100644
index 00000000..2b29d2a4
--- /dev/null
+++ b/ksvg/impl/SVGSwitchElementImpl.h
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSwitchElementImpl_H
+#define SVGSwitchElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGContainerImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGSwitchElementImpl : public SVGContainerImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGSwitchElementImpl(DOM::ElementImpl *);
+ virtual ~SVGSwitchElementImpl();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+ virtual bool isContainer() const { return true; }
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGSwitchElementImpl, "switch")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSymbolElementImpl.cc b/ksvg/impl/SVGSymbolElementImpl.cc
new file mode 100644
index 00000000..da0b5b90
--- /dev/null
+++ b/ksvg/impl/SVGSymbolElementImpl.cc
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGRectImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGSymbolElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+#include "SVGSymbolElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+
+SVGSymbolElementImpl::SVGSymbolElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGFitToViewBoxImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_width = new SVGAnimatedLengthImpl(LENGTHMODE_WIDTH, this);
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this);
+ m_height->ref();
+}
+
+SVGSymbolElementImpl::~SVGSymbolElementImpl()
+{
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+}
+/*
+@namespace KSVG
+@begin SVGSymbolElementImpl::s_hashTable 3
+ width SVGSymbolElementImpl::Width DontDelete|ReadOnly
+ height SVGSymbolElementImpl::Height DontDelete|ReadOnly
+@end
+*/
+
+Value SVGSymbolElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGSymbolElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Width:
+ m_width->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ case Height:
+ m_height->baseVal()->setValueAsString(value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGSymbolElementImpl.h b/ksvg/impl/SVGSymbolElementImpl.h
new file mode 100644
index 00000000..19278ea0
--- /dev/null
+++ b/ksvg/impl/SVGSymbolElementImpl.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGSymbolElementImpl_H
+#define SVGSymbolElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGFitToViewBoxImpl;
+class SVGAnimatedLengthImpl;
+class SVGSymbolElementImpl : public SVGShapeImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGFitToViewBoxImpl
+{
+public:
+ SVGSymbolElementImpl(DOM::ElementImpl *);
+ virtual ~SVGSymbolElementImpl();
+
+ virtual bool isContainer() const { return true; }
+ virtual bool directRender() { return false; }
+
+private:
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ Width, Height
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGSymbolElementImpl, "symbol")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTRefElementImpl.cc b/ksvg/impl/SVGTRefElementImpl.cc
new file mode 100644
index 00000000..c1c7e540
--- /dev/null
+++ b/ksvg/impl/SVGTRefElementImpl.cc
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTRefElementImpl.h"
+#include "SVGTextElementImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+#include "KSVGLoader.h"
+
+using namespace KSVG;
+
+SVGTRefElementImpl::SVGTRefElementImpl(DOM::ElementImpl *impl) : SVGTSpanElementImpl(impl), SVGURIReferenceImpl()
+{
+}
+
+SVGTRefElementImpl::~SVGTRefElementImpl()
+{
+}
+
+void SVGTRefElementImpl::setAttributes()
+{
+ SVGTSpanElementImpl::setAttributes();
+
+ DOM::DOMString _href = href()->baseVal();
+
+ if(!_href.isNull())
+ href()->setBaseVal(DOM::DOMString(SVGURIReferenceImpl::getTarget(_href.string())));
+
+ // get the text of the referenced element
+ QString text;
+
+ QString url = _href.string().stripWhiteSpace(), filename, id;
+ if(!SVGURIReferenceImpl::parseURIReference(url, filename, id))
+ return;
+
+ if(!filename.isEmpty()) // a reference into another svg
+ text = KSVGLoader::getCharacterData(KURL(ownerDoc()->baseUrl().path(), filename), id);
+ else
+ {
+ // a reference to an element in this svg
+ SVGElementImpl *target = ownerSVGElement()->getElementById(id);
+ SVGTextElementImpl *textTarget = dynamic_cast<SVGTextElementImpl *>(target);
+
+ if(textTarget)
+ text = textTarget->text();
+ }
+
+ text = handleText(text);
+
+ if(!text.isEmpty())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(ownerDoc())->createTextNode(text);
+ appendChild(impl);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTRefElementImpl.h b/ksvg/impl/SVGTRefElementImpl.h
new file mode 100644
index 00000000..60d82231
--- /dev/null
+++ b/ksvg/impl/SVGTRefElementImpl.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTRefElementImpl_H
+#define SVGTRefElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTSpanElementImpl.h"
+#include "SVGURIReferenceImpl.h"
+
+namespace KSVG
+{
+
+class SVGTRefElementImpl : public SVGTSpanElementImpl,
+ public SVGURIReferenceImpl
+{
+public:
+ SVGTRefElementImpl(DOM::ElementImpl *);
+ virtual ~SVGTRefElementImpl();
+ virtual void setAttributes();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGTRefElementImpl, "tref")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTSpanElementImpl.cc b/ksvg/impl/SVGTSpanElementImpl.cc
new file mode 100644
index 00000000..7265c66e
--- /dev/null
+++ b/ksvg/impl/SVGTSpanElementImpl.cc
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <Glyph.h>
+
+#include "SVGDocumentImpl.h"
+#include "SVGTextElementImpl.h"
+#include "SVGTSpanElementImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+
+#include "KSVGCanvas.h"
+#include "KSVGTextChunk.h"
+
+using namespace KSVG;
+using namespace KJS;
+
+SVGTSpanElementImpl::SVGTSpanElementImpl(DOM::ElementImpl *impl) : SVGTextPositioningElementImpl(impl)
+{
+}
+
+SVGTSpanElementImpl::~SVGTSpanElementImpl()
+{
+}
+
+long SVGTSpanElementImpl::getNumberOfChars()
+{
+ return text().length();
+}
+
+QString SVGTSpanElementImpl::text()
+{
+ // Otherwhise some js scripts which require a child, don't work (Niko)
+ if(!hasChildNodes())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(ownerDoc())->createTextNode(DOM::DOMString(""));
+ appendChild(impl);
+ }
+
+ return textDirectionAwareText();
+}
+
+void SVGTSpanElementImpl::setAttributes()
+{
+ SVGTextPositioningElementImpl::setAttributes();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTSpanElementImpl.h b/ksvg/impl/SVGTSpanElementImpl.h
new file mode 100644
index 00000000..26e4903d
--- /dev/null
+++ b/ksvg/impl/SVGTSpanElementImpl.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTSpanElementImpl_H
+#define SVGTSpanElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTextPositioningElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGTSpanElementImpl : public SVGTextPositioningElementImpl
+{
+public:
+ SVGTSpanElementImpl(DOM::ElementImpl *);
+ virtual ~SVGTSpanElementImpl();
+
+ QString text();
+
+ virtual long getNumberOfChars();
+
+ virtual void setAttributes();
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGTSpanElementImpl, "tspan")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTestsImpl.cc b/ksvg/impl/SVGTestsImpl.cc
new file mode 100644
index 00000000..8bbccf80
--- /dev/null
+++ b/ksvg/impl/SVGTestsImpl.cc
@@ -0,0 +1,178 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <klocale.h>
+#include <kglobal.h>
+
+#include "SVGTestsImpl.h"
+#include "SVGStringListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTestsImpl.lut.h"
+
+SVGTestsImpl::SVGTestsImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_requiredFeatures = new SVGStringListImpl();
+ m_requiredFeatures->ref();
+
+ m_requiredExtensions = new SVGStringListImpl();
+ m_requiredExtensions->ref();
+
+ m_systemLanguage = new SVGStringListImpl();
+ m_systemLanguage->ref();
+}
+
+SVGTestsImpl::~SVGTestsImpl()
+{
+ if(m_requiredFeatures)
+ m_requiredFeatures->deref();
+ if(m_requiredExtensions)
+ m_requiredExtensions->deref();
+ if(m_systemLanguage)
+ m_systemLanguage->deref();
+}
+
+void SVGTestsImpl::parseRequiredFeatures(const QString &/*value*/)
+{
+ // FIXME
+}
+
+void SVGTestsImpl::parseRequiredExtensions(const QString &value)
+{
+ m_requiredExtensions->appendItem(new SharedString(value));
+}
+
+void SVGTestsImpl::parseSystemLanguage(const QString &value)
+{
+ m_systemLanguage->appendItem(new SharedString(value));
+}
+
+SVGStringListImpl *SVGTestsImpl::requiredFeatures() const
+{
+ return m_requiredFeatures;
+}
+
+SVGStringListImpl *SVGTestsImpl::requiredExtensions() const
+{
+ return m_requiredExtensions;
+}
+
+SVGStringListImpl *SVGTestsImpl::systemLanguage() const
+{
+ return m_systemLanguage;
+}
+
+bool SVGTestsImpl::ok()
+{
+ for(unsigned int i = 0;i < m_requiredExtensions->numberOfItems();i++)
+ {
+ // FIXME
+ return false;
+ }
+ for(unsigned int i = 0;i < m_systemLanguage->numberOfItems();i++)
+ {
+ QString value = m_systemLanguage->getItem(i)->string();
+ if(value.isEmpty() || value != (KGlobal::locale()->language()).left(2))
+ return false;
+ }
+ return true;
+}
+
+bool SVGTestsImpl::hasExtension(const DOM::DOMString &/*extension*/)
+{
+ return false;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGTestsImpl::s_hashTable 5
+ requiredFeatures SVGTestsImpl::RequiredFeatures DontDelete|ReadOnly
+ requiredExtensions SVGTestsImpl::RequiredExtensions DontDelete|ReadOnly
+ systemLanguage SVGTestsImpl::SystemLanguage DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGTestsImplProto::s_hashTable 2
+ hasExtension SVGTestsImpl::HasExtension DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGTests", SVGTestsImplProto, SVGTestsImplProtoFunc)
+
+Value SVGTestsImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case RequiredFeatures:
+ return m_requiredFeatures->cache(exec);
+ case RequiredExtensions:
+ return m_requiredExtensions->cache(exec);
+ case SystemLanguage:
+ return m_systemLanguage->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGTestsImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case RequiredFeatures:
+ parseRequiredFeatures(value.toString(exec).qstring());
+ break;
+ case RequiredExtensions:
+ parseRequiredExtensions(value.toString(exec).qstring());
+ break;
+ case SystemLanguage:
+ parseSystemLanguage(value.toString(exec).qstring());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGTestsImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGTestsImpl)
+
+ switch(id)
+ {
+ case SVGTestsImpl::HasExtension:
+ return Boolean(obj->hasExtension(args[0].toString(exec).string()));
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTestsImpl.h b/ksvg/impl/SVGTestsImpl.h
new file mode 100644
index 00000000..c5b05a5f
--- /dev/null
+++ b/ksvg/impl/SVGTestsImpl.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTestsImpl_H
+#define SVGTestsImpl_H
+
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGStringListImpl;
+class SVGTestsImpl
+{
+public:
+ SVGTestsImpl();
+ ~SVGTestsImpl();
+
+ void parseRequiredFeatures(const QString &value);
+ void parseRequiredExtensions(const QString &value);
+ void parseSystemLanguage(const QString &value);
+
+ SVGStringListImpl *requiredFeatures() const;
+ SVGStringListImpl *requiredExtensions() const;
+ SVGStringListImpl *systemLanguage() const;
+
+ bool ok();
+ bool hasExtension(const DOM::DOMString &extension);
+
+private:
+ SVGStringListImpl *m_requiredFeatures;
+ SVGStringListImpl *m_requiredExtensions;
+ SVGStringListImpl *m_systemLanguage;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ RequiredFeatures, RequiredExtensions, SystemLanguage,
+ // Functions
+ HasExtension
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGTestsImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGTestsImplProtoFunc, SVGTestsImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextContentElementImpl.cc b/ksvg/impl/SVGTextContentElementImpl.cc
new file mode 100644
index 00000000..f51d8807
--- /dev/null
+++ b/ksvg/impl/SVGTextContentElementImpl.cc
@@ -0,0 +1,285 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "Glyph.h"
+
+#include "SVGStringListImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGTextContentElementImpl.h"
+#include "SVGTextElementImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGDocumentImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTextContentElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_cacheimpl.h"
+
+SVGTextContentElementImpl::SVGTextContentElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_lengthAdjust = new SVGAnimatedEnumerationImpl();
+ m_lengthAdjust->ref();
+
+ // Spec: default value 'spacing'
+ m_lengthAdjust->setBaseVal(LENGTHADJUST_SPACING);
+
+ m_textLength = new SVGAnimatedLengthImpl();
+ m_textLength->baseVal()->setValueAsString("-1");
+ m_textLength->ref();
+}
+
+SVGTextContentElementImpl::~SVGTextContentElementImpl()
+{
+ if(m_lengthAdjust)
+ m_lengthAdjust->deref();
+ if(m_textLength)
+ m_textLength->deref();
+}
+
+QString SVGTextContentElementImpl::textDirectionAwareText()
+{
+ QString text;
+
+ if(hasChildNodes())
+ {
+ bool ltr = getTextDirection() == LTR;
+ DOM::Node node = ltr ? firstChild() : lastChild();
+
+ for(; !node.isNull(); node = ltr ? node.nextSibling() : node.previousSibling())
+ {
+ if(node.nodeType() == TEXT_NODE)
+ {
+ DOM::Text textNode = node;
+ QString temp = textNode.data().string();
+
+ if(!ltr)
+ {
+ QString convert = temp;
+
+ for(int i = temp.length(); i > 0; i--)
+ convert[temp.length() - i] = temp[i - 1];
+
+ text += convert;
+ }
+ else
+ text += temp;
+ }
+ else
+ return text;
+ }
+ }
+
+ return text;
+}
+
+T2P::GlyphLayoutParams *SVGTextContentElementImpl::layoutParams() const
+{
+ SVGStylableImpl *style = const_cast<SVGTextContentElementImpl *>(this);
+
+ T2P::GlyphLayoutParams *params = new T2P::GlyphLayoutParams();
+ params->setTb(style->getTextWritingMode() == TB);
+ params->setUseBidi(style->getTextUnicodeBidi() == UBNORMAL);
+ if(!dynamic_cast<SVGTextElementImpl *>(m_object)) // not allowed for <text>
+ params->setBaselineShift(style->getBaselineShift().latin1());
+
+ bool worked = true;
+ int deg = style->getGlyphOrientationVertical().toInt(&worked);
+ if(!worked)
+ params->setGlyphOrientationVertical(-90);
+ else
+ params->setGlyphOrientationVertical(deg);
+
+ worked = true;
+ deg = style->getGlyphOrientationHorizontal().toInt(&worked);
+ if(!worked)
+ params->setGlyphOrientationHorizontal(-90);
+ else
+ params->setGlyphOrientationHorizontal(deg);
+
+ SVGLengthImpl *length = new SVGLengthImpl(LENGTHMODE_OTHER, const_cast<SVGTextContentElementImpl *>(this));
+ length->ref();
+
+ if(style->getLetterSpacing() != "normal" && style->getLetterSpacing() != "inherit")
+ length->setValueAsString(DOM::DOMString(style->getLetterSpacing()));
+ params->setLetterSpacing(length->value());
+
+ if(style->getWordSpacing() != "normal" && style->getWordSpacing() != "inherit")
+ length->setValueAsString(DOM::DOMString(style->getWordSpacing()));
+ params->setWordSpacing(length->value());
+
+ length->deref();
+
+ return params;
+}
+
+SVGAnimatedLengthImpl *SVGTextContentElementImpl::textLength() const
+{
+ return m_textLength;
+}
+
+SVGAnimatedEnumerationImpl *SVGTextContentElementImpl::lengthAdjust() const
+{
+ return m_lengthAdjust;
+}
+
+long SVGTextContentElementImpl::getNumberOfChars()
+{
+ return 0;
+}
+
+float SVGTextContentElementImpl::getComputedTextLength()
+{
+ return 0.0;
+}
+
+/*
+float SVGTextContentElementImpl::getSubStringLength(const unsigned long &charnum,const unsigned long &nchars)
+{
+}
+
+SVGPoint SVGTextContentElementImpl::getStartPositionOfChar(const unsigned long &charnum)
+{
+}
+
+SVGPoint SVGTextContentElementImpl::getEndPositionOfChar(const unsigned long &charnum)
+{
+}
+
+SVGRect SVGTextContentElementImpl::getExtentOfChar(const unsigned long &charnum)
+{
+}
+
+float SVGTextContentElementImpl::getRotationOfChar(const unsigned long &charnum)
+{
+}
+
+long SVGTextContentElementImpl::getCharNumAtPosition(const SVGPoint &point)
+{
+}
+
+void SVGTextContentElementImpl::selectSubString(const unsigned long &charnum,const unsigned long &nchars)
+{
+}
+*/
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGTextContentElementImpl::s_hashTable 3
+ textLength SVGTextContentElementImpl::TextLength DontDelete|ReadOnly
+ lengthAdjust SVGTextContentElementImpl::LengthAdjust DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGTextContentElementImplProto::s_hashTable 11
+ getNumberOfChars SVGTextContentElementImpl::GetNumberOfChars DontDelete|Function 0
+ getComputedTextLength SVGTextContentElementImpl::GetComputedTextLength DontDelete|Function 0
+ getSubStringLength SVGTextContentElementImpl::GetSubStringLength DontDelete|Function 2
+ getStartPositionOfChar SVGTextContentElementImpl::GetStartPositionOfChar DontDelete|Function 1
+ getEndPositionOfChar SVGTextContentElementImpl::GetEndPositionOfChar DontDelete|Function 1
+ getExtentOfChar SVGTextContentElementImpl::GetExtentOfChar DontDelete|Function 1
+ getRotationOfChar SVGTextContentElementImpl::GetRotationOfChar DontDelete|Function 1
+ getCharNumAtPosition SVGTextContentElementImpl::GetCharNumAtPosition DontDelete|Function 1
+ selectSubString SVGTextContentElementImpl::SelectSubString DontDelete|Function 2
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGTextContentElement", SVGTextContentElementImplProto, SVGTextContentElementImplProtoFunc)
+
+Value SVGTextContentElementImpl::getValueProperty(ExecState *, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGTextContentElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case TextLength:
+ m_textLength->baseVal()->setValueAsString(value.toString(exec).string());
+ if(m_textLength->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute textLength of element <text> is illegal"));
+ break;
+ case LengthAdjust:
+ {
+ QString temp = value.toString(exec).qstring();
+ if(temp == "spacingAndGlyphs")
+ m_lengthAdjust->setBaseVal(LENGTHADJUST_SPACINGANDGLYPHS);
+ else if(temp == "spacing")
+ m_lengthAdjust->setBaseVal(LENGTHADJUST_SPACING);
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+Value SVGTextContentElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &)
+{
+ KSVG_CHECK_THIS(SVGTextContentElementImpl)
+
+ switch(id)
+ {
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+/*
+@namespace KSVG
+@begin SVGTextContentElementImplConstructor::s_hashTable 5
+ LENGTHADJUST_UNKNOWN KSVG::LENGTHADJUST_UNKNOWN DontDelete|ReadOnly
+ LENGTHADJUST_SPACING KSVG::LENGTHADJUST_SPACING DontDelete|ReadOnly
+ LENGTHADJUST_SPACINGANDGLYPHS KSVG::LENGTHADJUST_SPACINGANDGLYPHS DontDelete|ReadOnly
+@end
+*/
+
+Value SVGTextContentElementImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGTextContentElementImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGTextContentElementImplConstructor>(exec, "[[svgtextcontentelement.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextContentElementImpl.h b/ksvg/impl/SVGTextContentElementImpl.h
new file mode 100644
index 00000000..26bbc041
--- /dev/null
+++ b/ksvg/impl/SVGTextContentElementImpl.h
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextContentElementImpl_H
+#define SVGTextContentElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGShapeImpl.h"
+#include "SVGTestsImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGTextContentElement.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace T2P
+{
+ class GlyphLayoutParams;
+}
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGAnimatedEnumerationImpl;
+class SVGTextContentElementImpl : public SVGShapeImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGTextContentElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGTextContentElementImpl();
+
+ QString textDirectionAwareText();
+
+ virtual T2P::GlyphLayoutParams *layoutParams() const;
+
+ SVGAnimatedLengthImpl *textLength() const;
+ SVGAnimatedEnumerationImpl *lengthAdjust() const;
+
+ virtual long getNumberOfChars();
+ float getComputedTextLength();
+
+// float getSubStringLength(const unsigned long &charnum, const unsigned long &nchars);
+// SVGPoint getStartPositionOfChar(const unsigned long &charnum);
+// SVGPoint getEndPositionOfChar(const unsigned long &charnum);
+// SVGRect getExtentOfChar(const unsigned long &charnum);
+// float getRotationOfChar(const unsigned long &charnum);
+// long getCharNumAtPosition(const SVGPoint &point);
+// void selectSubString(const unsigned long &charnum, const unsigned long &nchars);
+
+private:
+ SVGAnimatedEnumerationImpl *m_lengthAdjust;
+ SVGAnimatedLengthImpl *m_textLength;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ TextLength, LengthAdjust,
+ // Functions
+ GetTextLength, GetLengthAdjust,
+ GetNumberOfChars, GetComputedTextLength,
+ GetSubStringLength, GetStartPositionOfChar,
+ GetEndPositionOfChar, GetExtentOfChar,
+ GetRotationOfChar, GetCharNumAtPosition,
+ SelectSubString
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGTextContentElementImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGTextContentElementImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGTextContentElementImplConstructor(KJS::ExecState *exec);
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGTextContentElementImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGTextContentElementImplProtoFunc, SVGTextContentElementImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextElementImpl.cc b/ksvg/impl/SVGTextElementImpl.cc
new file mode 100644
index 00000000..634c227d
--- /dev/null
+++ b/ksvg/impl/SVGTextElementImpl.cc
@@ -0,0 +1,124 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <Glyph.h>
+
+#include "SVGRectImpl.h"
+#include "SVGEventImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTextElementImpl.h"
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+using namespace KSVG;
+
+SVGTextElementImpl::SVGTextElementImpl(DOM::ElementImpl *impl) : SVGTextPositioningElementImpl(impl), SVGTransformableImpl()
+{
+ m_bboxX = 0;
+ m_bboxY = 0;
+
+ m_bboxWidth = 0;
+ m_bboxHeight = 0;
+}
+
+SVGTextElementImpl::~SVGTextElementImpl()
+{
+}
+
+long SVGTextElementImpl::getNumberOfChars()
+{
+ return text().length();
+}
+
+QString SVGTextElementImpl::text()
+{
+ // Otherwhise some js scripts which require a child, don't work (Niko)
+ if(!hasChildNodes())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(ownerDoc())->createTextNode(DOM::DOMString(""));
+ appendChild(impl);
+ }
+
+ return textDirectionAwareText();
+}
+
+SVGRectImpl *SVGTextElementImpl::getBBox()
+{
+ SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
+ ret->setX(m_bboxX);
+ ret->setY(m_bboxY);
+ ret->setWidth(m_bboxWidth);
+ ret->setHeight(m_bboxHeight);
+ return ret;
+}
+
+void SVGTextElementImpl::createItem(KSVGCanvas *c )
+{
+ if(!c)
+ c = ownerDoc()->canvas();
+
+ if(!m_item)
+ {
+ m_item = c->createText(this);
+ // Set up bbox before insert(), as that may render the item
+ QRect rect = m_item->bbox();
+ m_bboxX = rect.x();
+ m_bboxY = rect.y();
+ m_bboxWidth = rect.width();
+ m_bboxHeight = rect.height();
+ c->insert(m_item);
+ }
+}
+
+bool SVGTextElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+{
+ // TODO : pointer-events should be stored here, not in SVGStylableImpl.
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
+ if(!style || style->getPointerEvents() == PE_NONE)
+ return false;
+ bool test = false;
+ switch(style->getPointerEvents())
+ {
+ case PE_VISIBLE: test = style->getVisible(); break;
+ case PE_VISIBLE_PAINTED: test = style->getVisible() && (style->isStroked() || style->isFilled()) ; break;
+ case PE_VISIBLE_FILL: test = style->getVisible() && style->isFilled(); break;
+ case PE_VISIBLE_STROKE: test = style->getVisible() && style->isStroked(); break;
+ case PE_PAINTED: test = style->isStroked() || style->isFilled(); break;
+ case PE_FILL: test = style->isFilled(); break;
+ case PE_STROKE: test = style->isStroked(); break;
+ case PE_ALL:
+ default: test = true;
+ };
+
+ if(test)
+ {
+ if(m_item->bbox().contains(p))
+ {
+ mev->setTarget(dynamic_cast<SVGElementImpl *>(this));
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextElementImpl.h b/ksvg/impl/SVGTextElementImpl.h
new file mode 100644
index 00000000..e0c2ca8d
--- /dev/null
+++ b/ksvg/impl/SVGTextElementImpl.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextElementImpl_H
+#define SVGTextElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTransformableImpl.h"
+#include "SVGTextPositioningElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGTextElementImpl : public SVGTextPositioningElementImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGTextElementImpl(DOM::ElementImpl *);
+ virtual ~SVGTextElementImpl();
+
+ QString text();
+
+ virtual long getNumberOfChars();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+ virtual SVGRectImpl *getBBox();
+
+ virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+
+private:
+ int m_bboxX, m_bboxY, m_bboxWidth, m_bboxHeight;
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGTextElementImpl, "text")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextPathElementImpl.cc b/ksvg/impl/SVGTextPathElementImpl.cc
new file mode 100644
index 00000000..ec218046
--- /dev/null
+++ b/ksvg/impl/SVGTextPathElementImpl.cc
@@ -0,0 +1,240 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "Glyph.h"
+
+#include "SVGDocumentImpl.h"
+#include "SVGTextPathElement.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGTextPathElementImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTextPathElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_ecma.h"
+#include "ksvg_cacheimpl.h"
+
+SVGTextPathElementImpl::SVGTextPathElementImpl(DOM::ElementImpl *impl) : SVGTextContentElementImpl(impl), SVGURIReferenceImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_startOffset = new SVGAnimatedLengthImpl();
+ m_startOffset->ref();
+
+ m_method = new SVGAnimatedEnumerationImpl();
+ m_method->ref();
+
+ m_spacing = new SVGAnimatedEnumerationImpl();
+ m_spacing->ref();
+}
+
+SVGTextPathElementImpl::~SVGTextPathElementImpl()
+{
+ if(m_startOffset)
+ m_startOffset->deref();
+ if(m_method)
+ m_method->deref();
+ if(m_spacing)
+ m_spacing->deref();
+}
+
+SVGAnimatedLengthImpl *SVGTextPathElementImpl::startOffset() const
+{
+ return m_startOffset;
+}
+
+SVGAnimatedEnumerationImpl *SVGTextPathElementImpl::method() const
+{
+ return m_method;
+}
+
+SVGAnimatedEnumerationImpl *SVGTextPathElementImpl::spacing() const
+{
+ return m_spacing;
+}
+
+QString SVGTextPathElementImpl::text()
+{
+ // Otherwhise some js scripts which require a child, don't work (Niko)
+ if(!hasChildNodes())
+ {
+ DOM::Text impl = static_cast<DOM::Document *>(ownerDoc())->createTextNode(DOM::DOMString(""));
+ appendChild(impl);
+ }
+
+ return textDirectionAwareText();
+}
+
+void SVGTextPathElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ // Spec: if not specified, effect is as if a value of "0" were specified
+ if(KSVG_TOKEN_NOT_PARSED(StartOffset))
+ KSVG_SET_ALT_ATTRIBUTE(StartOffset, "0")
+
+ // Spec: if not specified, effect is as if a value of "align" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Method))
+ KSVG_SET_ALT_ATTRIBUTE(Method, "align")
+
+ // Spec: if not specified, effect is as if a value of "exact" were specified
+ if(KSVG_TOKEN_NOT_PARSED(Spacing))
+ KSVG_SET_ALT_ATTRIBUTE(Spacing, "exact")
+}
+
+T2P::GlyphLayoutParams *SVGTextPathElementImpl::layoutParams() const
+{
+ T2P::GlyphLayoutParams *params = SVGTextContentElementImpl::layoutParams();
+ params->setTextPathStartOffset(startOffset()->baseVal()->value());
+ return params;
+}
+
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGTextPathElementImpl::s_hashTable 5
+ startOffset SVGTextPathElementImpl::StartOffset DontDelete|ReadOnly
+ method SVGTextPathElementImpl::Method DontDelete|ReadOnly
+ spacing SVGTextPathElementImpl::Spacing DontDelete|ReadOnly
+@end
+*/
+
+Value SVGTextPathElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case StartOffset:
+ if(!attributeMode)
+ return m_startOffset->cache(exec);
+ else
+ return Number(m_startOffset->baseVal()->value());
+ case Method:
+ if(!attributeMode)
+ return m_method->cache(exec);
+ else
+ return Number(m_method->baseVal());
+ case Spacing:
+ if(!attributeMode)
+ return m_spacing->cache(exec);
+ else
+ return Number(m_spacing->baseVal());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGTextPathElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case StartOffset:
+ {
+ QString param = value.toString(exec).qstring();
+
+ if(param.endsWith("%"))
+ {
+ QString value = param.left(param.length() - 1);
+ bool ok = false;
+ double dValue = value.toDouble(&ok);
+ if(ok)
+ startOffset()->baseVal()->setValue(dValue / 100.0);
+ else
+ kdDebug() << "Couldn't parse startOffset: " << value << endl;
+ }
+ else
+ startOffset()->baseVal()->setValueAsString(value.toString(exec).qstring());
+
+ if(startOffset()->baseVal()->value() < 0) // A negative value is an error
+ gotError(i18n("Negative value for attribute startOffset of element <textPath> is illegal"));
+ break;
+ }
+ case Method:
+ {
+ QString param = value.toString(exec).qstring();
+
+ if(param == "align")
+ method()->setBaseVal(TEXTPATH_METHODTYPE_ALIGN);
+ else if(param == "stretch")
+ method()->setBaseVal(TEXTPATH_METHODTYPE_STRETCH);
+ else
+ method()->setBaseVal(TEXTPATH_METHODTYPE_UNKNOWN);
+
+ break;
+ }
+ case Spacing:
+ {
+ QString param = value.toString(exec).qstring();
+
+ if(param == "auto")
+ spacing()->setBaseVal(TEXTPATH_SPACINGTYPE_AUTO);
+ else if(param == "exact")
+ spacing()->setBaseVal(TEXTPATH_SPACINGTYPE_EXACT);
+ else
+ spacing()->setBaseVal(TEXTPATH_SPACINGTYPE_UNKNOWN);
+
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// CONSTANTS
+
+/*
+@namespace KSVG
+@begin SVGTextPathElementImplConstructor::s_hashTable 7
+ TEXTPATH_METHODTYPE_UNKNOWN KSVG::TEXTPATH_METHODTYPE_UNKNOWN DontDelete|ReadOnly
+ TEXTPATH_METHODTYPE_ALIGN KSVG::TEXTPATH_METHODTYPE_ALIGN DontDelete|ReadOnly
+ TEXTPATH_METHODTYPE_STRETCH KSVG::TEXTPATH_METHODTYPE_STRETCH DontDelete|ReadOnly
+ TEXTPATH_SPACINGTYPE_UNKNOWN KSVG::TEXTPATH_SPACINGTYPE_UNKNOWN DontDelete|ReadOnly
+ TEXTPATH_SPACINGTYPE_AUTO KSVG::TEXTPATH_SPACINGTYPE_AUTO DontDelete|ReadOnly
+ TEXTPATH_SPACINGTYPE_EXACT KSVG::TEXTPATH_SPACINGTYPE_EXACT DontDelete|ReadOnly
+@end
+*/
+
+using namespace KJS;
+
+Value SVGTextPathElementImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGTextPathElementImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGTextPathElementImplConstructor>(exec, "[[svgtextpathelement.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextPathElementImpl.h b/ksvg/impl/SVGTextPathElementImpl.h
new file mode 100644
index 00000000..8231f0cd
--- /dev/null
+++ b/ksvg/impl/SVGTextPathElementImpl.h
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextPathElementImpl_H
+#define SVGTextPathElementImpl_H
+
+#include "SVGURIReferenceImpl.h"
+#include "SVGTextContentElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGTextPathElementImpl : public SVGTextContentElementImpl,
+ public SVGURIReferenceImpl
+{
+public:
+ SVGTextPathElementImpl(DOM::ElementImpl *);
+ virtual ~SVGTextPathElementImpl();
+
+ QString text();
+
+ SVGAnimatedLengthImpl *startOffset() const;
+ SVGAnimatedEnumerationImpl *method() const;
+ SVGAnimatedEnumerationImpl *spacing() const;
+
+ virtual void setAttributes();
+ virtual T2P::GlyphLayoutParams *layoutParams() const;
+
+private:
+ SVGAnimatedLengthImpl *m_startOffset;
+ SVGAnimatedEnumerationImpl *m_method;
+ SVGAnimatedEnumerationImpl *m_spacing;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ StartOffset, Method, Spacing
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGTextPathElementImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGTextPathElementImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGTextPathElementImplConstructor(KJS::ExecState *exec);
+
+KSVG_REGISTER_ELEMENT(SVGTextPathElementImpl, "textPath")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextPositioningElementImpl.cc b/ksvg/impl/SVGTextPositioningElementImpl.cc
new file mode 100644
index 00000000..924fd091
--- /dev/null
+++ b/ksvg/impl/SVGTextPositioningElementImpl.cc
@@ -0,0 +1,198 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+#include "SVGAnimatedNumberListImpl.h"
+#include "SVGTextPositioningElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTextPositioningElementImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGTextPositioningElementImpl::SVGTextPositioningElementImpl(DOM::ElementImpl *impl) : SVGTextContentElementImpl(impl)
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthListImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthListImpl();
+ m_y->ref();
+
+ m_dx = new SVGAnimatedLengthListImpl();
+ m_dx->ref();
+
+ m_dy = new SVGAnimatedLengthListImpl();
+ m_dy->ref();
+
+ m_rotate = new SVGAnimatedNumberListImpl();
+ m_rotate->ref();
+}
+
+SVGTextPositioningElementImpl::~SVGTextPositioningElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_dx)
+ m_dx->deref();
+ if(m_dy)
+ m_dy->deref();
+ if(m_rotate)
+ m_rotate->deref();
+}
+
+SVGAnimatedLengthListImpl *SVGTextPositioningElementImpl::x()
+{
+ return m_x;
+}
+
+SVGAnimatedLengthListImpl *SVGTextPositioningElementImpl::y()
+{
+ return m_y;
+}
+
+SVGAnimatedLengthListImpl *SVGTextPositioningElementImpl::dx()
+{
+ return m_dx;
+}
+
+SVGAnimatedLengthListImpl *SVGTextPositioningElementImpl::dy()
+{
+ return m_dy;
+}
+
+SVGAnimatedNumberListImpl *SVGTextPositioningElementImpl::rotate()
+{
+ return m_rotate;
+}
+
+/*
+@namespace KSVG
+@begin SVGTextPositioningElementImpl::s_hashTable 7
+ x SVGTextPositioningElementImpl::X DontDelete|ReadOnly
+ y SVGTextPositioningElementImpl::Y DontDelete|ReadOnly
+ dx SVGTextPositioningElementImpl::Dx DontDelete|ReadOnly
+ dy SVGTextPositioningElementImpl::Dy DontDelete|ReadOnly
+ rotate SVGTextPositioningElementImpl::Rotate DontDelete|ReadOnly
+@end
+*/
+
+Value SVGTextPositioningElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->getItem(0)->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->getItem(0)->value());
+ case Dx:
+ if(!attributeMode)
+ return m_dx->cache(exec);
+ else
+ return Number(m_dx->baseVal()->getItem(0)->value());
+ case Dy:
+ if(!attributeMode)
+ return m_dy->cache(exec);
+ else
+ return Number(m_dy->baseVal()->getItem(0)->value());
+ case Rotate:
+ if(!attributeMode)
+ return m_rotate->cache(exec);
+ else
+ return Number(m_rotate->baseVal()->getItem(0)->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGTextPositioningElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ x()->baseVal()->clear();
+ SVGHelperImpl::parseLengthList(x(), value.toString(exec).qstring(), LENGTHMODE_WIDTH, this);
+ break;
+ case Y:
+ y()->baseVal()->clear();
+ SVGHelperImpl::parseLengthList(y(), value.toString(exec).qstring(), LENGTHMODE_HEIGHT, this);
+ break;
+ case Dx:
+ dx()->baseVal()->clear();
+ SVGHelperImpl::parseLengthList(dx(), value.toString(exec).qstring(), LENGTHMODE_WIDTH, this);
+ break;
+ case Dy:
+ dy()->baseVal()->clear();
+ SVGHelperImpl::parseLengthList(dy(), value.toString(exec).qstring(), LENGTHMODE_HEIGHT, this);
+ break;
+ case Rotate:
+ {
+ rotate()->baseVal()->clear();
+
+ SVGNumberImpl *number = SVGSVGElementImpl::createSVGNumber();
+ number->setValue(value.toNumber(exec));
+ rotate()->baseVal()->appendItem(number);
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+void SVGTextPositioningElementImpl::setAttributes()
+{
+ SVGElementImpl::setAttributes();
+
+ if(tagName() != "text")
+ return;
+
+ // Spec: If the attribute is not specified, the effect is as if a value of "0" were specified.
+ if(KSVG_TOKEN_NOT_PARSED(X))
+ KSVG_SET_ALT_ATTRIBUTE(X, "0")
+
+ // Spec: If the attribute is not specified, the effect is as if a value of "0" were specified.
+ if(KSVG_TOKEN_NOT_PARSED(Y))
+ KSVG_SET_ALT_ATTRIBUTE(Y, "0")
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTextPositioningElementImpl.h b/ksvg/impl/SVGTextPositioningElementImpl.h
new file mode 100644
index 00000000..c80b48ff
--- /dev/null
+++ b/ksvg/impl/SVGTextPositioningElementImpl.h
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTextPositioningElementImpl_H
+#define SVGTextPositioningElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTextContentElementImpl.h"
+
+namespace KJS
+{
+ class Value;
+ class Object;
+ class UString;
+ class ExecState;
+}
+
+namespace KSVG
+{
+
+class SVGShapeImpl;
+class GlyphLayoutParams;
+class SVGAnimatedLengthListImpl;
+class SVGAnimatedNumberListImpl;
+
+class SVGTextPositioningElementImpl : public SVGTextContentElementImpl
+{
+public:
+ SVGTextPositioningElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGTextPositioningElementImpl();
+
+ SVGAnimatedLengthListImpl *x();
+ SVGAnimatedLengthListImpl *y();
+ SVGAnimatedLengthListImpl *dx();
+ SVGAnimatedLengthListImpl *dy();
+ SVGAnimatedNumberListImpl *rotate();
+
+ virtual void setAttributes();
+
+private:
+ SVGAnimatedLengthListImpl *m_x;
+ SVGAnimatedLengthListImpl *m_y;
+ SVGAnimatedLengthListImpl *m_dx;
+ SVGAnimatedLengthListImpl *m_dy;
+ SVGAnimatedNumberListImpl *m_rotate;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ X, Y, Dx, Dy, Rotate
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTimeScheduler.cc b/ksvg/impl/SVGTimeScheduler.cc
new file mode 100644
index 00000000..efff77ac
--- /dev/null
+++ b/ksvg/impl/SVGTimeScheduler.cc
@@ -0,0 +1,234 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "KSVGCanvas.h"
+#include "CanvasItem.h"
+#include "SVGShapeImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGTimeScheduler.moc"
+
+using namespace KSVG;
+
+SVGTimer::SVGTimer(QObject *scheduler, unsigned int ms, bool singleShot)
+{
+ m_ms = ms;
+ m_singleShot = singleShot;
+ m_timer = new QTimer(scheduler);
+}
+
+SVGTimer::~SVGTimer()
+{
+ delete m_timer;
+}
+
+bool SVGTimer::operator==(const QTimer *timer)
+{
+ return (m_timer == timer);
+}
+
+const QTimer *SVGTimer::qtimer() const
+{
+ return m_timer;
+}
+
+void SVGTimer::start(QObject *receiver, const char *member)
+{
+ QObject::connect(m_timer, SIGNAL(timeout()), receiver, member);
+ m_timer->start(m_ms, m_singleShot);
+}
+
+void SVGTimer::stop()
+{
+ m_timer->stop();
+}
+
+bool SVGTimer::isActive() const
+{
+ return m_timer->isActive();
+}
+
+unsigned int SVGTimer::ms() const
+{
+ return m_ms;
+}
+
+bool SVGTimer::singleShot() const
+{
+ return m_singleShot;
+}
+
+void SVGTimer::notifyAll()
+{
+ if(m_notifyList.isEmpty())
+ return;
+
+ QValueList<SVGElementImpl *> elements;
+ for(unsigned int i = m_notifyList.count();i > 0; i--)
+ {
+ SVGElementImpl *element = m_notifyList[i - 1];
+ if(!element)
+ continue;
+
+ SVGAnimationElementImpl *animation = dynamic_cast<SVGAnimationElementImpl *>(element);
+ if(animation)
+ {
+ animation->handleTimerEvent();
+
+ SVGElementImpl *target = animation->targetElement();
+ if(!elements.contains(target))
+ elements.append(target);
+ }
+ }
+
+ // Optimized update logic (to avoid 4 updates, on the same element)
+ QValueList<SVGElementImpl *>::iterator it2;
+ for(it2 = elements.begin(); it2 != elements.end(); ++it2)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(*it2);
+ if(shape && shape->item())
+ shape->item()->update(UPDATE_TRANSFORM);
+ }
+}
+
+void SVGTimer::addNotify(SVGElementImpl *element)
+{
+ m_notifyList.append(element);
+}
+
+void SVGTimer::removeNotify(SVGElementImpl *element)
+{
+ m_notifyList.remove(element);
+
+ if(m_notifyList.isEmpty())
+ stop();
+}
+
+const unsigned int SVGTimeScheduler::staticTimerInterval = 15; // milliseconds
+
+SVGTimeScheduler::SVGTimeScheduler(SVGDocumentImpl *doc) : QObject(), m_doc(doc)
+{
+ // Create static interval timers but don't start it yet!
+ m_intervalTimer = new SVGTimer(this, staticTimerInterval, false);
+ m_creationTime.start();
+}
+
+SVGTimeScheduler::~SVGTimeScheduler()
+{
+ // Usually singleShot timers cleanup themselves, after usage
+ SVGTimerList::iterator it;
+ for(it = m_timerList.begin(); it != m_timerList.end(); ++it)
+ {
+ SVGTimer *svgTimer = *it;
+ delete svgTimer;
+ }
+ delete m_intervalTimer;
+}
+
+void SVGTimeScheduler::addTimer(SVGElementImpl *element, unsigned int ms)
+{
+ SVGTimer *svgTimer = new SVGTimer(this, ms, true);
+ svgTimer->addNotify(element);
+ m_timerList.append(svgTimer);
+}
+
+void SVGTimeScheduler::connectIntervalTimer(SVGElementImpl *element)
+{
+ m_intervalTimer->addNotify(element);
+}
+
+void SVGTimeScheduler::disconnectIntervalTimer(SVGElementImpl *element)
+{
+ m_intervalTimer->removeNotify(element);
+}
+
+void SVGTimeScheduler::startAnimations()
+{
+ SVGTimerList::iterator it;
+ for(it = m_timerList.begin(); it != m_timerList.end(); ++it)
+ {
+ SVGTimer *svgTimer = *it;
+ if(svgTimer && !svgTimer->isActive())
+ svgTimer->start(this, SLOT(slotTimerNotify()));
+ }
+}
+
+void SVGTimeScheduler::toggleAnimations()
+{
+ if(m_intervalTimer->isActive())
+ m_intervalTimer->stop();
+ else
+ m_intervalTimer->start(this, SLOT(slotTimerNotify()));
+}
+
+bool SVGTimeScheduler::animationsPaused() const
+{
+ return !m_intervalTimer->isActive();
+}
+
+void SVGTimeScheduler::slotTimerNotify()
+{
+ QTimer *senderTimer = const_cast<QTimer *>(static_cast<const QTimer *>(sender()));
+
+ SVGTimer *svgTimer = 0;
+ SVGTimerList::iterator it;
+ for(it = m_timerList.begin(); it != m_timerList.end(); ++it)
+ {
+ SVGTimer *cur = *it;
+ if(*cur == senderTimer)
+ {
+ svgTimer = cur;
+ break;
+ }
+ }
+
+ if(!svgTimer)
+ {
+ svgTimer = (*m_intervalTimer == senderTimer) ? m_intervalTimer : 0;
+
+ if(!svgTimer)
+ return;
+ }
+
+ svgTimer->notifyAll();
+
+ // Animations need direct updates
+ if(m_doc->canvas())
+ m_doc->canvas()->update();
+ emit m_doc->finishedRendering();
+
+ if(svgTimer->singleShot())
+ {
+ m_timerList.remove(svgTimer);
+ delete svgTimer;
+ }
+
+ // The singleShot timers of ie. <animate> with begin="3s" are notified
+ // by the previous call, and now all connections to the interval timer
+ // are created and now we just need to fire that timer (Niko)
+ if(svgTimer != m_intervalTimer && !m_intervalTimer->isActive())
+ m_intervalTimer->start(this, SLOT(slotTimerNotify()));
+}
+
+float SVGTimeScheduler::elapsed() const
+{
+ return float(m_creationTime.elapsed()) / 1000.0;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTimeScheduler.h b/ksvg/impl/SVGTimeScheduler.h
new file mode 100644
index 00000000..ae4c6d37
--- /dev/null
+++ b/ksvg/impl/SVGTimeScheduler.h
@@ -0,0 +1,104 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTimeScheduler_H
+#define SVGTimeScheduler_H
+
+#include <qtimer.h>
+#include <qdatetime.h>
+#include <qobject.h>
+#include <qvaluelist.h>
+
+#include "SVGElementImpl.h"
+#include "SVGAnimationElementImpl.h"
+
+namespace KSVG
+{
+
+typedef QValueList<SVGElementImpl *> SVGNotifyList;
+class SVGTimer
+{
+public:
+ SVGTimer(QObject *scheduler, unsigned int ms, bool singleShot);
+ ~SVGTimer();
+
+ bool operator==(const QTimer *timer);
+ const QTimer *qtimer() const;
+
+ void start(QObject *receiver, const char *member);
+ void stop();
+
+ bool isActive() const;
+
+ unsigned int ms() const;
+ bool singleShot() const;
+
+ void notifyAll();
+ void addNotify(SVGElementImpl *element);
+ void removeNotify(SVGElementImpl *element);
+
+private:
+ unsigned int m_ms;
+ bool m_invoked, m_singleShot;
+
+ QTimer *m_timer;
+ SVGNotifyList m_notifyList;
+};
+
+typedef QValueList<SVGTimer *> SVGTimerList;
+class SVGDocumentImpl;
+class SVGTimeScheduler : public QObject
+{
+Q_OBJECT
+public:
+ SVGTimeScheduler(SVGDocumentImpl *doc);
+ ~SVGTimeScheduler();
+
+ // Adds singleShot Timers
+ void addTimer(SVGElementImpl *element, unsigned int ms);
+
+ // (Dis-)Connects to interval timer with ms = 'staticTimerInterval'
+ void connectIntervalTimer(SVGElementImpl *element);
+ void disconnectIntervalTimer(SVGElementImpl *element);
+
+ void startAnimations();
+ void toggleAnimations();
+ bool animationsPaused() const;
+
+ // time elapsed in seconds after creation of this object
+ float elapsed() const;
+
+ static const unsigned int staticTimerInterval;
+
+private slots:
+ void slotTimerNotify();
+
+private:
+ SVGDocumentImpl *m_doc;
+ SVGTimerList m_timerList;
+ SVGTimer *m_intervalTimer;
+ QTime m_creationTime;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTitleElementImpl.cc b/ksvg/impl/SVGTitleElementImpl.cc
new file mode 100644
index 00000000..5bfe2936
--- /dev/null
+++ b/ksvg/impl/SVGTitleElementImpl.cc
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGDocumentImpl.h"
+#include "SVGTitleElementImpl.h"
+
+using namespace KSVG;
+
+SVGTitleElementImpl::SVGTitleElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGLangSpaceImpl(), SVGStylableImpl(this)
+{
+}
+
+SVGTitleElementImpl::~SVGTitleElementImpl()
+{
+}
+
+void SVGTitleElementImpl::createItem(KSVGCanvas *)
+{
+ emit ownerDoc()->gotTitle(collectText());
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTitleElementImpl.h b/ksvg/impl/SVGTitleElementImpl.h
new file mode 100644
index 00000000..7c948842
--- /dev/null
+++ b/ksvg/impl/SVGTitleElementImpl.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTitleElementImpl_H
+#define SVGTitleElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+
+namespace KSVG
+{
+
+class SVGTitleElementImpl : public SVGElementImpl,
+ public SVGLangSpaceImpl,
+ public SVGStylableImpl
+{
+public:
+ SVGTitleElementImpl(DOM::ElementImpl *);
+ virtual ~SVGTitleElementImpl();
+
+ virtual void createItem(KSVGCanvas *c = 0);
+
+public:
+ KSVG_BRIDGE
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+KSVG_REGISTER_ELEMENT(SVGTitleElementImpl, "title")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformImpl.cc b/ksvg/impl/SVGTransformImpl.cc
new file mode 100644
index 00000000..53ea9bf3
--- /dev/null
+++ b/ksvg/impl/SVGTransformImpl.cc
@@ -0,0 +1,240 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGTransform.h"
+
+#include "SVGMatrixImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTransformImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+SVGTransformImpl::SVGTransformImpl()
+{
+ m_matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ m_type = SVG_TRANSFORM_UNKNOWN;
+ m_angle = 0;
+}
+
+SVGTransformImpl::~SVGTransformImpl()
+{
+ if(m_matrix)
+ m_matrix->deref();
+}
+
+unsigned short SVGTransformImpl::type() const
+{
+ return m_type;
+}
+
+SVGMatrixImpl *SVGTransformImpl::matrix() const
+{
+ return m_matrix;
+}
+
+double SVGTransformImpl::angle() const
+{
+ return m_angle;
+}
+
+void SVGTransformImpl::setMatrix(SVGMatrixImpl *matrix)
+{
+ if(!matrix)
+ return;
+
+ m_type = SVG_TRANSFORM_MATRIX;
+ m_angle = 0;
+
+ m_matrix->deref();
+ m_matrix = matrix;
+ m_matrix->ref();
+}
+
+void SVGTransformImpl::setTranslate(double tx, double ty)
+{
+ m_type = SVG_TRANSFORM_TRANSLATE;
+ m_angle = 0;
+ m_matrix->reset();
+ m_matrix->translate(tx, ty);
+}
+
+void SVGTransformImpl::setScale(double sx, double sy)
+{
+ m_type = SVG_TRANSFORM_SCALE;
+ m_angle = 0;
+ m_matrix->reset();
+ m_matrix->scaleNonUniform(sx, sy);
+}
+
+void SVGTransformImpl::setRotate(double angle, double cx, double cy)
+{
+ m_type = SVG_TRANSFORM_ROTATE;
+ // mop: evil...fix that...needed to make toString() work correctly
+ m_cx = cx;
+ m_cy = cy;
+ m_angle = angle;
+ m_matrix->reset();
+ m_matrix->translate(cx, cy);
+ m_matrix->rotate(angle);
+ m_matrix->translate(-cx, -cy);
+}
+
+void SVGTransformImpl::setSkewX(double angle)
+{
+ m_type = SVG_TRANSFORM_SKEWX;
+ m_angle = angle;
+ m_matrix->reset();
+ m_matrix->skewX(angle);
+}
+
+void SVGTransformImpl::setSkewY(double angle)
+{
+ m_type = SVG_TRANSFORM_SKEWY;
+ m_angle = angle;
+ m_matrix->reset();
+ m_matrix->skewY(angle);
+}
+
+QString SVGTransformImpl::toString() const
+{
+ switch (m_type)
+ {
+ case SVG_TRANSFORM_UNKNOWN:
+ return QString();
+ case SVG_TRANSFORM_MATRIX:
+ return QString("matrix(" + QString::number(m_matrix->a()) + " " + QString::number(m_matrix->b()) + " " + QString::number(m_matrix->c()) + " " + QString::number(m_matrix->d()) + " " + QString::number(m_matrix->e()) + " " + QString::number(m_matrix->f()) + ")");
+ case SVG_TRANSFORM_TRANSLATE:
+ return QString("translate(" + QString::number(m_matrix->e()) + " " + QString::number(m_matrix->f()) + ")");
+ case SVG_TRANSFORM_SCALE:
+ return QString("scale(" + QString::number(m_matrix->a()) + " " + QString::number(m_matrix->d()) + ")");
+ case SVG_TRANSFORM_ROTATE:
+ return QString("rotate(" + QString::number(m_angle) + " " + QString::number(m_cx) + " " + QString::number(m_cy) + ")");
+ case SVG_TRANSFORM_SKEWX:
+ return QString("skewX(" + QString::number(m_angle) + ")");
+ case SVG_TRANSFORM_SKEWY:
+ return QString("skewY(" + QString::number(m_angle) + ")");
+ default:
+ kdWarning() << "Unknown transform type " << m_type << endl;
+ return QString();
+ }
+}
+
+// ECMA binding
+
+/*
+@namespace KSVG
+@begin SVGTransformImpl::s_hashTable 5
+ type SVGTransformImpl::Type DontDelete|ReadOnly
+ matrix SVGTransformImpl::Matrix DontDelete|ReadOnly
+ angle SVGTransformImpl::Angle DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGTransformImplProto::s_hashTable 7
+ setMatrix SVGTransformImpl::SetMatrix DontDelete|Function 1
+ setTranslate SVGTransformImpl::SetTranslate DontDelete|Function 2
+ setScale SVGTransformImpl::SetScale DontDelete|Function 2
+ setRotate SVGTransformImpl::SetRotate DontDelete|Function 3
+ setSkewX SVGTransformImpl::SetSkewX DontDelete|Function 1
+ setSkewY SVGTransformImpl::SetSkewY DontDelete|Function 1
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGTransform", SVGTransformImplProto, SVGTransformImplProtoFunc)
+
+Value SVGTransformImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Type:
+ return Number(m_type);
+ case Matrix:
+ return m_matrix->cache(exec);
+ case Angle:
+ return Number(m_angle);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+Value SVGTransformImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGTransformImpl)
+
+ switch(id)
+ {
+ case SVGTransformImpl::SetMatrix:
+ obj->setMatrix(static_cast<KSVGBridge<SVGMatrixImpl> *>(args[0].imp())->impl());
+ break;
+ case SVGTransformImpl::SetTranslate:
+ obj->setTranslate(args[0].toNumber(exec), args[1].toNumber(exec));
+ break;
+ case SVGTransformImpl::SetScale:
+ obj->setScale(args[0].toNumber(exec), args[1].toNumber(exec));
+ break;
+ case SVGTransformImpl::SetRotate:
+ obj->setRotate(args[0].toNumber(exec), args[1].toNumber(exec), args[2].toNumber(exec));
+ break;
+ case SVGTransformImpl::SetSkewX:
+ obj->setSkewX(args[0].toNumber(exec));
+ break;
+ case SVGTransformImpl::SetSkewY:
+ obj->setSkewY(args[0].toNumber(exec));
+ break;
+ default:
+ kdWarning() << "Unhandled function id in " << k_funcinfo << " : " << id << endl;
+ break;
+ }
+
+ return Undefined();
+}
+
+/*
+@namespace KSVG
+@begin SVGTransformImplConstructor::s_hashTable 11
+ SVG_TRANSFORM_UNKNOWN KSVG::SVG_TRANSFORM_UNKNOWN DontDelete|ReadOnly
+ SVG_TRANSFORM_MATRIX KSVG::SVG_TRANSFORM_MATRIX DontDelete|ReadOnly
+ SVG_TRANSFORM_TRANSLATE KSVG::SVG_TRANSFORM_TRANSLATE DontDelete|ReadOnly
+ SVG_TRANSFORM_SCALE KSVG::SVG_TRANSFORM_SCALE DontDelete|ReadOnly
+ SVG_TRANSFORM_ROTATE KSVG::SVG_TRANSFORM_ROTATE DontDelete|ReadOnly
+ SVG_TRANSFORM_SKEWX KSVG::SVG_TRANSFORM_SKEWX DontDelete|ReadOnly
+ SVG_TRANSFORM_SKEWY KSVG::SVG_TRANSFORM_SKEWY DontDelete|ReadOnly
+@end
+*/
+
+Value SVGTransformImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGTransformImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGTransformImplConstructor>(exec, "[[svgtransform.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformImpl.h b/ksvg/impl/SVGTransformImpl.h
new file mode 100644
index 00000000..69d71b8f
--- /dev/null
+++ b/ksvg/impl/SVGTransformImpl.h
@@ -0,0 +1,99 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransformImpl_H
+#define SVGTransformImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+class QString;
+
+namespace KSVG
+{
+
+class SVGMatrixImpl;
+class SVGTransformImpl : public DOM::DomShared
+{
+public:
+ SVGTransformImpl();
+ virtual ~SVGTransformImpl();
+
+ unsigned short type() const;
+
+ SVGMatrixImpl *matrix() const;
+
+ double angle() const;
+
+ void setMatrix(SVGMatrixImpl *);
+ void setTranslate(double, double);
+ void setScale(double, double);
+ void setRotate(double, double, double);
+ void setSkewX(double);
+ void setSkewY(double);
+
+ QString toString() const;
+
+private:
+ // mop: we have to store the optional rotate stuff :( anyone with a better solution please fix that ;)
+ double m_cx;
+ double m_cy;
+
+ unsigned short m_type;
+ SVGMatrixImpl *m_matrix;
+ double m_angle;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ Type, Matrix, Angle,
+ // Functions
+ SetMatrix, SetTranslate, SetScale,
+ SetRotate, SetSkewX, SetSkewY
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+class SVGTransformImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGTransformImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGTransformImplConstructor(KJS::ExecState *exec);
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGTransformImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGTransformImplProtoFunc, SVGTransformImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformListImpl.cc b/ksvg/impl/SVGTransformListImpl.cc
new file mode 100644
index 00000000..5ecc16b6
--- /dev/null
+++ b/ksvg/impl/SVGTransformListImpl.cc
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGMatrixImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTransformListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTransformListImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGTransformListImpl::s_hashTable 2
+ numberOfItems SVGListDefs::NumberOfItems DontDelete|ReadOnly
+@end
+@namespace KSVG
+@begin SVGTransformListImplProto::s_hashTable 11
+ getItem SVGListDefs::GetItem DontDelete|Function 1
+ removeItem SVGListDefs::RemoveItem DontDelete|Function 1
+ appendItem SVGListDefs::AppendItem DontDelete|Function 1
+ initialize SVGListDefs::Initialize DontDelete|Function 1
+ insertItemBefore SVGListDefs::InsertItemBefore DontDelete|Function 2
+ replaceItem SVGListDefs::ReplaceItem DontDelete|Function 2
+ clear SVGListDefs::Clear DontDelete|Function 0
+@end
+*/
+
+KSVG_IMPLEMENT_PROTOTYPE("SVGTransformList", SVGTransformListImplProto, SVGTransformListImplProtoFunc)
+
+Value SVGTransformListImpl::getValueProperty(ExecState *exec, int token) const
+{
+ return SVGList<SVGTransformImpl>::getValueProperty(exec, token);
+}
+
+Value SVGTransformListImplProtoFunc::call(ExecState *exec, Object &thisObj, const List &args)
+{
+ KSVG_CHECK_THIS(SVGTransformListImpl)
+
+ return obj->call(exec, static_cast<SVGList<SVGTransformImpl> *>(obj), args, id);
+}
+
+SVGTransformImpl *SVGTransformListImpl::consolidate()
+{
+ SVGTransformImpl *trans = 0;
+
+ if(numberOfItems()>0)
+ {
+ trans = SVGSVGElementImpl::createSVGTransform();
+ SVGMatrixImpl *matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ for(unsigned int i = 0; i < numberOfItems(); i++)
+ matrix->multiply(getItem(i)->matrix());
+
+ // Pedantic - sets type to MATRIX as per spec.
+ trans->setMatrix(matrix);
+ matrix->deref();
+ initialize(trans);
+ trans->ref();
+ }
+
+ return trans;
+}
+
+SVGMatrixImpl *SVGTransformListImpl::concatenate() const
+{
+ SVGMatrixImpl *matrix = 0;
+
+ if(numberOfItems()>0)
+ {
+ matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ for(unsigned int i = 0; i < numberOfItems(); i++)
+ matrix->multiply(getItem(i)->matrix());
+ }
+
+ return matrix;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformListImpl.h b/ksvg/impl/SVGTransformListImpl.h
new file mode 100644
index 00000000..d59c6046
--- /dev/null
+++ b/ksvg/impl/SVGTransformListImpl.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransformListImpl_H
+#define SVGTransformListImpl_H
+
+#include "SVGList.h"
+
+#include "SVGTransformImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGTransformListImpl : public SVGList<SVGTransformImpl>
+{
+public:
+ KSVG_GET
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+
+ SVGTransformImpl *consolidate();
+
+ // Concatenate the transforms. Returns 0 if list is empty
+ SVGMatrixImpl *concatenate() const;
+};
+
+}
+
+KSVG_DEFINE_PROTOTYPE(SVGTransformListImplProto)
+KSVG_IMPLEMENT_PROTOFUNC(SVGTransformListImplProtoFunc, SVGTransformListImpl)
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformableImpl.cc b/ksvg/impl/SVGTransformableImpl.cc
new file mode 100644
index 00000000..59dd904b
--- /dev/null
+++ b/ksvg/impl/SVGTransformableImpl.cc
@@ -0,0 +1,169 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGMatrixImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+
+using namespace KSVG;
+
+#include "SVGTransformableImpl.lut.h"
+#include "ksvg_bridge.h"
+
+SVGTransformableImpl::SVGTransformableImpl() : SVGLocatableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_transform = new SVGAnimatedTransformListImpl();
+ m_transform->ref();
+
+ m_localMatrix = 0;
+}
+
+SVGTransformableImpl::SVGTransformableImpl(const SVGTransformableImpl &other) : SVGLocatableImpl()
+{
+ (*this) = other;
+}
+
+SVGTransformableImpl::~SVGTransformableImpl()
+{
+ if(m_transform)
+ m_transform->deref();
+ if(m_localMatrix)
+ m_localMatrix->deref();
+}
+
+SVGTransformableImpl &SVGTransformableImpl::operator=(const SVGTransformableImpl &other)
+{
+ SVGTransformListImpl *otherTransform = other.m_transform->baseVal();
+
+ // Concat computed values
+ for(unsigned int i = 0;i < otherTransform->numberOfItems(); i++)
+ {
+ SVGTransformImpl *trafo = otherTransform->getItem(i);
+ m_transform->baseVal()->insertItemBefore(SVGSVGElementImpl::createSVGTransformFromMatrix(trafo->matrix()), i);
+ }
+
+ return *this;
+}
+
+SVGAnimatedTransformListImpl *SVGTransformableImpl::transform() const
+{
+ return m_transform;
+}
+
+SVGMatrixImpl *SVGTransformableImpl::getCTM()
+{
+ SVGMatrixImpl *ctm = SVGSVGElementImpl::createSVGMatrix();
+
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this);
+ Q_ASSERT(element);
+
+ DOM::Node parentNde = element->parentNode();
+
+ if(!parentNde.isNull() && parentNde.nodeType() != DOM::Node::DOCUMENT_NODE)
+ {
+ SVGElementImpl *parent = element->ownerDoc()->getElementFromHandle(parentNde.handle());
+ SVGLocatableImpl *locatableParent = dynamic_cast<SVGLocatableImpl *>(parent);
+
+ if(locatableParent)
+ {
+ SVGMatrixImpl *parentCTM = locatableParent->getCTM();
+ ctm->multiply(parentCTM);
+ parentCTM->deref();
+ }
+ }
+
+ if(m_localMatrix)
+ {
+ ctm->multiply(m_localMatrix);
+ }
+
+ return ctm;
+}
+
+void SVGTransformableImpl::updateLocalMatrix()
+{
+ if(m_transform->baseVal()->numberOfItems()>0)
+ {
+ if(m_localMatrix)
+ m_localMatrix->deref();
+
+ m_localMatrix = m_transform->baseVal()->concatenate();
+ }
+ else
+ {
+ if(m_localMatrix)
+ {
+ m_localMatrix->deref();
+ m_localMatrix = 0;
+ }
+ }
+
+ invalidateCachedMatrices();
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGTransformableImpl::s_hashTable 2
+ transform SVGTransformableImpl::Transform DontDelete
+@end
+*/
+
+Value SVGTransformableImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Transform:
+ return m_transform->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGTransformableImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Transform:
+ SVGHelperImpl::parseTransformAttribute(m_transform->baseVal(), value.toString(exec).qstring());
+ updateLocalMatrix();
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGTransformableImpl.h b/ksvg/impl/SVGTransformableImpl.h
new file mode 100644
index 00000000..edff5831
--- /dev/null
+++ b/ksvg/impl/SVGTransformableImpl.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGTransformableImpl_H
+#define SVGTransformableImpl_H
+
+#include <qstring.h>
+
+#include "SVGLocatableImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGMatrixImpl;
+class SVGAnimatedTransformListImpl;
+
+class SVGTransformableImpl : public SVGLocatableImpl
+{
+public:
+ SVGTransformableImpl();
+ SVGTransformableImpl(const SVGTransformableImpl &);
+ virtual ~SVGTransformableImpl();
+
+ SVGTransformableImpl &operator=(const SVGTransformableImpl &);
+
+ SVGAnimatedTransformListImpl *transform() const;
+
+ virtual SVGMatrixImpl *getCTM();
+
+ // The local transformations concatenated together. 0 if
+ // there are no local transformations.
+ virtual const SVGMatrixImpl *localMatrix() { return m_localMatrix; }
+
+private:
+ SVGAnimatedTransformListImpl *m_transform;
+ SVGMatrixImpl *m_localMatrix;
+
+ void updateLocalMatrix();
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Transform
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGURIReferenceImpl.cc b/ksvg/impl/SVGURIReferenceImpl.cc
new file mode 100644
index 00000000..a68b7442
--- /dev/null
+++ b/ksvg/impl/SVGURIReferenceImpl.cc
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGURIReferenceImpl.h"
+#include "SVGAnimatedStringImpl.h"
+
+using namespace KSVG;
+
+#include "SVGURIReferenceImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+
+SVGURIReferenceImpl::SVGURIReferenceImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_href = new SVGAnimatedStringImpl();
+ m_href->ref();
+}
+
+SVGURIReferenceImpl::~SVGURIReferenceImpl()
+{
+ if(m_href)
+ m_href->deref();
+}
+
+SVGAnimatedStringImpl *SVGURIReferenceImpl::href() const
+{
+ return m_href;
+}
+
+bool SVGURIReferenceImpl::parseURIReference(const QString &urireference, QString &uri, QString &elementreference)
+{
+ int seperator = urireference.find("#");
+
+ if(seperator == -1)
+ return false;
+
+ uri = urireference.left(seperator);
+ elementreference = urireference.mid(seperator + 1);
+
+ return true;
+}
+
+bool SVGURIReferenceImpl::isUrl(const QString &url)
+{
+ QString temp = url.stripWhiteSpace();
+ return temp.startsWith("url(#") && temp.endsWith(")");
+}
+
+QString SVGURIReferenceImpl::getTarget(const QString &url)
+{
+ if(url.startsWith("url(")) // URI References, ie. fill:url(#target)
+ {
+ unsigned int start = url.find("#") + 1;
+ unsigned int end = url.findRev(")");
+
+ return url.mid(start, end - start);
+ }
+ else if(url.find("#") > -1) // format is #target
+ {
+ unsigned int start = url.find("#") + 1;
+
+ return url.mid(start, url.length() - start);
+ }
+ else // Normal Reference, ie. style="color-profile:changeColor"
+ return url;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGURIReferenceImpl::s_hashTable 2
+ href SVGURIReferenceImpl::Href DontDelete|ReadOnly
+@end
+*/
+
+Value SVGURIReferenceImpl::getValueProperty(ExecState *exec, int token) const
+{
+ switch(token)
+ {
+ case Href:
+ return m_href->cache(exec);
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGURIReferenceImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case Href:
+ {
+ if(m_href)
+ m_href->deref();
+
+ SVGAnimatedStringImpl *temp = new SVGAnimatedStringImpl();
+ temp->ref();
+ temp->setBaseVal(value.toString(exec).string());
+ m_href = temp;
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGURIReferenceImpl.h b/ksvg/impl/SVGURIReferenceImpl.h
new file mode 100644
index 00000000..d6ee42c5
--- /dev/null
+++ b/ksvg/impl/SVGURIReferenceImpl.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGURIReferenceImpl_H
+#define SVGURIReferenceImpl_H
+
+#include "ksvg_lookup.h"
+
+class QString;
+
+namespace KSVG
+{
+
+class SVGAnimatedStringImpl;
+class SVGURIReferenceImpl
+{
+public:
+ SVGURIReferenceImpl();
+ ~SVGURIReferenceImpl();
+
+ SVGAnimatedStringImpl *href() const;
+ static QString getTarget(const QString &url);
+ static bool isUrl(const QString &url);
+ static bool parseURIReference(const QString &urireference, QString &uri, QString &elementreference);
+
+protected:
+ SVGAnimatedStringImpl *m_href;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ Href
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGUnitConverter.h b/ksvg/impl/SVGUnitConverter.h
new file mode 100644
index 00000000..90c95796
--- /dev/null
+++ b/ksvg/impl/SVGUnitConverter.h
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGUnitConverter_H
+#define SVGUnitConverter_H
+
+#include <qptrdict.h>
+
+#include <dom/dom_string.h>
+
+#include "SVGUnitTypes.h"
+#include "SVGShapeImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+
+namespace KSVG
+{
+
+class SVGUnitConverter
+{
+public:
+ SVGUnitConverter() { m_dict.setAutoDelete(true); }
+ ~SVGUnitConverter() { }
+
+ void add(SVGAnimatedLengthImpl *obj)
+ {
+ UnitData *data = new UnitData();
+ data->valueAsString = QString::null;
+
+ m_dict.insert(obj, data);
+ }
+
+ void modify(SVGAnimatedLengthImpl *obj, const QString &value)
+ {
+ UnitData *data = m_dict.find(obj);
+
+ if(data)
+ data->valueAsString = value;
+ }
+
+ void finalize(SVGShapeImpl *bboxContext, SVGShapeImpl *userContext, unsigned short unitType)
+ {
+ bool user = (unitType == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
+ bool bbox = (unitType == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+
+ if(!user && !bbox) // Invalid unit type
+ return;
+
+ QPtrDictIterator<UnitData> it(m_dict);
+ for(; it.current(); ++it)
+ {
+ UnitData *data = it.current();
+
+ if(!data)
+ continue;
+
+ SVGAnimatedLengthImpl *obj = static_cast<SVGAnimatedLengthImpl *>(it.currentKey());
+
+ if(bbox)
+ obj->baseVal()->setBBoxContext(bboxContext);
+ else
+ obj->baseVal()->setBBoxContext(userContext);
+
+ if(user) // Just assign value, no conversion needed!
+ obj->baseVal()->setValueAsString(data->valueAsString);
+ else // Convert to objectBoundingBox
+ obj->baseVal()->setValueAsString(SVGLengthImpl::convertValToPercentage(data->valueAsString));
+ }
+ }
+
+private:
+ typedef struct
+ {
+ QString valueAsString; // Original value
+ } UnitData;
+
+ QPtrDict<UnitData> m_dict;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGUseElementImpl.cc b/ksvg/impl/SVGUseElementImpl.cc
new file mode 100644
index 00000000..3bd38a42
--- /dev/null
+++ b/ksvg/impl/SVGUseElementImpl.cc
@@ -0,0 +1,409 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstring.h>
+
+#include "KSVGLoader.h"
+#include "KSVGCanvas.h"
+
+#include "SVGRectImpl.h"
+#include "SVGEventImpl.h"
+#include "SVGHelperImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGTransformImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGUseElementImpl.h"
+#include "SVGSymbolElementImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGElementInstanceImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+
+using namespace KSVG;
+
+#include "SVGUseElementImpl.lut.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGUseElementImpl::SVGUseElementImpl(DOM::ElementImpl *impl) : SVGShapeImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_x = new SVGAnimatedLengthImpl();
+ m_x->ref();
+
+ m_y = new SVGAnimatedLengthImpl();
+ m_y->ref();
+
+ m_width = new SVGAnimatedLengthImpl();
+ m_width->ref();
+
+ m_height = new SVGAnimatedLengthImpl();
+ m_height->ref();
+
+ m_instanceRoot = 0;
+}
+
+SVGUseElementImpl::~SVGUseElementImpl()
+{
+ if(m_x)
+ m_x->deref();
+ if(m_y)
+ m_y->deref();
+ if(m_width)
+ m_width->deref();
+ if(m_height)
+ m_height->deref();
+ if(m_instanceRoot)
+ m_instanceRoot->deref();
+}
+
+SVGAnimatedLengthImpl *SVGUseElementImpl::x() const
+{
+ return m_x;
+}
+
+SVGAnimatedLengthImpl *SVGUseElementImpl::y() const
+{
+ return m_y;
+}
+
+SVGAnimatedLengthImpl *SVGUseElementImpl::width() const
+{
+ return m_width;
+}
+
+SVGAnimatedLengthImpl *SVGUseElementImpl::height() const
+{
+ return m_height;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGUseElementImpl::s_hashTable 11
+ x SVGUseElementImpl::X DontDelete|ReadOnly
+ y SVGUseElementImpl::Y DontDelete|ReadOnly
+ width SVGUseElementImpl::Width DontDelete|ReadOnly
+ height SVGUseElementImpl::Height DontDelete|ReadOnly
+ href SVGUseElementImpl::Href DontDelete|ReadOnly
+ instanceRoot SVGUseElementImpl::InstanceRoot DontDelete|ReadOnly
+ animatedInstanceRoot SVGUseElementImpl::AnimatedInstanceRoot DontDelete|ReadOnly
+@end
+*/
+
+Value SVGUseElementImpl::getValueProperty(ExecState *exec, int token) const
+{
+ KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case X:
+ if(!attributeMode)
+ return m_x->cache(exec);
+ else
+ return Number(m_x->baseVal()->value());
+ case Y:
+ if(!attributeMode)
+ return m_y->cache(exec);
+ else
+ return Number(m_y->baseVal()->value());
+ case Width:
+ if(!attributeMode)
+ return m_width->cache(exec);
+ else
+ return Number(m_width->baseVal()->value());
+ case Height:
+ if(!attributeMode)
+ return m_height->cache(exec);
+ else
+ return Number(m_height->baseVal()->value());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGUseElementImpl::putValueProperty(ExecState *exec, int token, const Value &value, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case X:
+ x()->baseVal()->setValue(value.toNumber(exec));
+ break;
+ case Y:
+ y()->baseVal()->setValue(value.toNumber(exec));
+ break;
+ case Width:
+ width()->baseVal()->setValue(value.toNumber(exec));
+ break;
+ case Height:
+ height()->baseVal()->setValue(value.toNumber(exec));
+ break;
+ case Href:
+ {
+ QString url = value.toString(exec).qstring();
+ href()->setBaseVal(SVGURIReferenceImpl::getTarget(url));
+ break;
+ }
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+SVGRectImpl *SVGUseElementImpl::getBBox()
+{
+ if(m_instanceRoot)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && shape)
+ return shape->getBBox();
+ }
+
+ SVGRectImpl *ret = new SVGRectImpl();
+ ret->ref();
+ ret->setX(m_x->baseVal()->value());
+ ret->setY(m_y->baseVal()->value());
+ ret->setWidth(m_width->baseVal()->value());
+ ret->setHeight(m_height->baseVal()->value());
+ return ret;
+}
+
+SVGElementInstanceImpl *SVGUseElementImpl::instanceRoot() const
+{
+ return m_instanceRoot;
+}
+
+SVGElementInstanceImpl *SVGUseElementImpl::animatedInstanceRoot() const
+{
+ return m_animatedInstanceRoot;
+}
+
+void SVGUseElementImpl::createItem(KSVGCanvas *c)
+{
+ if(!m_instanceRoot)
+ {
+ // ownerSVGElement()->getElementById() is wrong here.
+ // It could reference elements from other documents when using getURL (Niko)
+ QString filename, id;
+ DOM::DOMString url = getAttribute("href");
+ if(!SVGURIReferenceImpl::parseURIReference(url.string(), filename, id))
+ return;
+
+ SVGElementImpl *orig;
+ if(!filename.isEmpty())
+ {
+ KURL fragmentUrl(ownerDoc()->baseUrl(), url.string());
+
+ id = fragmentUrl.ref();
+ fragmentUrl.setRef(QString::null);
+
+ orig = KSVGLoader::getSVGFragment(fragmentUrl, ownerDoc(), id);
+ }
+ else
+ {
+ orig = ownerDoc()->getElementByIdRecursive(ownerSVGElement(), href()->baseVal());
+
+ if(orig == 0)
+ {
+ // The document will try to create this item again once the parsing has finished.
+ ownerDoc()->addForwardReferencingUseElement(this);
+ }
+ }
+
+ if(orig == 0)
+ return;
+
+ setReferencedElement(orig);
+
+ // Create a parent, a <g>
+ SVGElementImpl *parent = 0;
+ DOM::Element impl = static_cast<DOM::Document *>(ownerDoc())->createElement("g");
+ parent = SVGDocumentImpl::createElement("g", impl, ownerDoc());
+ SVGElementImpl *clone = orig->cloneNode(true);
+
+ // Apply the use-correction
+ QString trans;
+ trans += " translate(";
+ trans += QString::number(x()->baseVal()->value());
+ trans += " ";
+ trans += QString::number(y()->baseVal()->value());
+ trans += ")";
+
+ // Apply the transform attribute and render the element
+ parent->setAttributeInternal("transform", trans);
+ parent->setAttribute("transform", trans);
+
+ // Apply width/height if symbol
+ if(dynamic_cast<SVGSymbolElementImpl *>(clone))
+ {
+ DOM::Element impl = static_cast<DOM::Document *>(ownerDoc())->createElement("svg");
+ SVGElementImpl *symbolSvg = SVGDocumentImpl::createElement("svg", impl, ownerDoc());
+
+ SVGHelperImpl::copyAttributes(orig, symbolSvg);
+
+ symbolSvg->setAttribute("width", getAttribute("width"));
+ symbolSvg->setAttributeInternal("width", getAttribute("width"));
+ symbolSvg->setAttribute("height", getAttribute("height"));
+ symbolSvg->setAttributeInternal("height", getAttribute("height"));
+ DOM::Node node = clone->firstChild();
+ for(; !node.isNull(); node = clone->firstChild())
+ symbolSvg->appendChild(node);
+
+ clone = symbolSvg;
+ }
+ else if(dynamic_cast<SVGSVGElementImpl *>(clone))
+ {
+ if(!getAttribute("width").isEmpty())
+ {
+ clone->setAttribute("width", getAttribute("width"));
+ clone->setAttributeInternal("width", getAttribute("width"));
+ }
+
+ if(!getAttribute("height").isEmpty())
+ {
+ clone->setAttribute("height", getAttribute("height"));
+ clone->setAttributeInternal("height", getAttribute("height"));
+ }
+ }
+
+ appendChild(*parent);
+ parent->appendChild(*clone);
+
+ setupSubtree(parent, ownerSVGElement(), viewportElement());
+
+ m_instanceRoot->setCorrespondingElement(clone);
+
+ dynamic_cast<SVGLocatableImpl *>(parent)->updateCachedScreenCTM(screenCTM());
+
+ // Redirect local ecma event handlers to the correspondingElement
+ QPtrListIterator<SVGRegisteredEventListener> it(eventListeners());
+ SVGRegisteredEventListener *eventListener;
+ while((eventListener = it.current()) != 0)
+ {
+ ++it;
+ clone->setEventListener(eventListener->id, eventListener->listener);
+ }
+ }
+
+ if(m_instanceRoot)
+ {
+ SVGElementImpl *element = m_instanceRoot->correspondingElement();
+ element->createItem(c);
+ }
+}
+
+void SVGUseElementImpl::removeItem(KSVGCanvas *c)
+{
+ if(m_instanceRoot)
+ {
+ SVGElementImpl *element = m_instanceRoot->correspondingElement();
+ element->removeItem(c);
+ }
+}
+
+void SVGUseElementImpl::setupSubtree(SVGElementImpl *element, SVGSVGElementImpl *ownerSVG, SVGElementImpl *viewport)
+{
+ element->setOwnerSVGElement(ownerSVG);
+ element->setViewportElement(viewport);
+ element->setAttributes();
+
+ SVGSVGElementImpl *thisSVG = dynamic_cast<SVGSVGElementImpl *>(element);
+
+ if(thisSVG != 0)
+ {
+ ownerSVG = thisSVG;
+ viewport = element;
+ }
+
+ DOM::Node child = element->firstChild();
+ for(; !child.isNull(); child = child.nextSibling())
+ {
+ SVGElementImpl *childElement = ownerDoc()->getElementFromHandle(child.handle());
+ if(childElement != 0)
+ setupSubtree(childElement, ownerSVG, viewport);
+ }
+}
+
+void SVGUseElementImpl::setReferencedElement(SVGElementImpl *referenced)
+{
+ if(!referenced)
+ return;
+
+ if(!m_instanceRoot)
+ {
+ m_instanceRoot = new SVGElementInstanceImpl();
+ m_instanceRoot->ref();
+ }
+
+ m_instanceRoot->setCorrespondingElement(referenced);
+}
+
+void SVGUseElementImpl::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(m_instanceRoot)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(shape)
+ shape->update(reason, param1, param2);
+ }
+}
+
+void SVGUseElementImpl::invalidate(KSVGCanvas *c, bool recalc)
+{
+ if(m_instanceRoot)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(shape)
+ shape->invalidate(c, recalc);
+ }
+}
+
+void SVGUseElementImpl::setReferenced(bool referenced)
+{
+ if(m_instanceRoot)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(shape)
+ shape->setReferenced(referenced);
+ }
+}
+
+void SVGUseElementImpl::draw()
+{
+ if(m_instanceRoot)
+ {
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement());
+ if(shape)
+ shape->draw();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGUseElementImpl.h b/ksvg/impl/SVGUseElementImpl.h
new file mode 100644
index 00000000..02eb8d88
--- /dev/null
+++ b/ksvg/impl/SVGUseElementImpl.h
@@ -0,0 +1,101 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGUseElementImpl_H
+#define SVGUseElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGTestsImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGLangSpaceImpl.h"
+#include "SVGURIReferenceImpl.h"
+#include "SVGTransformableImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+namespace KSVG
+{
+
+class SVGAnimatedLengthImpl;
+class SVGElementInstanceImpl;
+class SVGUseElementImpl : public SVGShapeImpl,
+ public SVGURIReferenceImpl,
+ public SVGTestsImpl,
+ public SVGLangSpaceImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGStylableImpl,
+ public SVGTransformableImpl
+{
+public:
+ SVGUseElementImpl(DOM::ElementImpl *);
+ virtual ~SVGUseElementImpl();
+
+ SVGAnimatedLengthImpl *x() const;
+ SVGAnimatedLengthImpl *y() const;
+ SVGAnimatedLengthImpl *width() const;
+ SVGAnimatedLengthImpl *height() const;
+
+ SVGElementInstanceImpl *instanceRoot() const;
+ SVGElementInstanceImpl *animatedInstanceRoot() const;
+
+ virtual void createItem(KSVGCanvas *c);
+ virtual void removeItem(KSVGCanvas *c);
+ virtual void update(CanvasItemUpdate reason, int param1, int param2);
+ virtual void invalidate(KSVGCanvas *c, bool recalc);
+ virtual void setReferenced(bool referenced);
+ virtual void draw();
+
+ virtual SVGRectImpl *getBBox();
+
+ void setReferencedElement(SVGElementImpl *);
+
+private:
+ SVGAnimatedLengthImpl *m_x;
+ SVGAnimatedLengthImpl *m_y;
+ SVGAnimatedLengthImpl *m_width;
+ SVGAnimatedLengthImpl *m_height;
+ SVGElementInstanceImpl *m_instanceRoot;
+ SVGElementInstanceImpl *m_animatedInstanceRoot;
+
+ void setupSubtree(SVGElementImpl *element, SVGSVGElementImpl *ownerSVG, SVGElementImpl *viewport);
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ X, Y, Width, Height, Href, InstanceRoot, AnimatedInstanceRoot
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGUseElementImpl, "use")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGVKernElementImpl.cc b/ksvg/impl/SVGVKernElementImpl.cc
new file mode 100644
index 00000000..b89d6e6f
--- /dev/null
+++ b/ksvg/impl/SVGVKernElementImpl.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGVKernElementImpl.h"
+
+using namespace KSVG;
+
+SVGVKernElementImpl::SVGVKernElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl)
+{
+}
+
+SVGVKernElementImpl::~SVGVKernElementImpl()
+{
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGVKernElementImpl.h b/ksvg/impl/SVGVKernElementImpl.h
new file mode 100644
index 00000000..c8302c35
--- /dev/null
+++ b/ksvg/impl/SVGVKernElementImpl.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGVKernElementImpl_H
+#define SVGVKernElementImpl_H
+
+#include "ksvg_lookup.h"
+
+#include "SVGElementImpl.h"
+
+namespace KSVG
+{
+
+class SVGVKernElementImpl : public SVGElementImpl
+{
+public:
+ SVGVKernElementImpl(DOM::ElementImpl *impl);
+ virtual ~SVGVKernElementImpl();
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGViewElementImpl.cc b/ksvg/impl/SVGViewElementImpl.cc
new file mode 100644
index 00000000..a051fba0
--- /dev/null
+++ b/ksvg/impl/SVGViewElementImpl.cc
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGStringListImpl.h"
+#include "SVGViewElementImpl.h"
+
+using namespace KSVG;
+
+#include "SVGViewElementImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_ecma.h"
+
+SVGViewElementImpl::SVGViewElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGExternalResourcesRequiredImpl(), SVGFitToViewBoxImpl(), SVGZoomAndPanImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_viewTarget = new SVGStringListImpl();
+ m_viewTarget->ref();
+}
+
+SVGViewElementImpl::~SVGViewElementImpl()
+{
+ if(m_viewTarget)
+ m_viewTarget->deref();
+}
+
+SVGStringListImpl *SVGViewElementImpl::viewTarget() const
+{
+ return m_viewTarget;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGViewElementImpl::s_hashTable 2
+ viewTarget SVGViewElementImpl::ViewTarget DontDelete|ReadOnly
+@end
+*/
+
+Value SVGViewElementImpl::getValueProperty(ExecState *, int token) const
+{
+ //KSVG_CHECK_ATTRIBUTE
+
+ switch(token)
+ {
+ case ViewTarget:
+ // TODO
+ return Undefined();
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+void SVGViewElementImpl::putValueProperty(ExecState *, int token, const Value &, int attr)
+{
+ // This class has just ReadOnly properties, only with the Internal flag set
+ // it's allowed to modify those.
+ if(!(attr & KJS::Internal))
+ return;
+
+ switch(token)
+ {
+ case ViewTarget:
+ // TODO
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGViewElementImpl.h b/ksvg/impl/SVGViewElementImpl.h
new file mode 100644
index 00000000..8b8d7e0b
--- /dev/null
+++ b/ksvg/impl/SVGViewElementImpl.h
@@ -0,0 +1,70 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGViewElementImpl_H
+#define SVGViewElementImpl_H
+
+#include "SVGElementImpl.h"
+#include "SVGZoomAndPanImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+#include "SVGExternalResourcesRequiredImpl.h"
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGStringListImpl;
+class SVGViewElementImpl : public SVGElementImpl,
+ public SVGExternalResourcesRequiredImpl,
+ public SVGFitToViewBoxImpl,
+ public SVGZoomAndPanImpl
+{
+public:
+ SVGViewElementImpl(DOM::ElementImpl *);
+ virtual ~SVGViewElementImpl();
+
+ SVGStringListImpl *viewTarget() const;
+
+private:
+ SVGStringListImpl *m_viewTarget;
+
+public:
+ KSVG_GET
+ KSVG_PUT
+ KSVG_BRIDGE
+
+ enum
+ {
+ // Properties
+ ViewTarget
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+KSVG_REGISTER_ELEMENT(SVGViewElementImpl, "view")
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGViewSpecImpl.cc b/ksvg/impl/SVGViewSpecImpl.cc
new file mode 100644
index 00000000..07412cc5
--- /dev/null
+++ b/ksvg/impl/SVGViewSpecImpl.cc
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include <qstringlist.h>
+
+#include "SVGElementImpl.h"
+#include "SVGViewSpecImpl.h"
+#include "SVGTransformListImpl.h"
+
+using namespace KSVG;
+
+SVGViewSpecImpl::SVGViewSpecImpl() : SVGZoomAndPanImpl(), SVGFitToViewBoxImpl()
+{
+ m_transform = new SVGTransformListImpl();
+ m_transform->ref();
+
+ m_viewTarget = new SVGElementImpl(0);
+ m_viewTarget->ref();
+}
+
+SVGViewSpecImpl::~SVGViewSpecImpl()
+{
+ if(m_transform)
+ m_transform->deref();
+ if(m_viewTarget)
+ m_viewTarget->deref();
+}
+
+SVGTransformListImpl *SVGViewSpecImpl::transform() const
+{
+ return m_transform;
+}
+
+SVGElementImpl *SVGViewSpecImpl::viewTarget() const
+{
+ return m_viewTarget;
+}
+
+DOM::DOMString SVGViewSpecImpl::viewBoxString() const
+{
+ return m_viewBoxString;
+}
+
+DOM::DOMString SVGViewSpecImpl::preserveAspectRatioString() const
+{
+ return m_preserveAspectRatioString;
+}
+
+DOM::DOMString SVGViewSpecImpl::transformString() const
+{
+ return m_transformString;
+}
+
+DOM::DOMString SVGViewSpecImpl::viewTargetString() const
+{
+ return m_viewTargetString;
+}
+
+bool SVGViewSpecImpl::parseViewSpec(const QString &s)
+{
+ if(!s.startsWith("svgView("))
+ return false;
+
+ // remove 'svgView(' and ')'
+ QStringList subAttrs = QStringList::split(';', s.mid(8));
+
+ for(QStringList::ConstIterator it = subAttrs.begin() ; it != subAttrs.end(); ++it)
+ {
+ if((*it).startsWith("viewBox("))
+ m_viewBoxString = (*it).mid(8);
+ else if((*it).startsWith("zoomAndPan("))
+ parseZoomAndPan(DOM::DOMString((*it).mid(11)));
+ else if((*it).startsWith("preserveAspectRatio("))
+ m_preserveAspectRatioString = (*it).mid(20);
+ }
+ return true;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGViewSpecImpl.h b/ksvg/impl/SVGViewSpecImpl.h
new file mode 100644
index 00000000..f9e01e48
--- /dev/null
+++ b/ksvg/impl/SVGViewSpecImpl.h
@@ -0,0 +1,69 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGViewSpecImpl_H
+#define SVGViewSpecImpl_H
+
+#include <dom/dom_string.h>
+#include <dom/dom_misc.h>
+
+#include "ksvg_lookup.h"
+
+#include "SVGZoomAndPanImpl.h"
+#include "SVGFitToViewBoxImpl.h"
+
+namespace KSVG
+{
+
+class SVGElementImpl;
+class SVGTransformListImpl;
+class SVGViewSpecImpl : public DOM::DomShared, public SVGZoomAndPanImpl, public SVGFitToViewBoxImpl
+{
+public:
+ SVGViewSpecImpl();
+ virtual ~SVGViewSpecImpl();
+
+ SVGTransformListImpl *transform() const;
+ SVGElementImpl *viewTarget() const;
+ DOM::DOMString viewBoxString() const;
+ DOM::DOMString preserveAspectRatioString() const;
+ DOM::DOMString transformString() const;
+ DOM::DOMString viewTargetString() const;
+
+ bool parseViewSpec(const QString &);
+
+private:
+ SVGTransformListImpl *m_transform;
+ SVGElementImpl *m_viewTarget;
+ DOM::DOMString m_viewBoxString;
+ DOM::DOMString m_preserveAspectRatioString;
+ DOM::DOMString m_transformString;
+ DOM::DOMString m_viewTargetString;
+
+public:
+ KSVG_FORWARDGET
+ KSVG_FORWARDPUT
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGWindowImpl.cc b/ksvg/impl/SVGWindowImpl.cc
new file mode 100644
index 00000000..b19847a4
--- /dev/null
+++ b/ksvg/impl/SVGWindowImpl.cc
@@ -0,0 +1,187 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "SVGWindowImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGEvent.h"
+#include "KSVGCanvas.h"
+#include <ksvg_ecma.h>
+#include <ksvg_scriptinterpreter.h>
+
+#include <qstylesheet.h>
+
+#include <kurl.h>
+#include <kmessagebox.h>
+#include <kinputdialog.h>
+#include <klocale.h>
+
+using namespace KSVG;
+
+
+SVGWindowImpl::SVGWindowImpl()
+{
+ m_document = 0;
+}
+
+SVGWindowImpl::SVGWindowImpl(SVGDocumentImpl *doc)
+{
+ m_document = doc;
+ if(m_document)
+ m_document->ref();
+}
+
+SVGWindowImpl::~SVGWindowImpl()
+{
+ if(m_document)
+ m_document->deref();
+}
+
+/*StyleSheet SVGWindowImpl::defaultStyleSheet() const
+{
+ return m_defaultStyleSheet;
+}*/
+
+SVGDocumentImpl *SVGWindowImpl::document() const
+{
+ return m_document;
+}
+
+DOM::Event SVGWindowImpl::evt() const
+{
+ return KSVG::SVGEvent(m_document->ecmaEngine()->interpreter()->currentEvent());
+}
+
+long SVGWindowImpl::innerHeight() const
+{
+ return m_document ? int(m_document->canvas()->height()) : -1;
+}
+
+long SVGWindowImpl::innerWidth() const
+{
+ return m_document ? int(m_document->canvas()->width()) : -1;
+}
+
+void SVGWindowImpl::setSrc(const DOM::DOMString &/*src*/)
+{
+ // TODO : make KURL, load and parse doc
+}
+
+DOM::DOMString SVGWindowImpl::src() const
+{
+ if(!m_document)
+ return DOM::DOMString();
+ return m_document->baseUrl().prettyURL();
+}
+
+void SVGWindowImpl::clearInterval(long /*interval*/)
+{
+}
+
+void SVGWindowImpl::clearTimeout(long /*timeout*/)
+{
+}
+
+void SVGWindowImpl::getURL(const DOM::DOMString &/*uri*/, const DOM::EventListener &/*callback*/)
+{
+}
+
+/*DocumentFragment SVGWindowImpl::parseXML(const DOM::DOMString &source, const Document &document)
+{
+}*/
+
+void SVGWindowImpl::postURL(const DOM::DOMString &/*uri*/, const DOM::DOMString &/*data*/, const DOM::EventListener &/*callback*/, const DOM::DOMString &/*mimeType*/, const DOM::DOMString &/*contentEncoding*/)
+{
+}
+
+DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short level)
+{
+ QString ret;
+ if(node.isNull()) return ret;
+ SVGElementImpl *elem = m_document->getElementFromHandle(node.handle());
+ if(node.nodeType() == DOM::Node::DOCUMENT_NODE)
+ {
+ ret += "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n" + printNode(node.firstChild()).string() + "\n";
+ }
+ else if(node.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ printIndentation(ret, level);
+ ret += node.nodeValue().string();
+ }
+ else if(elem)
+ {
+ printIndentation(ret, level);
+ ret += "<" + elem->tagName().string();
+ // handle attrs
+ QDictIterator<DOM::DOMString> it(elem->attributes());
+ for(;it.current(); ++it)
+ ret += " " + it.currentKey() + "=\"" + it.current()->string() + '\"';
+ if(elem->firstChild().isNull()) // no children
+ ret += " />\n";
+ else // handle children
+ {
+ ret += ">\n";
+ for(DOM::Node child = node.firstChild();!child.isNull();child = child.nextSibling())
+ ret += printNode(child, level + 1).string();
+ printIndentation(ret, level);
+ ret += "</" + elem->tagName().string() + ">\n";
+ }
+ }
+ return ret;
+}
+
+void SVGWindowImpl::printIndentation(QString &ret, unsigned short level, unsigned short indent)
+{
+ for(int i = 0;i < indent * level;i++)
+ ret += " ";
+}
+
+long SVGWindowImpl::setInterval(const DOM::DOMString &/*code*/, const long &/*delay*/)
+{
+ return 0;
+}
+
+long SVGWindowImpl::setTimeout(const DOM::DOMString &/*code*/, const long &/*delay*/)
+{
+ return 0;
+}
+
+void SVGWindowImpl::alert(const DOM::DOMString &message, const QString &title)
+{
+ KMessageBox::error(0L, QStyleSheet::convertFromPlainText(message.string()), title);
+}
+
+bool SVGWindowImpl::confirm(const DOM::DOMString &message, const QString &title)
+{
+ return KMessageBox::warningContinueCancel(0L, QStyleSheet::convertFromPlainText(message.string()), title, KStdGuiItem::ok()) == KMessageBox::Continue;
+}
+
+DOM::DOMString SVGWindowImpl::prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const QString &)
+{
+ bool ok;
+ QString str;
+ str = KInputDialog::getText(i18n("Prompt"), QStyleSheet::convertFromPlainText(message.string()), _default.string(), &ok);
+ if(ok)
+ return str;
+ else
+ return "";
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGWindowImpl.h b/ksvg/impl/SVGWindowImpl.h
new file mode 100644
index 00000000..0861809e
--- /dev/null
+++ b/ksvg/impl/SVGWindowImpl.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGWindowImpl_H
+#define SVGWindowImpl_H
+
+#include <dom/dom_string.h>
+#include <dom/dom_node.h>
+#include <dom/dom_misc.h>
+#include <dom/dom2_events.h>
+
+namespace KSVG
+{
+class SVGDocumentImpl;
+
+class SVGWindowImpl : public DOM::DomShared
+{
+public:
+ SVGWindowImpl();
+ SVGWindowImpl(SVGDocumentImpl *doc);
+ virtual ~SVGWindowImpl();
+
+ //StyleSheet defaultStyleSheet() const;
+ SVGDocumentImpl *document() const;
+ DOM::Event evt() const;
+ long innerHeight() const;
+ long innerWidth() const;
+
+ void setSrc(const DOM::DOMString &src);
+ DOM::DOMString src() const;
+
+ void clearInterval(long interval);
+ void clearTimeout(long timeout);
+ void getURL(const DOM::DOMString &uri, const DOM::EventListener &callback);
+ //DocumentFragment parseXML(const DOM::DOMString &source, const Document &document);
+ void postURL(const DOM::DOMString &uri, const DOM::DOMString &data, const DOM::EventListener &callback, const DOM::DOMString &mimeType, const DOM::DOMString &contentEncoding);
+ DOM::DOMString printNode(const DOM::Node &node, unsigned short level = 0);
+ long setInterval(const DOM::DOMString &code, const long &delay);
+ long setTimeout(const DOM::DOMString &code, const long &delay);
+ static void alert(const DOM::DOMString &message, const QString &title = "SVG Window");
+ static bool confirm(const DOM::DOMString &message, const QString &title = "SVG Window");
+ static DOM::DOMString prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const QString &title = "SVG Window");
+
+private:
+ void printIndentation(QString &ret, unsigned short level, unsigned short indent = 2);
+
+private:
+ //StyleSheet m_defaultStyleSheet;
+ SVGDocumentImpl *m_document;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGZoomAndPanImpl.cc b/ksvg/impl/SVGZoomAndPanImpl.cc
new file mode 100644
index 00000000..f3bf96ce
--- /dev/null
+++ b/ksvg/impl/SVGZoomAndPanImpl.cc
@@ -0,0 +1,112 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "SVGZoomAndPan.h"
+#include "SVGZoomAndPanImpl.h"
+
+using namespace KSVG;
+
+#include "SVGZoomAndPanImpl.lut.h"
+#include "ksvg_scriptinterpreter.h"
+#include "ksvg_bridge.h"
+#include "ksvg_cacheimpl.h"
+
+SVGZoomAndPanImpl::SVGZoomAndPanImpl()
+{
+ KSVG_EMPTY_FLAGS
+
+ m_zoomAndPan = SVG_ZOOMANDPAN_MAGNIFY;
+}
+
+SVGZoomAndPanImpl::~SVGZoomAndPanImpl()
+{
+}
+
+void SVGZoomAndPanImpl::setZoomAndPan(unsigned short zoomAndPan)
+{
+ m_zoomAndPan = zoomAndPan;
+}
+
+unsigned short SVGZoomAndPanImpl::zoomAndPan() const
+{
+ return m_zoomAndPan;
+}
+
+void SVGZoomAndPanImpl::parseZoomAndPan(const DOM::DOMString &attr)
+{
+ if(attr == "disable")
+ m_zoomAndPan = SVG_ZOOMANDPAN_DISABLE;
+}
+
+// Ecma stuff
+
+/*
+@namespace KSVG
+@begin SVGZoomAndPanImpl::s_hashTable 2
+ zoomAndPan SVGZoomAndPanImpl::ZoomAndPan DontDelete
+@end
+*/
+
+Value SVGZoomAndPanImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case ZoomAndPan:
+ return Number(zoomAndPan());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return KJS::Undefined();
+ }
+}
+
+void SVGZoomAndPanImpl::putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int)
+{
+ switch(token)
+ {
+ case ZoomAndPan:
+ parseZoomAndPan(value.toString(exec).string());
+ break;
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ }
+}
+
+/*
+@namespace KSVG
+@begin SVGZoomAndPanImplConstructor::s_hashTable 5
+ SVG_ZOOMANDPAN_UNKNOWN KSVG::SVG_ZOOMANDPAN_UNKNOWN DontDelete|ReadOnly
+ SVG_ZOOMANDPAN_DISABLE KSVG::SVG_ZOOMANDPAN_DISABLE DontDelete|ReadOnly
+ SVG_ZOOMANDPAN_MAGNIFY KSVG::SVG_ZOOMANDPAN_MAGNIFY DontDelete|ReadOnly
+@end
+*/
+
+Value SVGZoomAndPanImplConstructor::getValueProperty(ExecState *, int token) const
+{
+ return Number(token);
+}
+
+Value KSVG::getSVGZoomAndPanImplConstructor(ExecState *exec)
+{
+ return cacheGlobalBridge<SVGZoomAndPanImplConstructor>(exec, "[[svgzoomandpan.constructor]]");
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGZoomAndPanImpl.h b/ksvg/impl/SVGZoomAndPanImpl.h
new file mode 100644
index 00000000..ed7fef98
--- /dev/null
+++ b/ksvg/impl/SVGZoomAndPanImpl.h
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGZoomAndPanImpl_H
+#define SVGZoomAndPanImpl_H
+
+#include <dom/dom_misc.h>
+#include <dom/dom_string.h>
+
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGZoomAndPanImpl
+{
+public:
+ SVGZoomAndPanImpl();
+ virtual ~SVGZoomAndPanImpl();
+
+ void setZoomAndPan(unsigned short zoomAndPan);
+ unsigned short zoomAndPan() const;
+
+ void parseZoomAndPan(const DOM::DOMString &attr);
+
+private:
+ unsigned short m_zoomAndPan;
+
+public:
+ KSVG_BASECLASS_GET
+ KSVG_PUT
+
+ enum
+ {
+ // Properties
+ ZoomAndPan
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+ void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr);
+};
+
+class SVGZoomAndPanImplConstructor : public KJS::ObjectImp
+{
+public:
+ SVGZoomAndPanImplConstructor(KJS::ExecState *) { }
+ KJS::Value getValueProperty(KJS::ExecState *, int token) const;
+
+ // no put - all read-only
+ KSVG_GET
+};
+
+KJS::Value getSVGZoomAndPanImplConstructor(KJS::ExecState *exec);
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGZoomEventImpl.cc b/ksvg/impl/SVGZoomEventImpl.cc
new file mode 100644
index 00000000..448309f0
--- /dev/null
+++ b/ksvg/impl/SVGZoomEventImpl.cc
@@ -0,0 +1,111 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+#include "SVGRectImpl.h"
+#include "SVGPointImpl.h"
+#include "SVGZoomEventImpl.h"
+
+using namespace KSVG;
+
+#include "SVGZoomEventImpl.lut.h"
+#include "SVGSVGElementImpl.h"
+
+using namespace KJS;
+
+SVGZoomEventImpl::SVGZoomEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ long detailArg,
+ float previousScale, SVGPointImpl *previousTranslate,
+ float newScale, SVGPointImpl *newTranslate)
+: SVGUIEventImpl(_id, canBubbleArg, cancelableArg, viewArg, detailArg), m_previousScale( previousScale ), m_newScale( newScale )
+{
+ m_zoomRectScreen = SVGSVGElementImpl::createSVGRect();
+ m_previousTranslate = previousTranslate;
+ if(m_previousTranslate)
+ m_previousTranslate->ref();
+ m_newTranslate = newTranslate;
+ if(m_newTranslate)
+ m_newTranslate->ref();
+}
+
+SVGZoomEventImpl::~SVGZoomEventImpl()
+{
+ if(m_zoomRectScreen)
+ m_zoomRectScreen->deref();
+ if(m_previousTranslate)
+ m_previousTranslate->deref();
+ if(m_newTranslate)
+ m_newTranslate->deref();
+}
+
+SVGRectImpl *SVGZoomEventImpl::zoomRectScreen() const
+{
+ return m_zoomRectScreen;
+}
+
+float SVGZoomEventImpl::previousScale() const
+{
+ return m_previousScale;
+}
+
+SVGPointImpl *SVGZoomEventImpl::previousTranslate() const
+{
+ return m_previousTranslate;
+}
+
+float SVGZoomEventImpl::newScale() const
+{
+ return m_newScale;
+}
+
+SVGPointImpl *SVGZoomEventImpl::newTranslate() const
+{
+ return m_newTranslate;
+}
+
+/*
+@namespace KSVG
+@begin SVGZoomEventImpl::s_hashTable 7
+ zoomRectScreen SVGZoomEventImpl::ZoomRectScreen DontDelete|ReadOnly
+ previousScale SVGZoomEventImpl::PreviousScale DontDelete|ReadOnly
+ previousTranslate SVGZoomEventImpl::PreviousTranslate DontDelete|ReadOnly
+ newScale SVGZoomEventImpl::NewScale DontDelete|ReadOnly
+ newTranslate SVGZoomEventImpl::NewTranslate DontDelete|ReadOnly
+@end
+*/
+
+Value SVGZoomEventImpl::getValueProperty(ExecState *, int token) const
+{
+ switch(token)
+ {
+ case PreviousScale:
+ return Number(previousScale());
+ case NewScale:
+ return Number(newScale());
+ default:
+ kdWarning() << "Unhandled token in " << k_funcinfo << " : " << token << endl;
+ return Undefined();
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/SVGZoomEventImpl.h b/ksvg/impl/SVGZoomEventImpl.h
new file mode 100644
index 00000000..41706a37
--- /dev/null
+++ b/ksvg/impl/SVGZoomEventImpl.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGZoomEventImpl_H
+#define SVGZoomEventImpl_H
+
+#include "SVGEventImpl.h"
+#include "ksvg_lookup.h"
+
+namespace KSVG
+{
+
+class SVGRectImpl;
+class SVGPointImpl;
+class SVGZoomEventImpl : public SVGUIEventImpl
+{
+public:
+ SVGZoomEventImpl(SVGEvent::EventId _id,
+ bool canBubbleArg,
+ bool cancelableArg,
+ DOM::AbstractView &viewArg,
+ long detailArg,
+ float previousScale, SVGPointImpl *previousTranslate,
+ float newScale, SVGPointImpl *newTranslate);
+ virtual ~SVGZoomEventImpl();
+
+ SVGRectImpl *zoomRectScreen() const;
+
+ float previousScale() const;
+ SVGPointImpl *previousTranslate() const;
+
+ float newScale() const;
+ SVGPointImpl *newTranslate() const;
+
+private:
+ SVGRectImpl *m_zoomRectScreen;
+
+ float m_previousScale;
+ SVGPointImpl *m_previousTranslate;
+
+ float m_newScale;
+ SVGPointImpl *m_newTranslate;
+
+public:
+ KSVG_GET
+
+ enum
+ {
+ // Properties
+ ZoomRectScreen, PreviousScale, PreviousTranslate, NewScale, NewTranslate
+ };
+
+ KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/TODO b/ksvg/impl/TODO
new file mode 100644
index 00000000..8cfd4c4a
--- /dev/null
+++ b/ksvg/impl/TODO
@@ -0,0 +1,5 @@
+* cleanup SVGSVGElementImpl
+* cleanup SVGShapeImpl
+* fix SVGStringListImpl
+* attriubuteMode get() for SVGGlyphElementImpl
+* default attributes, ... for SVGGlyphElementImpl
diff --git a/ksvg/impl/generateddata.cpp b/ksvg/impl/generateddata.cpp
new file mode 100644
index 00000000..5a4b3d7b
--- /dev/null
+++ b/ksvg/impl/generateddata.cpp
@@ -0,0 +1,8899 @@
+#include <ksvg_lookup.h>
+#include <ksvg_ecma.h>
+#include <SVGZoomEventImpl.h>
+#include <SVGVKernElementImpl.h>
+#include <SVGList.h>
+#include <SVGTRefElementImpl.h>
+#include <SVGSVGElementImpl.h>
+#include <SVGFETurbulenceElementImpl.h>
+#include <SVGElementInstanceImpl.h>
+#include <SVGAnimateElementImpl.h>
+#include <SVGFEGaussianBlurElementImpl.h>
+#include <SVGZoomAndPanImpl.h>
+#include <SVGFEFuncRElementImpl.h>
+#include <SVGPathSegListImpl.h>
+#include <SVGFEFuncAElementImpl.h>
+#include <SVGFESpecularLightingElementImpl.h>
+#include <SVGComponentTransferFunctionElementImpl.h>
+#include <SVGICCColorImpl.h>
+#include <SVGFEPointLightElementImpl.h>
+#include <SVGMissingGlyphElementImpl.h>
+#include <SVGFontFaceFormatElementImpl.h>
+#include <SVGFontFaceUriElementImpl.h>
+#include <SVGFEMorphologyElementImpl.h>
+#include <SVGPaintServerImpl.h>
+#include <SVGStringListImpl.h>
+#include <SVGPolyElementImpl.h>
+#include <SVGLinearGradientElementImpl.h>
+#include <svgpathparser.h>
+#include <SVGTextPathElementImpl.h>
+#include <SVGNumberImpl.h>
+#include <SVGPathSegImpl.h>
+#include <SVGElementInstanceListImpl.h>
+#include <SVGAnimatedIntegerImpl.h>
+#include <SVGLocatableImpl.h>
+#include <SVGAngleImpl.h>
+#include <SVGAnimatedPreserveAspectRatioImpl.h>
+#include <SVGColorImpl.h>
+#include <SVGEllipseElementImpl.h>
+#include <SVGGlyphRefElementImpl.h>
+#include <SVGScriptElementImpl.h>
+#include <SVGDocumentImpl.h>
+#include <SVGAElementImpl.h>
+#include <SVGAltGlyphDefElementImpl.h>
+#include <SVGPathSegCurvetoQuadraticSmoothImpl.h>
+#include <SVGFontElementImpl.h>
+#include <SVGGElementImpl.h>
+#include <SVGPathSegLinetoImpl.h>
+#include <SVGForeignObjectElementImpl.h>
+#include <SVGAnimatedStringImpl.h>
+#include <SVGAnimatedTransformListImpl.h>
+#include <SVGPatternElementImpl.h>
+#include <SVGAltGlyphElementImpl.h>
+#include <SVGElementImpl.h>
+#include <SVGStylableImpl.h>
+#include <SVGCSSRuleImpl.h>
+#include <SVGFESpotLightElementImpl.h>
+#include <SVGPreserveAspectRatioImpl.h>
+#include <SVGColorProfileRuleImpl.h>
+#include <SVGContainerImpl.h>
+#include <SVGAnimateTransformElementImpl.h>
+#include <SVGMatrixImpl.h>
+#include <SVGEcma.h>
+#include <SVGAnimatedLengthListImpl.h>
+#include <SVGAnimatedAngleImpl.h>
+#include <SVGURIReferenceImpl.h>
+#include <SVGPolylineElementImpl.h>
+#include <SVGDefinitionSrcElementImpl.h>
+#include <SVGPathSegLinetoHorizontalImpl.h>
+#include <SVGCursorElementImpl.h>
+#include <SVGFitToViewBoxImpl.h>
+#include <SVGEventImpl.h>
+#include <SVGMetadataElementImpl.h>
+#include <SVGLengthImpl.h>
+#include <SVGTransformableImpl.h>
+#include <SVGLengthListImpl.h>
+#include <SVGTitleElementImpl.h>
+#include <SVGTSpanElementImpl.h>
+#include <SVGDescElementImpl.h>
+#include <SVGTextContentElementImpl.h>
+#include <SVGFEFuncBElementImpl.h>
+#include <SVGMPathElementImpl.h>
+#include <SVGDefsElementImpl.h>
+#include <SVGAnimateMotionElementImpl.h>
+#include <SVGStyleElementImpl.h>
+#include <SVGSwitchElementImpl.h>
+#include <SVGTransformListImpl.h>
+#include <SVGPointListImpl.h>
+#include <SVGFECompositeElementImpl.h>
+#include <SVGHKernElementImpl.h>
+#include <SVGFontFaceElementImpl.h>
+#include <SVGPathSegMovetoImpl.h>
+#include <SVGPathSegLinetoVerticalImpl.h>
+#include <SVGAnimatedLengthImpl.h>
+#include <SVGFEBlendElementImpl.h>
+#include <SVGLangSpaceImpl.h>
+#include <SVGRadialGradientElementImpl.h>
+#include <SVGAnimatedRectImpl.h>
+#include <SVGFilterPrimitiveStandardAttributesImpl.h>
+#include <SVGPathElementImpl.h>
+#include <SVGStopElementImpl.h>
+#include <SVGAnimateColorElementImpl.h>
+#include <SVGPathSegArcImpl.h>
+#include <SVGAnimatedPointsImpl.h>
+#include <SVGUseElementImpl.h>
+#include <SVGViewSpecImpl.h>
+#include <SVGFEMergeNodeElementImpl.h>
+#include <SVGHelperImpl.h>
+#include <SVGFEDiffuseLightingElementImpl.h>
+#include <SVGSymbolElementImpl.h>
+#include <SVGFEFloodElementImpl.h>
+#include <SVGAnimatedNumberListImpl.h>
+#include <SVGExternalResourcesRequiredImpl.h>
+#include <SVGFETileElementImpl.h>
+#include <SVGTextPositioningElementImpl.h>
+#include <SVGGlyphElementImpl.h>
+#include <SVGAnimatedBooleanImpl.h>
+#include <SVGSetElementImpl.h>
+#include <SVGFontFaceSrcElementImpl.h>
+#include <SVGTextElementImpl.h>
+#include <SVGFEMergeElementImpl.h>
+#include <SVGMarkerElementImpl.h>
+#include <SVGViewElementImpl.h>
+#include <SVGFEFuncGElementImpl.h>
+#include <SVGColorProfileElementImpl.h>
+#include <SVGGradientElementImpl.h>
+#include <SVGFEConvolveMatrixElementImpl.h>
+#include <SVGFontFaceNameElementImpl.h>
+#include <SVGLineElementImpl.h>
+#include <SVGUnitConverter.h>
+#include <SVGFEColorMatrixElementImpl.h>
+#include <SVGCircleElementImpl.h>
+#include <SVGTestsImpl.h>
+#include <SVGRectElementImpl.h>
+#include <SVGRectImpl.h>
+#include <SVGPolygonElementImpl.h>
+#include <SVGTimeScheduler.h>
+#include <SVGNumberListImpl.h>
+#include <SVGPathSegCurvetoCubicSmoothImpl.h>
+#include <SVGPointImpl.h>
+#include <SVGFEDistantLightElementImpl.h>
+#include <SVGPathSegCurvetoCubicImpl.h>
+#include <SVGFEComponentTransferElementImpl.h>
+#include <SVGWindowImpl.h>
+#include <SVGMaskElementImpl.h>
+#include <SVGShapeImpl.h>
+#include <SVGAnimatedEnumerationImpl.h>
+#include <SVGAnimatedPathDataImpl.h>
+#include <SVGFEOffsetElementImpl.h>
+#include <SVGPaintImpl.h>
+#include <SVGFilterElementImpl.h>
+#include <SVGImageElementImpl.h>
+#include <SVGAnimatedNumberImpl.h>
+#include <SVGAnimationElementImpl.h>
+#include <SVGFEDisplacementMapElementImpl.h>
+#include <SVGPathSegClosePathImpl.h>
+#include <SVGTransformImpl.h>
+#include <SVGFEImageElementImpl.h>
+#include <SVGPathSegCurvetoQuadraticImpl.h>
+#include <SVGClipPathElementImpl.h>
+
+using namespace KSVG;
+using namespace KJS;
+
+#include "ksvg_cacheimpl.h"
+
+// For all classes with generated data: the ClassInfo
+const DOM::DOMString SVGAElementImpl::s_tagName = "a";
+const ClassInfo SVGAElementImpl::s_classInfo = {"KSVG::SVGAElementImpl",0,&SVGAElementImpl::s_hashTable,0};
+const DOM::DOMString SVGAltGlyphDefElementImpl::s_tagName = "altGlyphDef";
+const ClassInfo SVGAltGlyphDefElementImpl::s_classInfo = {"KSVG::SVGAltGlyphDefElementImpl",0,0,0};
+const DOM::DOMString SVGAltGlyphElementImpl::s_tagName = "altGlyph";
+const ClassInfo SVGAltGlyphElementImpl::s_classInfo = {"KSVG::SVGAltGlyphElementImpl",0,0,0};
+const ClassInfo SVGAngleImpl::s_classInfo = {"KSVG::SVGAngleImpl",0,&SVGAngleImpl::s_hashTable,0};
+const ClassInfo SVGAngleImplConstructor::s_classInfo = {"KSVG::SVGAngleImplConstructor",0,&SVGAngleImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGAnimateColorElementImpl::s_tagName = "animateColor";
+const ClassInfo SVGAnimateColorElementImpl::s_classInfo = {"KSVG::SVGAnimateColorElementImpl",0,0,0};
+const DOM::DOMString SVGAnimateElementImpl::s_tagName = "animate";
+const ClassInfo SVGAnimateElementImpl::s_classInfo = {"KSVG::SVGAnimateElementImpl",0,0,0};
+const DOM::DOMString SVGAnimateMotionElementImpl::s_tagName = "animateMotion";
+const ClassInfo SVGAnimateMotionElementImpl::s_classInfo = {"KSVG::SVGAnimateMotionElementImpl",0,0,0};
+const DOM::DOMString SVGAnimateTransformElementImpl::s_tagName = "animateTransform";
+const ClassInfo SVGAnimateTransformElementImpl::s_classInfo = {"KSVG::SVGAnimateTransformElementImpl",0,0,0};
+const ClassInfo SVGAnimatedAngleImpl::s_classInfo = {"KSVG::SVGAnimatedAngleImpl",0,&SVGAnimatedAngleImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedBooleanImpl::s_classInfo = {"KSVG::SVGAnimatedBooleanImpl",0,&SVGAnimatedBooleanImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedEnumerationImpl::s_classInfo = {"KSVG::SVGAnimatedEnumerationImpl",0,&SVGAnimatedEnumerationImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedIntegerImpl::s_classInfo = {"KSVG::SVGAnimatedIntegerImpl",0,&SVGAnimatedIntegerImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedLengthImpl::s_classInfo = {"KSVG::SVGAnimatedLengthImpl",0,&SVGAnimatedLengthImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedLengthListImpl::s_classInfo = {"KSVG::SVGAnimatedLengthListImpl",0,&SVGAnimatedLengthListImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedNumberImpl::s_classInfo = {"KSVG::SVGAnimatedNumberImpl",0,&SVGAnimatedNumberImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedNumberListImpl::s_classInfo = {"KSVG::SVGAnimatedNumberListImpl",0,&SVGAnimatedNumberListImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedPathDataImpl::s_classInfo = {"KSVG::SVGAnimatedPathDataImpl",0,&SVGAnimatedPathDataImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedPointsImpl::s_classInfo = {"KSVG::SVGAnimatedPointsImpl",0,&SVGAnimatedPointsImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedPreserveAspectRatioImpl::s_classInfo = {"KSVG::SVGAnimatedPreserveAspectRatioImpl",0,&SVGAnimatedPreserveAspectRatioImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedRectImpl::s_classInfo = {"KSVG::SVGAnimatedRectImpl",0,&SVGAnimatedRectImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedStringImpl::s_classInfo = {"KSVG::SVGAnimatedStringImpl",0,&SVGAnimatedStringImpl::s_hashTable,0};
+const ClassInfo SVGAnimatedTransformListImpl::s_classInfo = {"KSVG::SVGAnimatedTransformListImpl",0,&SVGAnimatedTransformListImpl::s_hashTable,0};
+const ClassInfo SVGAnimationElementImpl::s_classInfo = {"KSVG::SVGAnimationElementImpl",0,&SVGAnimationElementImpl::s_hashTable,0};
+const DOM::DOMString SVGCircleElementImpl::s_tagName = "circle";
+const ClassInfo SVGCircleElementImpl::s_classInfo = {"KSVG::SVGCircleElementImpl",0,&SVGCircleElementImpl::s_hashTable,0};
+const DOM::DOMString SVGClipPathElementImpl::s_tagName = "clipPath";
+const ClassInfo SVGClipPathElementImpl::s_classInfo = {"KSVG::SVGClipPathElementImpl",0,&SVGClipPathElementImpl::s_hashTable,0};
+const ClassInfo SVGColorImpl::s_classInfo = {"KSVG::SVGColorImpl",0,&SVGColorImpl::s_hashTable,0};
+const ClassInfo SVGColorImplConstructor::s_classInfo = {"KSVG::SVGColorImplConstructor",0,&SVGColorImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGColorProfileElementImpl::s_tagName = "color-profile";
+const ClassInfo SVGColorProfileElementImpl::s_classInfo = {"KSVG::SVGColorProfileElementImpl",0,&SVGColorProfileElementImpl::s_hashTable,0};
+const ClassInfo SVGComponentTransferFunctionElementImpl::s_classInfo = {"KSVG::SVGComponentTransferFunctionElementImpl",0,0,0};
+const ClassInfo SVGContainerImpl::s_classInfo = {"KSVG::SVGContainerImpl",0,0,0};
+const ClassInfo SVGCursorElementImpl::s_classInfo = {"KSVG::SVGCursorElementImpl",0,&SVGCursorElementImpl::s_hashTable,0};
+const ClassInfo SVGDOMCharacterDataBridge::s_classInfo = {"KSVG::SVGDOMCharacterDataBridge",0,&SVGDOMCharacterDataBridge::s_hashTable,0};
+const ClassInfo SVGDOMDOMImplementationBridge::s_classInfo = {"KSVG::SVGDOMDOMImplementationBridge",0,&SVGDOMDOMImplementationBridge::s_hashTable,0};
+const ClassInfo SVGDOMDocumentFragmentBridge::s_classInfo = {"KSVG::SVGDOMDocumentFragmentBridge",0,&SVGDOMDocumentFragmentBridge::s_hashTable,0};
+const ClassInfo SVGDOMElementBridge::s_classInfo = {"KSVG::SVGDOMElementBridge",0,&SVGDOMElementBridge::s_hashTable,0};
+const ClassInfo SVGDOMNodeBridge::s_classInfo = {"KSVG::SVGDOMNodeBridge",0,&SVGDOMNodeBridge::s_hashTable,0};
+const ClassInfo SVGDOMNodeListBridge::s_classInfo = {"KSVG::SVGDOMNodeListBridge",0,&SVGDOMNodeListBridge::s_hashTable,0};
+const ClassInfo SVGDOMTextBridge::s_classInfo = {"KSVG::SVGDOMTextBridge",0,&SVGDOMTextBridge::s_hashTable,0};
+const ClassInfo SVGDefinitionSrcElementImpl::s_classInfo = {"KSVG::SVGDefinitionSrcElementImpl",0,0,0};
+const DOM::DOMString SVGDefsElementImpl::s_tagName = "defs";
+const ClassInfo SVGDefsElementImpl::s_classInfo = {"KSVG::SVGDefsElementImpl",0,0,0};
+const DOM::DOMString SVGDescElementImpl::s_tagName = "desc";
+const ClassInfo SVGDescElementImpl::s_classInfo = {"KSVG::SVGDescElementImpl",0,0,0};
+const ClassInfo SVGDocumentImpl::s_classInfo = {"KSVG::SVGDocumentImpl",0,&SVGDocumentImpl::s_hashTable,0};
+const ClassInfo SVGElementImpl::s_classInfo = {"KSVG::SVGElementImpl",0,&SVGElementImpl::s_hashTable,0};
+const DOM::DOMString SVGEllipseElementImpl::s_tagName = "ellipse";
+const ClassInfo SVGEllipseElementImpl::s_classInfo = {"KSVG::SVGEllipseElementImpl",0,&SVGEllipseElementImpl::s_hashTable,0};
+const ClassInfo SVGEventImpl::s_classInfo = {"KSVG::SVGEventImpl",0,&SVGEventImpl::s_hashTable,0};
+const ClassInfo SVGExternalResourcesRequiredImpl::s_classInfo = {"KSVG::SVGExternalResourcesRequiredImpl",0,&SVGExternalResourcesRequiredImpl::s_hashTable,0};
+const ClassInfo SVGFEBlendElementImpl::s_classInfo = {"KSVG::SVGFEBlendElementImpl",0,0,0};
+const ClassInfo SVGFEColorMatrixElementImpl::s_classInfo = {"KSVG::SVGFEColorMatrixElementImpl",0,0,0};
+const ClassInfo SVGFEComponentTransferElementImpl::s_classInfo = {"KSVG::SVGFEComponentTransferElementImpl",0,0,0};
+const ClassInfo SVGFECompositeElementImpl::s_classInfo = {"KSVG::SVGFECompositeElementImpl",0,0,0};
+const ClassInfo SVGFEConvolveMatrixElementImpl::s_classInfo = {"KSVG::SVGFEConvolveMatrixElementImpl",0,0,0};
+const ClassInfo SVGFEDiffuseLightingElementImpl::s_classInfo = {"KSVG::SVGFEDiffuseLightingElementImpl",0,0,0};
+const ClassInfo SVGFEDisplacementMapElementImpl::s_classInfo = {"KSVG::SVGFEDisplacementMapElementImpl",0,0,0};
+const ClassInfo SVGFEDistantLightElementImpl::s_classInfo = {"KSVG::SVGFEDistantLightElementImpl",0,0,0};
+const ClassInfo SVGFEFloodElementImpl::s_classInfo = {"KSVG::SVGFEFloodElementImpl",0,0,0};
+const ClassInfo SVGFEFuncAElementImpl::s_classInfo = {"KSVG::SVGFEFuncAElementImpl",0,0,0};
+const ClassInfo SVGFEFuncBElementImpl::s_classInfo = {"KSVG::SVGFEFuncBElementImpl",0,0,0};
+const ClassInfo SVGFEFuncGElementImpl::s_classInfo = {"KSVG::SVGFEFuncGElementImpl",0,0,0};
+const ClassInfo SVGFEFuncRElementImpl::s_classInfo = {"KSVG::SVGFEFuncRElementImpl",0,0,0};
+const ClassInfo SVGFEGaussianBlurElementImpl::s_classInfo = {"KSVG::SVGFEGaussianBlurElementImpl",0,0,0};
+const ClassInfo SVGFEImageElementImpl::s_classInfo = {"KSVG::SVGFEImageElementImpl",0,0,0};
+const ClassInfo SVGFEMergeElementImpl::s_classInfo = {"KSVG::SVGFEMergeElementImpl",0,0,0};
+const ClassInfo SVGFEMergeNodeElementImpl::s_classInfo = {"KSVG::SVGFEMergeNodeElementImpl",0,0,0};
+const ClassInfo SVGFEMorphologyElementImpl::s_classInfo = {"KSVG::SVGFEMorphologyElementImpl",0,0,0};
+const ClassInfo SVGFEOffsetElementImpl::s_classInfo = {"KSVG::SVGFEOffsetElementImpl",0,0,0};
+const ClassInfo SVGFEPointLightElementImpl::s_classInfo = {"KSVG::SVGFEPointLightElementImpl",0,0,0};
+const ClassInfo SVGFESpecularLightingElementImpl::s_classInfo = {"KSVG::SVGFESpecularLightingElementImpl",0,0,0};
+const ClassInfo SVGFESpotLightElementImpl::s_classInfo = {"KSVG::SVGFESpotLightElementImpl",0,0,0};
+const ClassInfo SVGFETileElementImpl::s_classInfo = {"KSVG::SVGFETileElementImpl",0,0,0};
+const ClassInfo SVGFETurbulenceElementImpl::s_classInfo = {"KSVG::SVGFETurbulenceElementImpl",0,0,0};
+const ClassInfo SVGFilterElementImpl::s_classInfo = {"KSVG::SVGFilterElementImpl",0,0,0};
+const ClassInfo SVGFitToViewBoxImpl::s_classInfo = {"KSVG::SVGFitToViewBoxImpl",0,&SVGFitToViewBoxImpl::s_hashTable,0};
+const ClassInfo SVGFontElementImpl::s_classInfo = {"KSVG::SVGFontElementImpl",0,0,0};
+const ClassInfo SVGFontFaceElementImpl::s_classInfo = {"KSVG::SVGFontFaceElementImpl",0,0,0};
+const ClassInfo SVGFontFaceFormatElementImpl::s_classInfo = {"KSVG::SVGFontFaceFormatElementImpl",0,0,0};
+const ClassInfo SVGFontFaceNameElementImpl::s_classInfo = {"KSVG::SVGFontFaceNameElementImpl",0,0,0};
+const ClassInfo SVGFontFaceSrcElementImpl::s_classInfo = {"KSVG::SVGFontFaceSrcElementImpl",0,0,0};
+const ClassInfo SVGFontFaceUriElementImpl::s_classInfo = {"KSVG::SVGFontFaceUriElementImpl",0,0,0};
+const ClassInfo SVGForeignObjectElementImpl::s_classInfo = {"KSVG::SVGForeignObjectElementImpl",0,&SVGForeignObjectElementImpl::s_hashTable,0};
+const DOM::DOMString SVGGElementImpl::s_tagName = "g";
+const ClassInfo SVGGElementImpl::s_classInfo = {"KSVG::SVGGElementImpl",0,0,0};
+const DOM::DOMString SVGGlyphElementImpl::s_tagName = "glyph";
+const ClassInfo SVGGlyphElementImpl::s_classInfo = {"KSVG::SVGGlyphElementImpl",0,&SVGGlyphElementImpl::s_hashTable,0};
+const DOM::DOMString SVGGlyphRefElementImpl::s_tagName = "glyphRef";
+const ClassInfo SVGGlyphRefElementImpl::s_classInfo = {"KSVG::SVGGlyphRefElementImpl",0,&SVGGlyphRefElementImpl::s_hashTable,0};
+const ClassInfo SVGGradientElementImpl::s_classInfo = {"KSVG::SVGGradientElementImpl",0,&SVGGradientElementImpl::s_hashTable,0};
+const ClassInfo SVGGradientElementImplConstructor::s_classInfo = {"KSVG::SVGGradientElementImplConstructor",0,&SVGGradientElementImplConstructor::s_hashTable,0};
+const ClassInfo SVGHKernElementImpl::s_classInfo = {"KSVG::SVGHKernElementImpl",0,0,0};
+const ClassInfo SVGICCColorImpl::s_classInfo = {"KSVG::SVGICCColorImpl",0,&SVGICCColorImpl::s_hashTable,0};
+const DOM::DOMString SVGImageElementImpl::s_tagName = "image";
+const ClassInfo SVGImageElementImpl::s_classInfo = {"KSVG::SVGImageElementImpl",0,&SVGImageElementImpl::s_hashTable,0};
+const ClassInfo SVGKeyEventImpl::s_classInfo = {"KSVG::SVGKeyEventImpl",0,&SVGKeyEventImpl::s_hashTable,0};
+const ClassInfo SVGLangSpaceImpl::s_classInfo = {"KSVG::SVGLangSpaceImpl",0,&SVGLangSpaceImpl::s_hashTable,0};
+const ClassInfo SVGLengthImpl::s_classInfo = {"KSVG::SVGLengthImpl",0,&SVGLengthImpl::s_hashTable,0};
+const ClassInfo SVGLengthImplConstructor::s_classInfo = {"KSVG::SVGLengthImplConstructor",0,&SVGLengthImplConstructor::s_hashTable,0};
+const ClassInfo SVGLengthListImpl::s_classInfo = {"KSVG::SVGLengthListImpl",0,&SVGLengthListImpl::s_hashTable,0};
+const DOM::DOMString SVGLineElementImpl::s_tagName = "line";
+const ClassInfo SVGLineElementImpl::s_classInfo = {"KSVG::SVGLineElementImpl",0,&SVGLineElementImpl::s_hashTable,0};
+const DOM::DOMString SVGLinearGradientElementImpl::s_tagName = "linearGradient";
+const ClassInfo SVGLinearGradientElementImpl::s_classInfo = {"KSVG::SVGLinearGradientElementImpl",0,&SVGLinearGradientElementImpl::s_hashTable,0};
+const ClassInfo SVGLocatableImpl::s_classInfo = {"KSVG::SVGLocatableImpl",0,&SVGLocatableImpl::s_hashTable,0};
+const ClassInfo SVGMPathElementImpl::s_classInfo = {"KSVG::SVGMPathElementImpl",0,0,0};
+const DOM::DOMString SVGMarkerElementImpl::s_tagName = "marker";
+const ClassInfo SVGMarkerElementImpl::s_classInfo = {"KSVG::SVGMarkerElementImpl",0,&SVGMarkerElementImpl::s_hashTable,0};
+const ClassInfo SVGMarkerElementImplConstructor::s_classInfo = {"KSVG::SVGMarkerElementImplConstructor",0,&SVGMarkerElementImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGMaskElementImpl::s_tagName = "mask";
+const ClassInfo SVGMaskElementImpl::s_classInfo = {"KSVG::SVGMaskElementImpl",0,&SVGMaskElementImpl::s_hashTable,0};
+const ClassInfo SVGMatrixImpl::s_classInfo = {"KSVG::SVGMatrixImpl",0,&SVGMatrixImpl::s_hashTable,0};
+const ClassInfo SVGMetadataElementImpl::s_classInfo = {"KSVG::SVGMetadataElementImpl",0,0,0};
+const ClassInfo SVGMissingGlyphElementImpl::s_classInfo = {"KSVG::SVGMissingGlyphElementImpl",0,0,0};
+const ClassInfo SVGMouseEventImpl::s_classInfo = {"KSVG::SVGMouseEventImpl",0,&SVGMouseEventImpl::s_hashTable,0};
+const ClassInfo SVGMutationEventImpl::s_classInfo = {"KSVG::SVGMutationEventImpl",0,0,0};
+const ClassInfo SVGNumberImpl::s_classInfo = {"KSVG::SVGNumberImpl",0,&SVGNumberImpl::s_hashTable,0};
+const ClassInfo SVGNumberListImpl::s_classInfo = {"KSVG::SVGNumberListImpl",0,&SVGNumberListImpl::s_hashTable,0};
+const ClassInfo SVGPaintImpl::s_classInfo = {"KSVG::SVGPaintImpl",0,&SVGPaintImpl::s_hashTable,0};
+const ClassInfo SVGPaintImplConstructor::s_classInfo = {"KSVG::SVGPaintImplConstructor",0,&SVGPaintImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGPathElementImpl::s_tagName = "path";
+const ClassInfo SVGPathElementImpl::s_classInfo = {"KSVG::SVGPathElementImpl",0,&SVGPathElementImpl::s_hashTable,0};
+const ClassInfo SVGPathSegArcAbsImpl::s_classInfo = {"KSVG::SVGPathSegArcAbsImpl",0,&SVGPathSegArcAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegArcRelImpl::s_classInfo = {"KSVG::SVGPathSegArcRelImpl",0,&SVGPathSegArcRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegClosePathImpl::s_classInfo = {"KSVG::SVGPathSegClosePathImpl",0,0,0};
+const ClassInfo SVGPathSegCurvetoCubicAbsImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoCubicAbsImpl",0,&SVGPathSegCurvetoCubicAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoCubicRelImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoCubicRelImpl",0,&SVGPathSegCurvetoCubicRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoCubicSmoothAbsImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoCubicSmoothAbsImpl",0,&SVGPathSegCurvetoCubicSmoothAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoCubicSmoothRelImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoCubicSmoothRelImpl",0,&SVGPathSegCurvetoCubicSmoothRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoQuadraticAbsImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoQuadraticAbsImpl",0,&SVGPathSegCurvetoQuadraticAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoQuadraticRelImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoQuadraticRelImpl",0,&SVGPathSegCurvetoQuadraticRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoQuadraticSmoothAbsImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoQuadraticSmoothAbsImpl",0,&SVGPathSegCurvetoQuadraticSmoothAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegCurvetoQuadraticSmoothRelImpl::s_classInfo = {"KSVG::SVGPathSegCurvetoQuadraticSmoothRelImpl",0,&SVGPathSegCurvetoQuadraticSmoothRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegImpl::s_classInfo = {"KSVG::SVGPathSegImpl",0,&SVGPathSegImpl::s_hashTable,0};
+const ClassInfo SVGPathSegImplConstructor::s_classInfo = {"KSVG::SVGPathSegImplConstructor",0,&SVGPathSegImplConstructor::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoAbsImpl::s_classInfo = {"KSVG::SVGPathSegLinetoAbsImpl",0,&SVGPathSegLinetoAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoHorizontalAbsImpl::s_classInfo = {"KSVG::SVGPathSegLinetoHorizontalAbsImpl",0,&SVGPathSegLinetoHorizontalAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoHorizontalRelImpl::s_classInfo = {"KSVG::SVGPathSegLinetoHorizontalRelImpl",0,&SVGPathSegLinetoHorizontalRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoRelImpl::s_classInfo = {"KSVG::SVGPathSegLinetoRelImpl",0,&SVGPathSegLinetoRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoVerticalAbsImpl::s_classInfo = {"KSVG::SVGPathSegLinetoVerticalAbsImpl",0,&SVGPathSegLinetoVerticalAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegLinetoVerticalRelImpl::s_classInfo = {"KSVG::SVGPathSegLinetoVerticalRelImpl",0,&SVGPathSegLinetoVerticalRelImpl::s_hashTable,0};
+const ClassInfo SVGPathSegListImpl::s_classInfo = {"KSVG::SVGPathSegListImpl",0,&SVGPathSegListImpl::s_hashTable,0};
+const ClassInfo SVGPathSegMovetoAbsImpl::s_classInfo = {"KSVG::SVGPathSegMovetoAbsImpl",0,&SVGPathSegMovetoAbsImpl::s_hashTable,0};
+const ClassInfo SVGPathSegMovetoRelImpl::s_classInfo = {"KSVG::SVGPathSegMovetoRelImpl",0,&SVGPathSegMovetoRelImpl::s_hashTable,0};
+const DOM::DOMString SVGPatternElementImpl::s_tagName = "pattern";
+const ClassInfo SVGPatternElementImpl::s_classInfo = {"KSVG::SVGPatternElementImpl",0,&SVGPatternElementImpl::s_hashTable,0};
+const ClassInfo SVGPointImpl::s_classInfo = {"KSVG::SVGPointImpl",0,&SVGPointImpl::s_hashTable,0};
+const ClassInfo SVGPointListImpl::s_classInfo = {"KSVG::SVGPointListImpl",0,&SVGPointListImpl::s_hashTable,0};
+const ClassInfo SVGPolyElementImpl::s_classInfo = {"KSVG::SVGPolyElementImpl",0,0,0};
+const DOM::DOMString SVGPolygonElementImpl::s_tagName = "polygon";
+const ClassInfo SVGPolygonElementImpl::s_classInfo = {"KSVG::SVGPolygonElementImpl",0,0,0};
+const DOM::DOMString SVGPolylineElementImpl::s_tagName = "polyline";
+const ClassInfo SVGPolylineElementImpl::s_classInfo = {"KSVG::SVGPolylineElementImpl",0,0,0};
+const ClassInfo SVGPreserveAspectRatioImpl::s_classInfo = {"KSVG::SVGPreserveAspectRatioImpl",0,&SVGPreserveAspectRatioImpl::s_hashTable,0};
+const ClassInfo SVGPreserveAspectRatioImplConstructor::s_classInfo = {"KSVG::SVGPreserveAspectRatioImplConstructor",0,&SVGPreserveAspectRatioImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGRadialGradientElementImpl::s_tagName = "radialGradient";
+const ClassInfo SVGRadialGradientElementImpl::s_classInfo = {"KSVG::SVGRadialGradientElementImpl",0,&SVGRadialGradientElementImpl::s_hashTable,0};
+const DOM::DOMString SVGRectElementImpl::s_tagName = "rect";
+const ClassInfo SVGRectElementImpl::s_classInfo = {"KSVG::SVGRectElementImpl",0,&SVGRectElementImpl::s_hashTable,0};
+const ClassInfo SVGRectImpl::s_classInfo = {"KSVG::SVGRectImpl",0,&SVGRectImpl::s_hashTable,0};
+const DOM::DOMString SVGSVGElementImpl::s_tagName = "svg";
+const ClassInfo SVGSVGElementImpl::s_classInfo = {"KSVG::SVGSVGElementImpl",0,&SVGSVGElementImpl::s_hashTable,0};
+const DOM::DOMString SVGScriptElementImpl::s_tagName = "script";
+const ClassInfo SVGScriptElementImpl::s_classInfo = {"KSVG::SVGScriptElementImpl",0,&SVGScriptElementImpl::s_hashTable,0};
+const DOM::DOMString SVGSetElementImpl::s_tagName = "set";
+const ClassInfo SVGSetElementImpl::s_classInfo = {"KSVG::SVGSetElementImpl",0,0,0};
+const ClassInfo SVGShapeImpl::s_classInfo = {"KSVG::SVGShapeImpl",0,0,0};
+const DOM::DOMString SVGStopElementImpl::s_tagName = "stop";
+const ClassInfo SVGStopElementImpl::s_classInfo = {"KSVG::SVGStopElementImpl",0,&SVGStopElementImpl::s_hashTable,0};
+const ClassInfo SVGStringListImpl::s_classInfo = {"KSVG::SVGStringListImpl",0,&SVGStringListImpl::s_hashTable,0};
+const ClassInfo SVGStylableImpl::s_classInfo = {"KSVG::SVGStylableImpl",0,&SVGStylableImpl::s_hashTable,0};
+const DOM::DOMString SVGStyleElementImpl::s_tagName = "style";
+const ClassInfo SVGStyleElementImpl::s_classInfo = {"KSVG::SVGStyleElementImpl",0,&SVGStyleElementImpl::s_hashTable,0};
+const DOM::DOMString SVGSwitchElementImpl::s_tagName = "switch";
+const ClassInfo SVGSwitchElementImpl::s_classInfo = {"KSVG::SVGSwitchElementImpl",0,0,0};
+const DOM::DOMString SVGSymbolElementImpl::s_tagName = "symbol";
+const ClassInfo SVGSymbolElementImpl::s_classInfo = {"KSVG::SVGSymbolElementImpl",0,&SVGSymbolElementImpl::s_hashTable,0};
+const DOM::DOMString SVGTRefElementImpl::s_tagName = "tref";
+const ClassInfo SVGTRefElementImpl::s_classInfo = {"KSVG::SVGTRefElementImpl",0,0,0};
+const DOM::DOMString SVGTSpanElementImpl::s_tagName = "tspan";
+const ClassInfo SVGTSpanElementImpl::s_classInfo = {"KSVG::SVGTSpanElementImpl",0,0,0};
+const ClassInfo SVGTestsImpl::s_classInfo = {"KSVG::SVGTestsImpl",0,&SVGTestsImpl::s_hashTable,0};
+const ClassInfo SVGTextContentElementImpl::s_classInfo = {"KSVG::SVGTextContentElementImpl",0,&SVGTextContentElementImpl::s_hashTable,0};
+const ClassInfo SVGTextContentElementImplConstructor::s_classInfo = {"KSVG::SVGTextContentElementImplConstructor",0,&SVGTextContentElementImplConstructor::s_hashTable,0};
+const DOM::DOMString SVGTextElementImpl::s_tagName = "text";
+const ClassInfo SVGTextElementImpl::s_classInfo = {"KSVG::SVGTextElementImpl",0,0,0};
+const DOM::DOMString SVGTextPathElementImpl::s_tagName = "textPath";
+const ClassInfo SVGTextPathElementImpl::s_classInfo = {"KSVG::SVGTextPathElementImpl",0,&SVGTextPathElementImpl::s_hashTable,0};
+const ClassInfo SVGTextPathElementImplConstructor::s_classInfo = {"KSVG::SVGTextPathElementImplConstructor",0,&SVGTextPathElementImplConstructor::s_hashTable,0};
+const ClassInfo SVGTextPositioningElementImpl::s_classInfo = {"KSVG::SVGTextPositioningElementImpl",0,&SVGTextPositioningElementImpl::s_hashTable,0};
+const DOM::DOMString SVGTitleElementImpl::s_tagName = "title";
+const ClassInfo SVGTitleElementImpl::s_classInfo = {"KSVG::SVGTitleElementImpl",0,0,0};
+const ClassInfo SVGTransformImpl::s_classInfo = {"KSVG::SVGTransformImpl",0,&SVGTransformImpl::s_hashTable,0};
+const ClassInfo SVGTransformImplConstructor::s_classInfo = {"KSVG::SVGTransformImplConstructor",0,&SVGTransformImplConstructor::s_hashTable,0};
+const ClassInfo SVGTransformListImpl::s_classInfo = {"KSVG::SVGTransformListImpl",0,&SVGTransformListImpl::s_hashTable,0};
+const ClassInfo SVGTransformableImpl::s_classInfo = {"KSVG::SVGTransformableImpl",0,&SVGTransformableImpl::s_hashTable,0};
+const ClassInfo SVGUIEventImpl::s_classInfo = {"KSVG::SVGUIEventImpl",0,&SVGUIEventImpl::s_hashTable,0};
+const ClassInfo SVGURIReferenceImpl::s_classInfo = {"KSVG::SVGURIReferenceImpl",0,&SVGURIReferenceImpl::s_hashTable,0};
+const DOM::DOMString SVGUseElementImpl::s_tagName = "use";
+const ClassInfo SVGUseElementImpl::s_classInfo = {"KSVG::SVGUseElementImpl",0,&SVGUseElementImpl::s_hashTable,0};
+const ClassInfo SVGVKernElementImpl::s_classInfo = {"KSVG::SVGVKernElementImpl",0,0,0};
+const DOM::DOMString SVGViewElementImpl::s_tagName = "view";
+const ClassInfo SVGViewElementImpl::s_classInfo = {"KSVG::SVGViewElementImpl",0,&SVGViewElementImpl::s_hashTable,0};
+const ClassInfo SVGViewSpecImpl::s_classInfo = {"KSVG::SVGViewSpecImpl",0,0,0};
+const ClassInfo SVGZoomAndPanImpl::s_classInfo = {"KSVG::SVGZoomAndPanImpl",0,&SVGZoomAndPanImpl::s_hashTable,0};
+const ClassInfo SVGZoomAndPanImplConstructor::s_classInfo = {"KSVG::SVGZoomAndPanImplConstructor",0,&SVGZoomAndPanImplConstructor::s_hashTable,0};
+const ClassInfo SVGZoomEventImpl::s_classInfo = {"KSVG::SVGZoomEventImpl",0,&SVGZoomEventImpl::s_hashTable,0};
+const ClassInfo SharedString::s_classInfo = {"KSVG::SharedString",0,&SharedString::s_hashTable,0};
+
+bool SVGAElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAElementImpl>(p1,const_cast<SVGAElementImpl *>(this));
+}
+
+Value SVGAElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAElementImpl,KSVGRWBridge<SVGAElementImpl> >(p1,const_cast<SVGAElementImpl *>(this)));
+}
+
+bool SVGAltGlyphDefElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAltGlyphDefElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAltGlyphDefElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAltGlyphDefElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAltGlyphDefElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAltGlyphDefElementImpl>(p1,const_cast<SVGAltGlyphDefElementImpl *>(this));
+}
+
+Value SVGAltGlyphDefElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAltGlyphDefElementImpl,KSVGRWBridge<SVGAltGlyphDefElementImpl> >(p1,const_cast<SVGAltGlyphDefElementImpl *>(this)));
+}
+
+bool SVGAltGlyphElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAltGlyphElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) return SVGTSpanElementImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAltGlyphElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) {
+ SVGTSpanElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAltGlyphElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAltGlyphElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAltGlyphElementImpl>(p1,const_cast<SVGAltGlyphElementImpl *>(this));
+}
+
+Value SVGAltGlyphElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAltGlyphElementImpl,KSVGRWBridge<SVGAltGlyphElementImpl> >(p1,const_cast<SVGAltGlyphElementImpl *>(this)));
+}
+
+bool SVGAngleImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAngleImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGAngleImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAngleImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGAngleImplProtoFunc,SVGAngleImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGAngleImpl *SVGAngleImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGAngleImpl> *test = dynamic_cast<const KSVGBridge<SVGAngleImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGAngleImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGAngleImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAngleImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAngleImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAngleImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAngleImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGAngleImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAngleImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAngleImpl,KSVGRWBridge<SVGAngleImpl> >(p1,const_cast<SVGAngleImpl *>(this)));
+}
+
+bool SVGAngleImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAngleImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAngleImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAngleImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAngleImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAngleImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAngleImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAngleImplConstructor,KSVGBridge<SVGAngleImplConstructor> >(p1,const_cast<SVGAngleImplConstructor *>(this)));
+}
+
+bool SVGAnimateColorElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAnimateColorElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return SVGAnimationElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAnimateColorElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) {
+ SVGAnimationElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAnimateColorElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAnimateColorElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAnimateColorElementImpl>(p1,const_cast<SVGAnimateColorElementImpl *>(this));
+}
+
+Value SVGAnimateColorElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimateColorElementImpl,KSVGRWBridge<SVGAnimateColorElementImpl> >(p1,const_cast<SVGAnimateColorElementImpl *>(this)));
+}
+
+bool SVGAnimateElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAnimateElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return SVGAnimationElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAnimateElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) {
+ SVGAnimationElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAnimateElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAnimateElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAnimateElementImpl>(p1,const_cast<SVGAnimateElementImpl *>(this));
+}
+
+Value SVGAnimateElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimateElementImpl,KSVGRWBridge<SVGAnimateElementImpl> >(p1,const_cast<SVGAnimateElementImpl *>(this)));
+}
+
+bool SVGAnimateMotionElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAnimateMotionElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return SVGAnimationElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAnimateMotionElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) {
+ SVGAnimationElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAnimateMotionElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAnimateMotionElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAnimateMotionElementImpl>(p1,const_cast<SVGAnimateMotionElementImpl *>(this));
+}
+
+Value SVGAnimateMotionElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimateMotionElementImpl,KSVGRWBridge<SVGAnimateMotionElementImpl> >(p1,const_cast<SVGAnimateMotionElementImpl *>(this)));
+}
+
+bool SVGAnimateTransformElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAnimateTransformElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return SVGAnimationElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAnimateTransformElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) {
+ SVGAnimationElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAnimateTransformElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGAnimateTransformElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGAnimateTransformElementImpl>(p1,const_cast<SVGAnimateTransformElementImpl *>(this));
+}
+
+Value SVGAnimateTransformElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimateTransformElementImpl,KSVGRWBridge<SVGAnimateTransformElementImpl> >(p1,const_cast<SVGAnimateTransformElementImpl *>(this)));
+}
+
+bool SVGAnimatedAngleImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedAngleImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedAngleImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedAngleImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedAngleImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedAngleImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedAngleImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedAngleImpl,KSVGBridge<SVGAnimatedAngleImpl> >(p1,const_cast<SVGAnimatedAngleImpl *>(this)));
+}
+
+bool SVGAnimatedBooleanImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedBooleanImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedBooleanImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedBooleanImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedBooleanImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedBooleanImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedBooleanImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedBooleanImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedBooleanImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedBooleanImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedBooleanImpl,KSVGRWBridge<SVGAnimatedBooleanImpl> >(p1,const_cast<SVGAnimatedBooleanImpl *>(this)));
+}
+
+bool SVGAnimatedEnumerationImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedEnumerationImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedEnumerationImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedEnumerationImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedEnumerationImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedEnumerationImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedEnumerationImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedEnumerationImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedEnumerationImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedEnumerationImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedEnumerationImpl,KSVGRWBridge<SVGAnimatedEnumerationImpl> >(p1,const_cast<SVGAnimatedEnumerationImpl *>(this)));
+}
+
+bool SVGAnimatedIntegerImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedIntegerImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedIntegerImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedIntegerImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedIntegerImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedIntegerImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedIntegerImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedIntegerImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedIntegerImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedIntegerImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedIntegerImpl,KSVGRWBridge<SVGAnimatedIntegerImpl> >(p1,const_cast<SVGAnimatedIntegerImpl *>(this)));
+}
+
+bool SVGAnimatedLengthImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedLengthImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedLengthImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedLengthImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedLengthImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedLengthImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedLengthImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedLengthImpl,KSVGBridge<SVGAnimatedLengthImpl> >(p1,const_cast<SVGAnimatedLengthImpl *>(this)));
+}
+
+bool SVGAnimatedLengthListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedLengthListImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedLengthListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedLengthListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedLengthListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedLengthListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedLengthListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedLengthListImpl,KSVGBridge<SVGAnimatedLengthListImpl> >(p1,const_cast<SVGAnimatedLengthListImpl *>(this)));
+}
+
+bool SVGAnimatedNumberImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedNumberImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedNumberImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedNumberImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedNumberImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedNumberImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedNumberImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedNumberImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedNumberImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedNumberImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedNumberImpl,KSVGRWBridge<SVGAnimatedNumberImpl> >(p1,const_cast<SVGAnimatedNumberImpl *>(this)));
+}
+
+bool SVGAnimatedNumberListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedNumberListImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedNumberListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedNumberListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedNumberListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedNumberListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedNumberListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedNumberListImpl,KSVGBridge<SVGAnimatedNumberListImpl> >(p1,const_cast<SVGAnimatedNumberListImpl *>(this)));
+}
+
+bool SVGAnimatedPathDataImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedPathDataImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedPathDataImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedPathDataImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedPathDataImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedPathDataImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedPathDataImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedPathDataImpl,KSVGBridge<SVGAnimatedPathDataImpl> >(p1,const_cast<SVGAnimatedPathDataImpl *>(this)));
+}
+
+bool SVGAnimatedPointsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedPointsImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedPointsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedPointsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedPointsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedPointsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedPointsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedPointsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedPointsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedPointsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedPointsImpl,KSVGRWBridge<SVGAnimatedPointsImpl> >(p1,const_cast<SVGAnimatedPointsImpl *>(this)));
+}
+
+bool SVGAnimatedPreserveAspectRatioImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedPreserveAspectRatioImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedPreserveAspectRatioImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedPreserveAspectRatioImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedPreserveAspectRatioImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedPreserveAspectRatioImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedPreserveAspectRatioImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedPreserveAspectRatioImpl,KSVGBridge<SVGAnimatedPreserveAspectRatioImpl> >(p1,const_cast<SVGAnimatedPreserveAspectRatioImpl *>(this)));
+}
+
+bool SVGAnimatedRectImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedRectImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedRectImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedRectImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedRectImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedRectImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedRectImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedRectImpl,KSVGBridge<SVGAnimatedRectImpl> >(p1,const_cast<SVGAnimatedRectImpl *>(this)));
+}
+
+bool SVGAnimatedStringImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedStringImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedStringImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedStringImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedStringImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGAnimatedStringImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimatedStringImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimatedStringImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGAnimatedStringImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedStringImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedStringImpl,KSVGRWBridge<SVGAnimatedStringImpl> >(p1,const_cast<SVGAnimatedStringImpl *>(this)));
+}
+
+bool SVGAnimatedTransformListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimatedTransformListImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGAnimatedTransformListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGAnimatedTransformListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGAnimatedTransformListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGAnimatedTransformListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimatedTransformListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimatedTransformListImpl,KSVGBridge<SVGAnimatedTransformListImpl> >(p1,const_cast<SVGAnimatedTransformListImpl *>(this)));
+}
+
+bool SVGAnimationElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGAnimationElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGAnimationElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGAnimationElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGAnimationElementImplProtoFunc,SVGAnimationElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGAnimationElementImpl *SVGAnimationElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGAnimationElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimationElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateColorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateColorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateMotionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateMotionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateTransformElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateTransformElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGAnimationElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGAnimationElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGAnimationElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGAnimationElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGAnimationElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGAnimationElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGAnimationElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGAnimationElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGAnimationElementImpl,KSVGRWBridge<SVGAnimationElementImpl> >(p1,const_cast<SVGAnimationElementImpl *>(this)));
+}
+
+bool SVGCircleElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGCircleElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGCircleElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGCircleElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGCircleElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGCircleElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGCircleElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGCircleElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGCircleElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGCircleElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGCircleElementImpl>(p1,const_cast<SVGCircleElementImpl *>(this));
+}
+
+Value SVGCircleElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGCircleElementImpl,KSVGRWBridge<SVGCircleElementImpl> >(p1,const_cast<SVGCircleElementImpl *>(this)));
+}
+
+bool SVGClipPathElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGClipPathElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGClipPathElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGClipPathElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGClipPathElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGClipPathElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGClipPathElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGClipPathElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGClipPathElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGClipPathElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGClipPathElementImpl>(p1,const_cast<SVGClipPathElementImpl *>(this));
+}
+
+Value SVGClipPathElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGClipPathElementImpl,KSVGRWBridge<SVGClipPathElementImpl> >(p1,const_cast<SVGClipPathElementImpl *>(this)));
+}
+
+bool SVGColorImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGColorImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGColorImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGColorImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGColorImplProtoFunc,SVGColorImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGColorImpl *SVGColorImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGColorImpl> *test = dynamic_cast<const KSVGBridge<SVGColorImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPaintImpl> *test = dynamic_cast<const KSVGBridge<SVGPaintImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGColorImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGColorImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGColorImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGColorImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGColorImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGColorImpl,KSVGBridge<SVGColorImpl> >(p1,const_cast<SVGColorImpl *>(this)));
+}
+
+bool SVGColorImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGColorImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGColorImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGColorImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGColorImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGColorImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGColorImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGColorImplConstructor,KSVGBridge<SVGColorImplConstructor> >(p1,const_cast<SVGColorImplConstructor *>(this)));
+}
+
+bool SVGColorProfileElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGColorProfileElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGColorProfileElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGColorProfileElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGColorProfileElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGColorProfileElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGColorProfileElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGColorProfileElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGColorProfileElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGColorProfileElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGColorProfileElementImpl>(p1,const_cast<SVGColorProfileElementImpl *>(this));
+}
+
+Value SVGColorProfileElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGColorProfileElementImpl,KSVGRWBridge<SVGColorProfileElementImpl> >(p1,const_cast<SVGColorProfileElementImpl *>(this)));
+}
+
+bool SVGComponentTransferFunctionElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGComponentTransferFunctionElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGComponentTransferFunctionElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGComponentTransferFunctionElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGComponentTransferFunctionElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGComponentTransferFunctionElementImpl,KSVGRWBridge<SVGComponentTransferFunctionElementImpl> >(p1,const_cast<SVGComponentTransferFunctionElementImpl *>(this)));
+}
+
+bool SVGContainerImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGContainerImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGContainerImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGContainerImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGContainerImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGContainerImpl,KSVGRWBridge<SVGContainerImpl> >(p1,const_cast<SVGContainerImpl *>(this)));
+}
+
+bool SVGCursorElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGCursorElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGCursorElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGCursorElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGCursorElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGCursorElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGCursorElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGCursorElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGCursorElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGCursorElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGCursorElementImpl,KSVGRWBridge<SVGCursorElementImpl> >(p1,const_cast<SVGCursorElementImpl *>(this)));
+}
+
+bool SVGDOMCharacterDataBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMCharacterDataBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMCharacterDataBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMCharacterDataBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMCharacterDataBridgeProtoFunc,SVGDOMCharacterDataBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMCharacterDataBridge *SVGDOMCharacterDataBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDOMCharacterDataBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMCharacterDataBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDOMTextBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMTextBridge> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMCharacterDataBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMCharacterDataBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return SVGDOMNodeBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDOMCharacterDataBridge::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGDOMCharacterDataBridge>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGDOMCharacterDataBridge::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) {
+ SVGDOMNodeBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDOMCharacterDataBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMCharacterDataBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMCharacterDataBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMCharacterDataBridge,KSVGRWBridge<SVGDOMCharacterDataBridge> >(p1,const_cast<SVGDOMCharacterDataBridge *>(this)));
+}
+
+bool SVGDOMDOMImplementationBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMDOMImplementationBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMDOMImplementationBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMDOMImplementationBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMDOMImplementationBridgeProtoFunc,SVGDOMDOMImplementationBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMDOMImplementationBridge *SVGDOMDOMImplementationBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDOMDOMImplementationBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMDOMImplementationBridge> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMDOMImplementationBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMDOMImplementationBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGDOMDOMImplementationBridge::put(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGDOMDOMImplementationBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMDOMImplementationBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMDOMImplementationBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMDOMImplementationBridge,KSVGRWBridge<SVGDOMDOMImplementationBridge> >(p1,const_cast<SVGDOMDOMImplementationBridge *>(this)));
+}
+
+bool SVGDOMDocumentFragmentBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMDocumentFragmentBridge::s_hashTable,p2);
+ if(e) return true;
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMDocumentFragmentBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGDOMDocumentFragmentBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGDOMDocumentFragmentBridge::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return SVGDOMNodeBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDOMDocumentFragmentBridge::put(PUT_METHOD_ARGS)
+{
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) {
+ SVGDOMNodeBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDOMDocumentFragmentBridge::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMDocumentFragmentBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMDocumentFragmentBridge,KSVGRWBridge<SVGDOMDocumentFragmentBridge> >(p1,const_cast<SVGDOMDocumentFragmentBridge *>(this)));
+}
+
+bool SVGDOMElementBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMElementBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMElementBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMElementBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMElementBridgeProtoFunc,SVGDOMElementBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMElementBridge *SVGDOMElementBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDOMElementBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMElementBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphDefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphDefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateColorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateColorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateMotionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateMotionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateTransformElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateTransformElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimationElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimationElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGColorProfileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGColorProfileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGComponentTransferFunctionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGComponentTransferFunctionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGContainerImpl> *test = dynamic_cast<const KSVGBridge<SVGContainerImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCursorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCursorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefinitionSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefinitionSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDescElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDescElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEBlendElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEBlendElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEColorMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEColorMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEComponentTransferElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEComponentTransferElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFECompositeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFECompositeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEConvolveMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEConvolveMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDiffuseLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDiffuseLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDisplacementMapElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDisplacementMapElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDistantLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDistantLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFloodElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFloodElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncBElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncBElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncRElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncRElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEGaussianBlurElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEGaussianBlurElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeNodeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeNodeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMorphologyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMorphologyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEOffsetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEOffsetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEPointLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEPointLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpecularLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpecularLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpotLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpotLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETurbulenceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETurbulenceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFilterElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFilterElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceFormatElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceFormatElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceNameElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceNameElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceUriElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceUriElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGHKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGHKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLinearGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLinearGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMarkerElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMarkerElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMaskElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMaskElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMetadataElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMetadataElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMissingGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMissingGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPatternElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPatternElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRadialGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRadialGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGScriptElementImpl> *test = dynamic_cast<const KSVGBridge<SVGScriptElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGShapeImpl> *test = dynamic_cast<const KSVGBridge<SVGShapeImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStopElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStopElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStyleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStyleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSymbolElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSymbolElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTitleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTitleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGVKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGVKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGViewElementImpl> *test = dynamic_cast<const KSVGBridge<SVGViewElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMElementBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMElementBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return SVGDOMNodeBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDOMElementBridge::put(PUT_METHOD_ARGS)
+{
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) {
+ SVGDOMNodeBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDOMElementBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMElementBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMElementBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMElementBridge,KSVGRWBridge<SVGDOMElementBridge> >(p1,const_cast<SVGDOMElementBridge *>(this)));
+}
+
+bool SVGDOMNodeBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMNodeBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMNodeBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMNodeBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMNodeBridgeProtoFunc,SVGDOMNodeBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMNodeBridge *SVGDOMNodeBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ return KSVG::toNodeBridge(p1);
+}
+
+SVGDOMNodeBridge *KSVG::toNodeBridge(const ObjectImp *p1)
+{
+ { const KSVGBridge<SVGDOMNodeBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMNodeBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphDefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphDefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateColorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateColorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateMotionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateMotionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateTransformElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateTransformElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimationElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimationElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGColorProfileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGColorProfileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGComponentTransferFunctionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGComponentTransferFunctionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGContainerImpl> *test = dynamic_cast<const KSVGBridge<SVGContainerImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCursorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCursorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDOMCharacterDataBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMCharacterDataBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDOMDocumentFragmentBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMDocumentFragmentBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDOMElementBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMElementBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDOMTextBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMTextBridge> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefinitionSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefinitionSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDescElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDescElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDocumentImpl> *test = dynamic_cast<const KSVGBridge<SVGDocumentImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEBlendElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEBlendElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEColorMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEColorMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEComponentTransferElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEComponentTransferElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFECompositeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFECompositeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEConvolveMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEConvolveMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDiffuseLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDiffuseLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDisplacementMapElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDisplacementMapElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDistantLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDistantLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFloodElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFloodElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncBElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncBElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncRElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncRElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEGaussianBlurElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEGaussianBlurElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeNodeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeNodeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMorphologyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMorphologyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEOffsetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEOffsetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEPointLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEPointLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpecularLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpecularLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpotLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpotLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETurbulenceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETurbulenceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFilterElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFilterElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceFormatElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceFormatElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceNameElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceNameElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceUriElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceUriElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGHKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGHKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLinearGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLinearGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMarkerElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMarkerElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMaskElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMaskElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMetadataElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMetadataElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMissingGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMissingGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPatternElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPatternElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRadialGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRadialGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGScriptElementImpl> *test = dynamic_cast<const KSVGBridge<SVGScriptElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGShapeImpl> *test = dynamic_cast<const KSVGBridge<SVGShapeImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStopElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStopElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStyleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStyleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSymbolElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSymbolElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTitleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTitleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGVKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGVKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGViewElementImpl> *test = dynamic_cast<const KSVGBridge<SVGViewElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMNodeBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMNodeBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGDOMNodeBridge::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGDOMNodeBridge>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGDOMNodeBridge::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGDOMNodeBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMNodeBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMNodeBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMNodeBridge,KSVGRWBridge<SVGDOMNodeBridge> >(p1,const_cast<SVGDOMNodeBridge *>(this)));
+}
+
+bool SVGDOMNodeListBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMNodeListBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMNodeListBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMNodeListBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMNodeListBridgeProtoFunc,SVGDOMNodeListBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMNodeListBridge *SVGDOMNodeListBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDOMNodeListBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMNodeListBridge> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMNodeListBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMNodeListBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGDOMNodeListBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMNodeListBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMNodeListBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMNodeListBridge,KSVGBridge<SVGDOMNodeListBridge> >(p1,const_cast<SVGDOMNodeListBridge *>(this)));
+}
+
+bool SVGDOMTextBridge::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDOMTextBridge::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDOMTextBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGDOMCharacterDataBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDOMTextBridge::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDOMTextBridgeProtoFunc,SVGDOMTextBridge>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDOMTextBridge *SVGDOMTextBridgeProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDOMTextBridge> *test = dynamic_cast<const KSVGBridge<SVGDOMTextBridge> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDOMTextBridge::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDOMTextBridgeProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGDOMCharacterDataBridge::hasProperty(p1,p2)) return SVGDOMCharacterDataBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDOMTextBridge::put(PUT_METHOD_ARGS)
+{
+ if(SVGDOMCharacterDataBridge::hasProperty(p1,p2)) {
+ SVGDOMCharacterDataBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDOMTextBridge::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDOMTextBridgeProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDOMTextBridge::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDOMTextBridge,KSVGRWBridge<SVGDOMTextBridge> >(p1,const_cast<SVGDOMTextBridge *>(this)));
+}
+
+bool SVGDefinitionSrcElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDefinitionSrcElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDefinitionSrcElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDefinitionSrcElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDefinitionSrcElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDefinitionSrcElementImpl,KSVGRWBridge<SVGDefinitionSrcElementImpl> >(p1,const_cast<SVGDefinitionSrcElementImpl *>(this)));
+}
+
+bool SVGDefsElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDefsElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDefsElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDefsElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGDefsElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGDefsElementImpl>(p1,const_cast<SVGDefsElementImpl *>(this));
+}
+
+Value SVGDefsElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDefsElementImpl,KSVGRWBridge<SVGDefsElementImpl> >(p1,const_cast<SVGDefsElementImpl *>(this)));
+}
+
+bool SVGDescElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDescElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDescElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDescElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGDescElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGDescElementImpl>(p1,const_cast<SVGDescElementImpl *>(this));
+}
+
+Value SVGDescElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDescElementImpl,KSVGRWBridge<SVGDescElementImpl> >(p1,const_cast<SVGDescElementImpl *>(this)));
+}
+
+bool SVGDocumentImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGDocumentImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGDocumentImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGDocumentImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGDocumentImplProtoFunc,SVGDocumentImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGDocumentImpl *SVGDocumentImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGDocumentImpl> *test = dynamic_cast<const KSVGBridge<SVGDocumentImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGDocumentImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGDocumentImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) return SVGDOMNodeBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGDocumentImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGDocumentImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGDocumentImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGDOMNodeBridge::hasProperty(p1,p2)) {
+ SVGDOMNodeBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGDocumentImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGDocumentImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGDocumentImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGDocumentImpl,KSVGRWBridge<SVGDocumentImpl> >(p1,const_cast<SVGDocumentImpl *>(this)));
+}
+
+bool SVGElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGDOMElementBridge::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGElementImplProtoFunc,SVGElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGElementImpl *SVGElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphDefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphDefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateColorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateColorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateMotionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateMotionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateTransformElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateTransformElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimationElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimationElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGColorProfileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGColorProfileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGComponentTransferFunctionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGComponentTransferFunctionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGContainerImpl> *test = dynamic_cast<const KSVGBridge<SVGContainerImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCursorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCursorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefinitionSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefinitionSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDescElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDescElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEBlendElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEBlendElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEColorMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEColorMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEComponentTransferElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEComponentTransferElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFECompositeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFECompositeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEConvolveMatrixElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEConvolveMatrixElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDiffuseLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDiffuseLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDisplacementMapElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDisplacementMapElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEDistantLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEDistantLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFloodElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFloodElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncBElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncBElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFuncRElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFuncRElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEGaussianBlurElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEGaussianBlurElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMergeNodeElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMergeNodeElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEMorphologyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEMorphologyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEOffsetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEOffsetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEPointLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEPointLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpecularLightingElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpecularLightingElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFESpotLightElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFESpotLightElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETileElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETileElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFETurbulenceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFETurbulenceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFilterElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFilterElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceFormatElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceFormatElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceNameElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceNameElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceSrcElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceSrcElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontFaceUriElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontFaceUriElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGHKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGHKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLinearGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLinearGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMarkerElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMarkerElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMaskElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMaskElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMetadataElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMetadataElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMissingGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMissingGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPatternElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPatternElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRadialGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRadialGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGScriptElementImpl> *test = dynamic_cast<const KSVGBridge<SVGScriptElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGShapeImpl> *test = dynamic_cast<const KSVGBridge<SVGShapeImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStopElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStopElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStyleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStyleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSymbolElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSymbolElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTitleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTitleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGVKernElementImpl> *test = dynamic_cast<const KSVGBridge<SVGVKernElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGViewElementImpl> *test = dynamic_cast<const KSVGBridge<SVGViewElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGDOMElementBridge::hasProperty(p1,p2)) return SVGDOMElementBridge::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGDOMElementBridge::hasProperty(p1,p2)) {
+ SVGDOMElementBridge::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGElementImpl>(p1,const_cast<SVGElementImpl *>(this));
+}
+
+Value SVGElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGElementImpl,KSVGRWBridge<SVGElementImpl> >(p1,const_cast<SVGElementImpl *>(this)));
+}
+
+bool SVGEllipseElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGEllipseElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGEllipseElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGEllipseElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGEllipseElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGEllipseElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGEllipseElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGEllipseElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGEllipseElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGEllipseElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGEllipseElementImpl>(p1,const_cast<SVGEllipseElementImpl *>(this));
+}
+
+Value SVGEllipseElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGEllipseElementImpl,KSVGRWBridge<SVGEllipseElementImpl> >(p1,const_cast<SVGEllipseElementImpl *>(this)));
+}
+
+bool SVGEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGEventImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGEventImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGEventImplProtoFunc,SVGEventImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGEventImpl *SVGEventImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGEventImpl> *test = dynamic_cast<const KSVGBridge<SVGEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGKeyEventImpl> *test = dynamic_cast<const KSVGBridge<SVGKeyEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMouseEventImpl> *test = dynamic_cast<const KSVGBridge<SVGMouseEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMutationEventImpl> *test = dynamic_cast<const KSVGBridge<SVGMutationEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUIEventImpl> *test = dynamic_cast<const KSVGBridge<SVGUIEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGZoomEventImpl> *test = dynamic_cast<const KSVGBridge<SVGZoomEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGEventImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGEventImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGEventImpl,KSVGBridge<SVGEventImpl> >(p1,const_cast<SVGEventImpl *>(this)));
+}
+
+bool SVGExternalResourcesRequiredImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGExternalResourcesRequiredImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGExternalResourcesRequiredImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGExternalResourcesRequiredImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGExternalResourcesRequiredImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGExternalResourcesRequiredImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGExternalResourcesRequiredImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGExternalResourcesRequiredImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGExternalResourcesRequiredImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGExternalResourcesRequiredImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGExternalResourcesRequiredImpl,KSVGRWBridge<SVGExternalResourcesRequiredImpl> >(p1,const_cast<SVGExternalResourcesRequiredImpl *>(this)));
+}
+
+bool SVGFEBlendElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEBlendElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEBlendElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEBlendElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEBlendElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEBlendElementImpl,KSVGRWBridge<SVGFEBlendElementImpl> >(p1,const_cast<SVGFEBlendElementImpl *>(this)));
+}
+
+bool SVGFEColorMatrixElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEColorMatrixElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEColorMatrixElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEColorMatrixElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEColorMatrixElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEColorMatrixElementImpl,KSVGRWBridge<SVGFEColorMatrixElementImpl> >(p1,const_cast<SVGFEColorMatrixElementImpl *>(this)));
+}
+
+bool SVGFEComponentTransferElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEComponentTransferElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEComponentTransferElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEComponentTransferElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEComponentTransferElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEComponentTransferElementImpl,KSVGRWBridge<SVGFEComponentTransferElementImpl> >(p1,const_cast<SVGFEComponentTransferElementImpl *>(this)));
+}
+
+bool SVGFECompositeElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFECompositeElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFECompositeElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFECompositeElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFECompositeElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFECompositeElementImpl,KSVGRWBridge<SVGFECompositeElementImpl> >(p1,const_cast<SVGFECompositeElementImpl *>(this)));
+}
+
+bool SVGFEConvolveMatrixElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEConvolveMatrixElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEConvolveMatrixElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEConvolveMatrixElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEConvolveMatrixElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEConvolveMatrixElementImpl,KSVGRWBridge<SVGFEConvolveMatrixElementImpl> >(p1,const_cast<SVGFEConvolveMatrixElementImpl *>(this)));
+}
+
+bool SVGFEDiffuseLightingElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEDiffuseLightingElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEDiffuseLightingElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEDiffuseLightingElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEDiffuseLightingElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEDiffuseLightingElementImpl,KSVGRWBridge<SVGFEDiffuseLightingElementImpl> >(p1,const_cast<SVGFEDiffuseLightingElementImpl *>(this)));
+}
+
+bool SVGFEDisplacementMapElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEDisplacementMapElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEDisplacementMapElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEDisplacementMapElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEDisplacementMapElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEDisplacementMapElementImpl,KSVGRWBridge<SVGFEDisplacementMapElementImpl> >(p1,const_cast<SVGFEDisplacementMapElementImpl *>(this)));
+}
+
+bool SVGFEDistantLightElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEDistantLightElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEDistantLightElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEDistantLightElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEDistantLightElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEDistantLightElementImpl,KSVGRWBridge<SVGFEDistantLightElementImpl> >(p1,const_cast<SVGFEDistantLightElementImpl *>(this)));
+}
+
+bool SVGFEFloodElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEFloodElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEFloodElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEFloodElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEFloodElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEFloodElementImpl,KSVGRWBridge<SVGFEFloodElementImpl> >(p1,const_cast<SVGFEFloodElementImpl *>(this)));
+}
+
+bool SVGFEFuncAElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEFuncAElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return SVGComponentTransferFunctionElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEFuncAElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) {
+ SVGComponentTransferFunctionElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEFuncAElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEFuncAElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEFuncAElementImpl,KSVGRWBridge<SVGFEFuncAElementImpl> >(p1,const_cast<SVGFEFuncAElementImpl *>(this)));
+}
+
+bool SVGFEFuncBElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEFuncBElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return SVGComponentTransferFunctionElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEFuncBElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) {
+ SVGComponentTransferFunctionElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEFuncBElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEFuncBElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEFuncBElementImpl,KSVGRWBridge<SVGFEFuncBElementImpl> >(p1,const_cast<SVGFEFuncBElementImpl *>(this)));
+}
+
+bool SVGFEFuncGElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEFuncGElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return SVGComponentTransferFunctionElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEFuncGElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) {
+ SVGComponentTransferFunctionElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEFuncGElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEFuncGElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEFuncGElementImpl,KSVGRWBridge<SVGFEFuncGElementImpl> >(p1,const_cast<SVGFEFuncGElementImpl *>(this)));
+}
+
+bool SVGFEFuncRElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEFuncRElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) return SVGComponentTransferFunctionElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEFuncRElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGComponentTransferFunctionElementImpl::hasProperty(p1,p2)) {
+ SVGComponentTransferFunctionElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEFuncRElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEFuncRElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEFuncRElementImpl,KSVGRWBridge<SVGFEFuncRElementImpl> >(p1,const_cast<SVGFEFuncRElementImpl *>(this)));
+}
+
+bool SVGFEGaussianBlurElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEGaussianBlurElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEGaussianBlurElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEGaussianBlurElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEGaussianBlurElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEGaussianBlurElementImpl,KSVGRWBridge<SVGFEGaussianBlurElementImpl> >(p1,const_cast<SVGFEGaussianBlurElementImpl *>(this)));
+}
+
+bool SVGFEImageElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEImageElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEImageElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEImageElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEImageElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEImageElementImpl,KSVGRWBridge<SVGFEImageElementImpl> >(p1,const_cast<SVGFEImageElementImpl *>(this)));
+}
+
+bool SVGFEMergeElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEMergeElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEMergeElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEMergeElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEMergeElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEMergeElementImpl,KSVGRWBridge<SVGFEMergeElementImpl> >(p1,const_cast<SVGFEMergeElementImpl *>(this)));
+}
+
+bool SVGFEMergeNodeElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEMergeNodeElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEMergeNodeElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEMergeNodeElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEMergeNodeElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEMergeNodeElementImpl,KSVGRWBridge<SVGFEMergeNodeElementImpl> >(p1,const_cast<SVGFEMergeNodeElementImpl *>(this)));
+}
+
+bool SVGFEMorphologyElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEMorphologyElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEMorphologyElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEMorphologyElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEMorphologyElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEMorphologyElementImpl,KSVGRWBridge<SVGFEMorphologyElementImpl> >(p1,const_cast<SVGFEMorphologyElementImpl *>(this)));
+}
+
+bool SVGFEOffsetElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEOffsetElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEOffsetElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEOffsetElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEOffsetElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEOffsetElementImpl,KSVGRWBridge<SVGFEOffsetElementImpl> >(p1,const_cast<SVGFEOffsetElementImpl *>(this)));
+}
+
+bool SVGFEPointLightElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFEPointLightElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFEPointLightElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFEPointLightElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFEPointLightElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFEPointLightElementImpl,KSVGRWBridge<SVGFEPointLightElementImpl> >(p1,const_cast<SVGFEPointLightElementImpl *>(this)));
+}
+
+bool SVGFESpecularLightingElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFESpecularLightingElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFESpecularLightingElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFESpecularLightingElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFESpecularLightingElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFESpecularLightingElementImpl,KSVGRWBridge<SVGFESpecularLightingElementImpl> >(p1,const_cast<SVGFESpecularLightingElementImpl *>(this)));
+}
+
+bool SVGFESpotLightElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFESpotLightElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFESpotLightElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFESpotLightElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFESpotLightElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFESpotLightElementImpl,KSVGRWBridge<SVGFESpotLightElementImpl> >(p1,const_cast<SVGFESpotLightElementImpl *>(this)));
+}
+
+bool SVGFETileElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFETileElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFETileElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFETileElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFETileElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFETileElementImpl,KSVGRWBridge<SVGFETileElementImpl> >(p1,const_cast<SVGFETileElementImpl *>(this)));
+}
+
+bool SVGFETurbulenceElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFETurbulenceElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFETurbulenceElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFETurbulenceElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFETurbulenceElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFETurbulenceElementImpl,KSVGRWBridge<SVGFETurbulenceElementImpl> >(p1,const_cast<SVGFETurbulenceElementImpl *>(this)));
+}
+
+bool SVGFilterElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFilterElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFilterElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFilterElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFilterElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFilterElementImpl,KSVGRWBridge<SVGFilterElementImpl> >(p1,const_cast<SVGFilterElementImpl *>(this)));
+}
+
+bool SVGFitToViewBoxImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGFitToViewBoxImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGFitToViewBoxImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGFitToViewBoxImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGFitToViewBoxImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGFitToViewBoxImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGFitToViewBoxImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGFitToViewBoxImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGFitToViewBoxImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFitToViewBoxImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFitToViewBoxImpl,KSVGRWBridge<SVGFitToViewBoxImpl> >(p1,const_cast<SVGFitToViewBoxImpl *>(this)));
+}
+
+bool SVGFontElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontElementImpl,KSVGRWBridge<SVGFontElementImpl> >(p1,const_cast<SVGFontElementImpl *>(this)));
+}
+
+bool SVGFontFaceElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontFaceElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontFaceElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontFaceElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontFaceElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontFaceElementImpl,KSVGRWBridge<SVGFontFaceElementImpl> >(p1,const_cast<SVGFontFaceElementImpl *>(this)));
+}
+
+bool SVGFontFaceFormatElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontFaceFormatElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontFaceFormatElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontFaceFormatElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontFaceFormatElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontFaceFormatElementImpl,KSVGRWBridge<SVGFontFaceFormatElementImpl> >(p1,const_cast<SVGFontFaceFormatElementImpl *>(this)));
+}
+
+bool SVGFontFaceNameElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontFaceNameElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontFaceNameElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontFaceNameElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontFaceNameElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontFaceNameElementImpl,KSVGRWBridge<SVGFontFaceNameElementImpl> >(p1,const_cast<SVGFontFaceNameElementImpl *>(this)));
+}
+
+bool SVGFontFaceSrcElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontFaceSrcElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontFaceSrcElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontFaceSrcElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontFaceSrcElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontFaceSrcElementImpl,KSVGRWBridge<SVGFontFaceSrcElementImpl> >(p1,const_cast<SVGFontFaceSrcElementImpl *>(this)));
+}
+
+bool SVGFontFaceUriElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGFontFaceUriElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGFontFaceUriElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGFontFaceUriElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGFontFaceUriElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGFontFaceUriElementImpl,KSVGRWBridge<SVGFontFaceUriElementImpl> >(p1,const_cast<SVGFontFaceUriElementImpl *>(this)));
+}
+
+bool SVGForeignObjectElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGForeignObjectElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGForeignObjectElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGForeignObjectElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGForeignObjectElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGForeignObjectElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGForeignObjectElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGForeignObjectElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGForeignObjectElementImpl,KSVGRWBridge<SVGForeignObjectElementImpl> >(p1,const_cast<SVGForeignObjectElementImpl *>(this)));
+}
+
+bool SVGGElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGGElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGGElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGGElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGGElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGGElementImpl>(p1,const_cast<SVGGElementImpl *>(this));
+}
+
+Value SVGGElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGGElementImpl,KSVGRWBridge<SVGGElementImpl> >(p1,const_cast<SVGGElementImpl *>(this)));
+}
+
+bool SVGGlyphElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGGlyphElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGGlyphElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGGlyphElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGGlyphElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGGlyphElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGGlyphElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGGlyphElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGGlyphElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGGlyphElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGGlyphElementImpl>(p1,const_cast<SVGGlyphElementImpl *>(this));
+}
+
+Value SVGGlyphElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGGlyphElementImpl,KSVGRWBridge<SVGGlyphElementImpl> >(p1,const_cast<SVGGlyphElementImpl *>(this)));
+}
+
+bool SVGGlyphRefElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGGlyphRefElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGGlyphRefElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGGlyphRefElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGGlyphRefElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGGlyphRefElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGGlyphRefElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGGlyphRefElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGGlyphRefElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGGlyphRefElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGGlyphRefElementImpl>(p1,const_cast<SVGGlyphRefElementImpl *>(this));
+}
+
+Value SVGGlyphRefElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGGlyphRefElementImpl,KSVGRWBridge<SVGGlyphRefElementImpl> >(p1,const_cast<SVGGlyphRefElementImpl *>(this)));
+}
+
+bool SVGGradientElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGGradientElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGGradientElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGGradientElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGGradientElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGGradientElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGGradientElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGGradientElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGGradientElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGGradientElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGGradientElementImpl,KSVGRWBridge<SVGGradientElementImpl> >(p1,const_cast<SVGGradientElementImpl *>(this)));
+}
+
+bool SVGGradientElementImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGGradientElementImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGGradientElementImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGGradientElementImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGGradientElementImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGGradientElementImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGGradientElementImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGGradientElementImplConstructor,KSVGBridge<SVGGradientElementImplConstructor> >(p1,const_cast<SVGGradientElementImplConstructor *>(this)));
+}
+
+bool SVGHKernElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGHKernElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGHKernElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGHKernElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGHKernElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGHKernElementImpl,KSVGRWBridge<SVGHKernElementImpl> >(p1,const_cast<SVGHKernElementImpl *>(this)));
+}
+
+bool SVGICCColorImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGICCColorImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGICCColorImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGICCColorImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGICCColorImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGICCColorImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGICCColorImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGICCColorImpl,KSVGBridge<SVGICCColorImpl> >(p1,const_cast<SVGICCColorImpl *>(this)));
+}
+
+bool SVGImageElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGImageElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGImageElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGImageElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGImageElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGImageElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGImageElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGImageElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGImageElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGImageElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGImageElementImpl>(p1,const_cast<SVGImageElementImpl *>(this));
+}
+
+Value SVGImageElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGImageElementImpl,KSVGRWBridge<SVGImageElementImpl> >(p1,const_cast<SVGImageElementImpl *>(this)));
+}
+
+bool SVGKeyEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGKeyEventImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGKeyEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGKeyEventImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGKeyEventImplProtoFunc,SVGKeyEventImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGKeyEventImpl *SVGKeyEventImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGKeyEventImpl> *test = dynamic_cast<const KSVGBridge<SVGKeyEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGKeyEventImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGKeyEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return SVGUIEventImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGKeyEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGKeyEventImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGKeyEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGKeyEventImpl,KSVGBridge<SVGKeyEventImpl> >(p1,const_cast<SVGKeyEventImpl *>(this)));
+}
+
+bool SVGLangSpaceImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLangSpaceImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGLangSpaceImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGLangSpaceImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGLangSpaceImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGLangSpaceImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGLangSpaceImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGLangSpaceImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGLangSpaceImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGLangSpaceImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLangSpaceImpl,KSVGRWBridge<SVGLangSpaceImpl> >(p1,const_cast<SVGLangSpaceImpl *>(this)));
+}
+
+bool SVGLengthImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLengthImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGLengthImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGLengthImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGLengthImplProtoFunc,SVGLengthImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGLengthImpl *SVGLengthImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGLengthImpl> *test = dynamic_cast<const KSVGBridge<SVGLengthImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGLengthImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGLengthImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGLengthImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGLengthImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGLengthImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGLengthImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGLengthImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGLengthImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLengthImpl,KSVGRWBridge<SVGLengthImpl> >(p1,const_cast<SVGLengthImpl *>(this)));
+}
+
+bool SVGLengthImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLengthImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGLengthImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGLengthImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGLengthImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGLengthImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGLengthImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLengthImplConstructor,KSVGBridge<SVGLengthImplConstructor> >(p1,const_cast<SVGLengthImplConstructor *>(this)));
+}
+
+bool SVGLengthListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLengthListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGLengthListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGLengthListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGLengthListImplProtoFunc,SVGLengthListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGLengthListImpl *SVGLengthListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGLengthListImpl> *test = dynamic_cast<const KSVGBridge<SVGLengthListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGLengthListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGLengthListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGLengthListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGLengthListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGLengthListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLengthListImpl,KSVGBridge<SVGLengthListImpl> >(p1,const_cast<SVGLengthListImpl *>(this)));
+}
+
+bool SVGLineElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLineElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGLineElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGLineElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGLineElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGLineElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGLineElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGLineElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGLineElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGLineElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGLineElementImpl>(p1,const_cast<SVGLineElementImpl *>(this));
+}
+
+Value SVGLineElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLineElementImpl,KSVGRWBridge<SVGLineElementImpl> >(p1,const_cast<SVGLineElementImpl *>(this)));
+}
+
+bool SVGLinearGradientElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLinearGradientElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGLinearGradientElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGLinearGradientElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGLinearGradientElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) return SVGGradientElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGLinearGradientElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGLinearGradientElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGLinearGradientElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) {
+ SVGGradientElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGLinearGradientElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGLinearGradientElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGLinearGradientElementImpl>(p1,const_cast<SVGLinearGradientElementImpl *>(this));
+}
+
+Value SVGLinearGradientElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLinearGradientElementImpl,KSVGRWBridge<SVGLinearGradientElementImpl> >(p1,const_cast<SVGLinearGradientElementImpl *>(this)));
+}
+
+bool SVGLocatableImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGLocatableImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGLocatableImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGLocatableImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGLocatableImplProtoFunc,SVGLocatableImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGLocatableImpl *SVGLocatableImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGLocatableImpl> *test = dynamic_cast<const KSVGBridge<SVGLocatableImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTransformableImpl> *test = dynamic_cast<const KSVGBridge<SVGTransformableImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGLocatableImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGLocatableImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGLocatableImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGLocatableImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGLocatableImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGLocatableImpl,KSVGBridge<SVGLocatableImpl> >(p1,const_cast<SVGLocatableImpl *>(this)));
+}
+
+bool SVGMPathElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMPathElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGMPathElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGMPathElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMPathElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMPathElementImpl,KSVGRWBridge<SVGMPathElementImpl> >(p1,const_cast<SVGMPathElementImpl *>(this)));
+}
+
+bool SVGMarkerElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGMarkerElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGMarkerElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMarkerElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGMarkerElementImplProtoFunc,SVGMarkerElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGMarkerElementImpl *SVGMarkerElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGMarkerElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMarkerElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGMarkerElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGMarkerElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGMarkerElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGMarkerElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGMarkerElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGMarkerElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGMarkerElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGMarkerElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGMarkerElementImpl>(p1,const_cast<SVGMarkerElementImpl *>(this));
+}
+
+Value SVGMarkerElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMarkerElementImpl,KSVGRWBridge<SVGMarkerElementImpl> >(p1,const_cast<SVGMarkerElementImpl *>(this)));
+}
+
+bool SVGMarkerElementImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGMarkerElementImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGMarkerElementImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGMarkerElementImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGMarkerElementImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGMarkerElementImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMarkerElementImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMarkerElementImplConstructor,KSVGBridge<SVGMarkerElementImplConstructor> >(p1,const_cast<SVGMarkerElementImplConstructor *>(this)));
+}
+
+bool SVGMaskElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGMaskElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMaskElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGMaskElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGMaskElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGMaskElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGMaskElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGMaskElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGMaskElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGMaskElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGMaskElementImpl>(p1,const_cast<SVGMaskElementImpl *>(this));
+}
+
+Value SVGMaskElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMaskElementImpl,KSVGRWBridge<SVGMaskElementImpl> >(p1,const_cast<SVGMaskElementImpl *>(this)));
+}
+
+bool SVGMatrixImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGMatrixImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGMatrixImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMatrixImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGMatrixImplProtoFunc,SVGMatrixImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGMatrixImpl *SVGMatrixImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGMatrixImpl> *test = dynamic_cast<const KSVGBridge<SVGMatrixImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGMatrixImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGMatrixImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGMatrixImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGMatrixImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGMatrixImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGMatrixImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGMatrixImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMatrixImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMatrixImpl,KSVGRWBridge<SVGMatrixImpl> >(p1,const_cast<SVGMatrixImpl *>(this)));
+}
+
+bool SVGMetadataElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMetadataElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGMetadataElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGMetadataElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMetadataElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMetadataElementImpl,KSVGRWBridge<SVGMetadataElementImpl> >(p1,const_cast<SVGMetadataElementImpl *>(this)));
+}
+
+bool SVGMissingGlyphElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMissingGlyphElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGMissingGlyphElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGMissingGlyphElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMissingGlyphElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMissingGlyphElementImpl,KSVGRWBridge<SVGMissingGlyphElementImpl> >(p1,const_cast<SVGMissingGlyphElementImpl *>(this)));
+}
+
+bool SVGMouseEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGMouseEventImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGMouseEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMouseEventImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGMouseEventImplProtoFunc,SVGMouseEventImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGMouseEventImpl *SVGMouseEventImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGMouseEventImpl> *test = dynamic_cast<const KSVGBridge<SVGMouseEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGMouseEventImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGMouseEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return SVGUIEventImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGMouseEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGMouseEventImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMouseEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMouseEventImpl,KSVGBridge<SVGMouseEventImpl> >(p1,const_cast<SVGMouseEventImpl *>(this)));
+}
+
+bool SVGMutationEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGEventImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGMutationEventImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGEventImpl::hasProperty(p1,p2)) return SVGEventImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGMutationEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGMutationEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGMutationEventImpl,KSVGBridge<SVGMutationEventImpl> >(p1,const_cast<SVGMutationEventImpl *>(this)));
+}
+
+bool SVGNumberImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGNumberImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGNumberImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGNumberImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGNumberImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGNumberImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGNumberImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGNumberImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGNumberImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGNumberImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGNumberImpl,KSVGRWBridge<SVGNumberImpl> >(p1,const_cast<SVGNumberImpl *>(this)));
+}
+
+bool SVGNumberListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGNumberListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGNumberListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGNumberListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGNumberListImplProtoFunc,SVGNumberListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGNumberListImpl *SVGNumberListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGNumberListImpl> *test = dynamic_cast<const KSVGBridge<SVGNumberListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGNumberListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGNumberListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGNumberListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGNumberListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGNumberListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGNumberListImpl,KSVGBridge<SVGNumberListImpl> >(p1,const_cast<SVGNumberListImpl *>(this)));
+}
+
+bool SVGPaintImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPaintImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGColorImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPaintImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPaintImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPaintImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGColorImpl::hasProperty(p1,p2)) return SVGColorImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGPaintImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPaintImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPaintImpl,KSVGBridge<SVGPaintImpl> >(p1,const_cast<SVGPaintImpl *>(this)));
+}
+
+bool SVGPaintImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPaintImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPaintImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPaintImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPaintImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPaintImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPaintImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPaintImplConstructor,KSVGBridge<SVGPaintImplConstructor> >(p1,const_cast<SVGPaintImplConstructor *>(this)));
+}
+
+bool SVGPathElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGPathElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGAnimatedPathDataImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGPathElementImplProtoFunc,SVGPathElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGPathElementImpl *SVGPathElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGPathElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGPathElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGAnimatedPathDataImpl::hasProperty(p1,p2)) return SVGAnimatedPathDataImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGPathElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGPathElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGPathElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGPathElementImpl>(p1,const_cast<SVGPathElementImpl *>(this));
+}
+
+Value SVGPathElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathElementImpl,KSVGRWBridge<SVGPathElementImpl> >(p1,const_cast<SVGPathElementImpl *>(this)));
+}
+
+bool SVGPathSegArcAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegArcAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegArcAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegArcAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegArcAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegArcAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegArcAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegArcAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegArcAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegArcAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegArcAbsImpl,KSVGRWBridge<SVGPathSegArcAbsImpl> >(p1,const_cast<SVGPathSegArcAbsImpl *>(this)));
+}
+
+bool SVGPathSegArcRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegArcRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegArcRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegArcRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegArcRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegArcRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegArcRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegArcRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegArcRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegArcRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegArcRelImpl,KSVGRWBridge<SVGPathSegArcRelImpl> >(p1,const_cast<SVGPathSegArcRelImpl *>(this)));
+}
+
+bool SVGPathSegClosePathImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegClosePathImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGPathSegClosePathImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegClosePathImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegClosePathImpl,KSVGBridge<SVGPathSegClosePathImpl> >(p1,const_cast<SVGPathSegClosePathImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoCubicAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoCubicAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoCubicAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoCubicAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoCubicAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoCubicAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoCubicAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoCubicAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoCubicAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoCubicAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoCubicAbsImpl,KSVGRWBridge<SVGPathSegCurvetoCubicAbsImpl> >(p1,const_cast<SVGPathSegCurvetoCubicAbsImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoCubicRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoCubicRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoCubicRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoCubicRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoCubicRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoCubicRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoCubicRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoCubicRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoCubicRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoCubicRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoCubicRelImpl,KSVGRWBridge<SVGPathSegCurvetoCubicRelImpl> >(p1,const_cast<SVGPathSegCurvetoCubicRelImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoCubicSmoothAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoCubicSmoothAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoCubicSmoothAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoCubicSmoothAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoCubicSmoothAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoCubicSmoothAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoCubicSmoothAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoCubicSmoothAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoCubicSmoothAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoCubicSmoothAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoCubicSmoothAbsImpl,KSVGRWBridge<SVGPathSegCurvetoCubicSmoothAbsImpl> >(p1,const_cast<SVGPathSegCurvetoCubicSmoothAbsImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoCubicSmoothRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoCubicSmoothRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoCubicSmoothRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoCubicSmoothRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoCubicSmoothRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoCubicSmoothRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoCubicSmoothRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoCubicSmoothRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoCubicSmoothRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoCubicSmoothRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoCubicSmoothRelImpl,KSVGRWBridge<SVGPathSegCurvetoCubicSmoothRelImpl> >(p1,const_cast<SVGPathSegCurvetoCubicSmoothRelImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoQuadraticAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoQuadraticAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoQuadraticAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoQuadraticAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoQuadraticAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoQuadraticAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoQuadraticAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoQuadraticAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoQuadraticAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoQuadraticAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoQuadraticAbsImpl,KSVGRWBridge<SVGPathSegCurvetoQuadraticAbsImpl> >(p1,const_cast<SVGPathSegCurvetoQuadraticAbsImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoQuadraticRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoQuadraticRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoQuadraticRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoQuadraticRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoQuadraticRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoQuadraticRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoQuadraticRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoQuadraticRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoQuadraticRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoQuadraticRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoQuadraticRelImpl,KSVGRWBridge<SVGPathSegCurvetoQuadraticRelImpl> >(p1,const_cast<SVGPathSegCurvetoQuadraticRelImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoQuadraticSmoothAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoQuadraticSmoothAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoQuadraticSmoothAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoQuadraticSmoothAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoQuadraticSmoothAbsImpl,KSVGRWBridge<SVGPathSegCurvetoQuadraticSmoothAbsImpl> >(p1,const_cast<SVGPathSegCurvetoQuadraticSmoothAbsImpl *>(this)));
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegCurvetoQuadraticSmoothRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegCurvetoQuadraticSmoothRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegCurvetoQuadraticSmoothRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegCurvetoQuadraticSmoothRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegCurvetoQuadraticSmoothRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegCurvetoQuadraticSmoothRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegCurvetoQuadraticSmoothRelImpl,KSVGRWBridge<SVGPathSegCurvetoQuadraticSmoothRelImpl> >(p1,const_cast<SVGPathSegCurvetoQuadraticSmoothRelImpl *>(this)));
+}
+
+bool SVGPathSegImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPathSegImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPathSegImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegImpl,KSVGBridge<SVGPathSegImpl> >(p1,const_cast<SVGPathSegImpl *>(this)));
+}
+
+bool SVGPathSegImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPathSegImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPathSegImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegImplConstructor,KSVGBridge<SVGPathSegImplConstructor> >(p1,const_cast<SVGPathSegImplConstructor *>(this)));
+}
+
+bool SVGPathSegLinetoAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoAbsImpl,KSVGRWBridge<SVGPathSegLinetoAbsImpl> >(p1,const_cast<SVGPathSegLinetoAbsImpl *>(this)));
+}
+
+bool SVGPathSegLinetoHorizontalAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoHorizontalAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoHorizontalAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoHorizontalAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoHorizontalAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoHorizontalAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoHorizontalAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoHorizontalAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoHorizontalAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoHorizontalAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoHorizontalAbsImpl,KSVGRWBridge<SVGPathSegLinetoHorizontalAbsImpl> >(p1,const_cast<SVGPathSegLinetoHorizontalAbsImpl *>(this)));
+}
+
+bool SVGPathSegLinetoHorizontalRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoHorizontalRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoHorizontalRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoHorizontalRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoHorizontalRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoHorizontalRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoHorizontalRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoHorizontalRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoHorizontalRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoHorizontalRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoHorizontalRelImpl,KSVGRWBridge<SVGPathSegLinetoHorizontalRelImpl> >(p1,const_cast<SVGPathSegLinetoHorizontalRelImpl *>(this)));
+}
+
+bool SVGPathSegLinetoRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoRelImpl,KSVGRWBridge<SVGPathSegLinetoRelImpl> >(p1,const_cast<SVGPathSegLinetoRelImpl *>(this)));
+}
+
+bool SVGPathSegLinetoVerticalAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoVerticalAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoVerticalAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoVerticalAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoVerticalAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoVerticalAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoVerticalAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoVerticalAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoVerticalAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoVerticalAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoVerticalAbsImpl,KSVGRWBridge<SVGPathSegLinetoVerticalAbsImpl> >(p1,const_cast<SVGPathSegLinetoVerticalAbsImpl *>(this)));
+}
+
+bool SVGPathSegLinetoVerticalRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegLinetoVerticalRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegLinetoVerticalRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegLinetoVerticalRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegLinetoVerticalRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegLinetoVerticalRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegLinetoVerticalRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegLinetoVerticalRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegLinetoVerticalRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegLinetoVerticalRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegLinetoVerticalRelImpl,KSVGRWBridge<SVGPathSegLinetoVerticalRelImpl> >(p1,const_cast<SVGPathSegLinetoVerticalRelImpl *>(this)));
+}
+
+bool SVGPathSegListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGPathSegListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGPathSegListImplProtoFunc,SVGPathSegListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGPathSegListImpl *SVGPathSegListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGPathSegListImpl> *test = dynamic_cast<const KSVGBridge<SVGPathSegListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGPathSegListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGPathSegListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPathSegListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGPathSegListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegListImpl,KSVGBridge<SVGPathSegListImpl> >(p1,const_cast<SVGPathSegListImpl *>(this)));
+}
+
+bool SVGPathSegMovetoAbsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegMovetoAbsImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegMovetoAbsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegMovetoAbsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegMovetoAbsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegMovetoAbsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegMovetoAbsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegMovetoAbsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegMovetoAbsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegMovetoAbsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegMovetoAbsImpl,KSVGRWBridge<SVGPathSegMovetoAbsImpl> >(p1,const_cast<SVGPathSegMovetoAbsImpl *>(this)));
+}
+
+bool SVGPathSegMovetoRelImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPathSegMovetoRelImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPathSegMovetoRelImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPathSegMovetoRelImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPathSegMovetoRelImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGPathSegImpl::hasProperty(p1,p2)) return SVGPathSegImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPathSegMovetoRelImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPathSegMovetoRelImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPathSegMovetoRelImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPathSegMovetoRelImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPathSegMovetoRelImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPathSegMovetoRelImpl,KSVGRWBridge<SVGPathSegMovetoRelImpl> >(p1,const_cast<SVGPathSegMovetoRelImpl *>(this)));
+}
+
+bool SVGPatternElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPatternElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPatternElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPatternElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPatternElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPatternElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPatternElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPatternElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGPatternElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGPatternElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGPatternElementImpl>(p1,const_cast<SVGPatternElementImpl *>(this));
+}
+
+Value SVGPatternElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPatternElementImpl,KSVGRWBridge<SVGPatternElementImpl> >(p1,const_cast<SVGPatternElementImpl *>(this)));
+}
+
+bool SVGPointImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPointImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPointImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPointImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPointImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGPointImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPointImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPointImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPointImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPointImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPointImpl,KSVGRWBridge<SVGPointImpl> >(p1,const_cast<SVGPointImpl *>(this)));
+}
+
+bool SVGPointListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPointListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGPointListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPointListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGPointListImplProtoFunc,SVGPointListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGPointListImpl *SVGPointListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGPointListImpl> *test = dynamic_cast<const KSVGBridge<SVGPointListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGPointListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGPointListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPointListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGPointListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPointListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPointListImpl,KSVGBridge<SVGPointListImpl> >(p1,const_cast<SVGPointListImpl *>(this)));
+}
+
+bool SVGPolyElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimatedPointsImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPolyElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimatedPointsImpl::hasProperty(p1,p2)) return SVGAnimatedPointsImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPolyElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimatedPointsImpl::hasProperty(p1,p2)) {
+ SVGAnimatedPointsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGPolyElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPolyElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPolyElementImpl,KSVGRWBridge<SVGPolyElementImpl> >(p1,const_cast<SVGPolyElementImpl *>(this)));
+}
+
+bool SVGPolygonElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPolygonElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) return SVGPolyElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPolygonElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) {
+ SVGPolyElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGPolygonElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGPolygonElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGPolygonElementImpl>(p1,const_cast<SVGPolygonElementImpl *>(this));
+}
+
+Value SVGPolygonElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPolygonElementImpl,KSVGRWBridge<SVGPolygonElementImpl> >(p1,const_cast<SVGPolygonElementImpl *>(this)));
+}
+
+bool SVGPolylineElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGPolylineElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) return SVGPolyElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGPolylineElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGPolyElementImpl::hasProperty(p1,p2)) {
+ SVGPolyElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGPolylineElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGPolylineElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGPolylineElementImpl>(p1,const_cast<SVGPolylineElementImpl *>(this));
+}
+
+Value SVGPolylineElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPolylineElementImpl,KSVGRWBridge<SVGPolylineElementImpl> >(p1,const_cast<SVGPolylineElementImpl *>(this)));
+}
+
+bool SVGPreserveAspectRatioImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPreserveAspectRatioImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPreserveAspectRatioImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPreserveAspectRatioImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPreserveAspectRatioImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGPreserveAspectRatioImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGPreserveAspectRatioImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGPreserveAspectRatioImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGPreserveAspectRatioImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPreserveAspectRatioImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPreserveAspectRatioImpl,KSVGRWBridge<SVGPreserveAspectRatioImpl> >(p1,const_cast<SVGPreserveAspectRatioImpl *>(this)));
+}
+
+bool SVGPreserveAspectRatioImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGPreserveAspectRatioImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGPreserveAspectRatioImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGPreserveAspectRatioImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGPreserveAspectRatioImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGPreserveAspectRatioImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGPreserveAspectRatioImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGPreserveAspectRatioImplConstructor,KSVGBridge<SVGPreserveAspectRatioImplConstructor> >(p1,const_cast<SVGPreserveAspectRatioImplConstructor *>(this)));
+}
+
+bool SVGRadialGradientElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGRadialGradientElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGRadialGradientElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGRadialGradientElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGRadialGradientElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) return SVGGradientElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGRadialGradientElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGRadialGradientElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGRadialGradientElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGGradientElementImpl::hasProperty(p1,p2)) {
+ SVGGradientElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGRadialGradientElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGRadialGradientElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGRadialGradientElementImpl>(p1,const_cast<SVGRadialGradientElementImpl *>(this));
+}
+
+Value SVGRadialGradientElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGRadialGradientElementImpl,KSVGRWBridge<SVGRadialGradientElementImpl> >(p1,const_cast<SVGRadialGradientElementImpl *>(this)));
+}
+
+bool SVGRectElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGRectElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGRectElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGRectElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGRectElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGRectElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGRectElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGRectElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGRectElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGRectElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGRectElementImpl>(p1,const_cast<SVGRectElementImpl *>(this));
+}
+
+Value SVGRectElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGRectElementImpl,KSVGRWBridge<SVGRectElementImpl> >(p1,const_cast<SVGRectElementImpl *>(this)));
+}
+
+bool SVGRectImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGRectImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGRectImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGRectImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGRectImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGRectImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGRectImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGRectImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGRectImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGRectImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGRectImpl,KSVGRWBridge<SVGRectImpl> >(p1,const_cast<SVGRectImpl *>(this)));
+}
+
+bool SVGSVGElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGSVGElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGSVGElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGLocatableImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGSVGElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGSVGElementImplProtoFunc,SVGSVGElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGSVGElementImpl *SVGSVGElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGSVGElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGSVGElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGLocatableImpl::hasProperty(p1,p2)) return SVGLocatableImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return SVGZoomAndPanImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGSVGElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGSVGElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGSVGElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) {
+ SVGZoomAndPanImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGSVGElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGSVGElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGSVGElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGSVGElementImpl>(p1,const_cast<SVGSVGElementImpl *>(this));
+}
+
+Value SVGSVGElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGSVGElementImpl,KSVGRWBridge<SVGSVGElementImpl> >(p1,const_cast<SVGSVGElementImpl *>(this)));
+}
+
+bool SVGScriptElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGScriptElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGScriptElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGScriptElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGScriptElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGScriptElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGScriptElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGScriptElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGScriptElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGScriptElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGScriptElementImpl>(p1,const_cast<SVGScriptElementImpl *>(this));
+}
+
+Value SVGScriptElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGScriptElementImpl,KSVGRWBridge<SVGScriptElementImpl> >(p1,const_cast<SVGScriptElementImpl *>(this)));
+}
+
+bool SVGSetElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGSetElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) return SVGAnimationElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGSetElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGAnimationElementImpl::hasProperty(p1,p2)) {
+ SVGAnimationElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGSetElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGSetElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGSetElementImpl>(p1,const_cast<SVGSetElementImpl *>(this));
+}
+
+Value SVGSetElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGSetElementImpl,KSVGRWBridge<SVGSetElementImpl> >(p1,const_cast<SVGSetElementImpl *>(this)));
+}
+
+bool SVGShapeImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGShapeImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGShapeImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGShapeImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGShapeImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGShapeImpl,KSVGRWBridge<SVGShapeImpl> >(p1,const_cast<SVGShapeImpl *>(this)));
+}
+
+bool SVGStopElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGStopElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGStopElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGStopElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGStopElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGStopElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGStopElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGStopElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGStopElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGStopElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGStopElementImpl>(p1,const_cast<SVGStopElementImpl *>(this));
+}
+
+Value SVGStopElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGStopElementImpl,KSVGRWBridge<SVGStopElementImpl> >(p1,const_cast<SVGStopElementImpl *>(this)));
+}
+
+bool SVGStringListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGStringListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGStringListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGStringListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGStringListImplProtoFunc,SVGStringListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGStringListImpl *SVGStringListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGStringListImpl> *test = dynamic_cast<const KSVGBridge<SVGStringListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGStringListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGStringListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGStringListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGStringListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGStringListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGStringListImpl,KSVGBridge<SVGStringListImpl> >(p1,const_cast<SVGStringListImpl *>(this)));
+}
+
+bool SVGStylableImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGStylableImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGStylableImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGStylableImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGStylableImplProtoFunc,SVGStylableImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGStylableImpl *SVGStylableImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGStylableImpl> *test = dynamic_cast<const KSVGBridge<SVGStylableImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDescElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDescElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEFloodElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEFloodElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFEImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFEImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFilterElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFilterElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGFontElementImpl> *test = dynamic_cast<const KSVGBridge<SVGFontElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGlyphRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGlyphRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLinearGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLinearGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMarkerElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMarkerElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMaskElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMaskElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMissingGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMissingGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPatternElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPatternElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRadialGradientElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRadialGradientElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGStopElementImpl> *test = dynamic_cast<const KSVGBridge<SVGStopElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSymbolElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSymbolElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTitleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTitleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGStylableImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGStylableImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGStylableImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGStylableImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGStylableImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGStylableImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGStylableImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGStylableImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGStylableImpl,KSVGRWBridge<SVGStylableImpl> >(p1,const_cast<SVGStylableImpl *>(this)));
+}
+
+bool SVGStyleElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGStyleElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGStyleElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGStyleElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGStyleElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGStyleElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGStyleElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGStyleElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGStyleElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGStyleElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGStyleElementImpl>(p1,const_cast<SVGStyleElementImpl *>(this));
+}
+
+Value SVGStyleElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGStyleElementImpl,KSVGRWBridge<SVGStyleElementImpl> >(p1,const_cast<SVGStyleElementImpl *>(this)));
+}
+
+bool SVGSwitchElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGSwitchElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) return SVGContainerImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGSwitchElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGContainerImpl::hasProperty(p1,p2)) {
+ SVGContainerImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGSwitchElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGSwitchElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGSwitchElementImpl>(p1,const_cast<SVGSwitchElementImpl *>(this));
+}
+
+Value SVGSwitchElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGSwitchElementImpl,KSVGRWBridge<SVGSwitchElementImpl> >(p1,const_cast<SVGSwitchElementImpl *>(this)));
+}
+
+bool SVGSymbolElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGSymbolElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGSymbolElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGSymbolElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGSymbolElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGSymbolElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGSymbolElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGSymbolElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGSymbolElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGSymbolElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGSymbolElementImpl>(p1,const_cast<SVGSymbolElementImpl *>(this));
+}
+
+Value SVGSymbolElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGSymbolElementImpl,KSVGRWBridge<SVGSymbolElementImpl> >(p1,const_cast<SVGSymbolElementImpl *>(this)));
+}
+
+bool SVGTRefElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTRefElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) return SVGTSpanElementImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTRefElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGTSpanElementImpl::hasProperty(p1,p2)) {
+ SVGTSpanElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTRefElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGTRefElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGTRefElementImpl>(p1,const_cast<SVGTRefElementImpl *>(this));
+}
+
+Value SVGTRefElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTRefElementImpl,KSVGRWBridge<SVGTRefElementImpl> >(p1,const_cast<SVGTRefElementImpl *>(this)));
+}
+
+bool SVGTSpanElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTSpanElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) return SVGTextPositioningElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTSpanElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) {
+ SVGTextPositioningElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTSpanElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGTSpanElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGTSpanElementImpl>(p1,const_cast<SVGTSpanElementImpl *>(this));
+}
+
+Value SVGTSpanElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTSpanElementImpl,KSVGRWBridge<SVGTSpanElementImpl> >(p1,const_cast<SVGTSpanElementImpl *>(this)));
+}
+
+bool SVGTestsImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTestsImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGTestsImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTestsImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGTestsImplProtoFunc,SVGTestsImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGTestsImpl *SVGTestsImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGTestsImpl> *test = dynamic_cast<const KSVGBridge<SVGTestsImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateColorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateColorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateMotionElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateMotionElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimateTransformElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimateTransformElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAnimationElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAnimationElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCircleElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCircleElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGClipPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGClipPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGCursorElementImpl> *test = dynamic_cast<const KSVGBridge<SVGCursorElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGDefsElementImpl> *test = dynamic_cast<const KSVGBridge<SVGDefsElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGEllipseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGEllipseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGForeignObjectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGForeignObjectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGImageElementImpl> *test = dynamic_cast<const KSVGBridge<SVGImageElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGLineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGLineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMaskElementImpl> *test = dynamic_cast<const KSVGBridge<SVGMaskElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPatternElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPatternElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolyElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolyElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolygonElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolygonElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGPolylineElementImpl> *test = dynamic_cast<const KSVGBridge<SVGPolylineElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGRectElementImpl> *test = dynamic_cast<const KSVGBridge<SVGRectElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSVGElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSVGElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSetElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSetElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGSwitchElementImpl> *test = dynamic_cast<const KSVGBridge<SVGSwitchElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGUseElementImpl> *test = dynamic_cast<const KSVGBridge<SVGUseElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGTestsImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGTestsImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGTestsImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGTestsImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGTestsImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGTestsImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGTestsImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTestsImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTestsImpl,KSVGRWBridge<SVGTestsImpl> >(p1,const_cast<SVGTestsImpl *>(this)));
+}
+
+bool SVGTextContentElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTextContentElementImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGTextContentElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTextContentElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGTextContentElementImplProtoFunc,SVGTextContentElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGTextContentElementImpl *SVGTextContentElementImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGTextContentElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextContentElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGAltGlyphElementImpl> *test = dynamic_cast<const KSVGBridge<SVGAltGlyphElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTRefElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTRefElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTSpanElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTSpanElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPathElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPathElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGTextPositioningElementImpl> *test = dynamic_cast<const KSVGBridge<SVGTextPositioningElementImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGTextContentElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGTextContentElementImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTextContentElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGTextContentElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGTextContentElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTextContentElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGTextContentElementImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTextContentElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextContentElementImpl,KSVGRWBridge<SVGTextContentElementImpl> >(p1,const_cast<SVGTextContentElementImpl *>(this)));
+}
+
+bool SVGTextContentElementImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTextContentElementImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGTextContentElementImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTextContentElementImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTextContentElementImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGTextContentElementImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTextContentElementImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextContentElementImplConstructor,KSVGBridge<SVGTextContentElementImplConstructor> >(p1,const_cast<SVGTextContentElementImplConstructor *>(this)));
+}
+
+bool SVGTextElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTextElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) return SVGTextPositioningElementImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTextElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGTextPositioningElementImpl::hasProperty(p1,p2)) {
+ SVGTextPositioningElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTextElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGTextElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGTextElementImpl>(p1,const_cast<SVGTextElementImpl *>(this));
+}
+
+Value SVGTextElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextElementImpl,KSVGRWBridge<SVGTextElementImpl> >(p1,const_cast<SVGTextElementImpl *>(this)));
+}
+
+bool SVGTextPathElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTextPathElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTextPathElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTextPathElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTextPathElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) return SVGTextContentElementImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTextPathElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGTextPathElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGTextPathElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) {
+ SVGTextContentElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTextPathElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGTextPathElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGTextPathElementImpl>(p1,const_cast<SVGTextPathElementImpl *>(this));
+}
+
+Value SVGTextPathElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextPathElementImpl,KSVGRWBridge<SVGTextPathElementImpl> >(p1,const_cast<SVGTextPathElementImpl *>(this)));
+}
+
+bool SVGTextPathElementImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTextPathElementImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGTextPathElementImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTextPathElementImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTextPathElementImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGTextPathElementImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTextPathElementImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextPathElementImplConstructor,KSVGBridge<SVGTextPathElementImplConstructor> >(p1,const_cast<SVGTextPathElementImplConstructor *>(this)));
+}
+
+bool SVGTextPositioningElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTextPositioningElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTextPositioningElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTextPositioningElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTextPositioningElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) return SVGTextContentElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTextPositioningElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGTextPositioningElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGTextPositioningElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGTextContentElementImpl::hasProperty(p1,p2)) {
+ SVGTextContentElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTextPositioningElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTextPositioningElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTextPositioningElementImpl,KSVGRWBridge<SVGTextPositioningElementImpl> >(p1,const_cast<SVGTextPositioningElementImpl *>(this)));
+}
+
+bool SVGTitleElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTitleElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTitleElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGTitleElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGTitleElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGTitleElementImpl>(p1,const_cast<SVGTitleElementImpl *>(this));
+}
+
+Value SVGTitleElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTitleElementImpl,KSVGRWBridge<SVGTitleElementImpl> >(p1,const_cast<SVGTitleElementImpl *>(this)));
+}
+
+bool SVGTransformImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTransformImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGTransformImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTransformImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGTransformImplProtoFunc,SVGTransformImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGTransformImpl *SVGTransformImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGTransformImpl> *test = dynamic_cast<const KSVGBridge<SVGTransformImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGTransformImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGTransformImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGTransformImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGTransformImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTransformImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTransformImpl,KSVGBridge<SVGTransformImpl> >(p1,const_cast<SVGTransformImpl *>(this)));
+}
+
+bool SVGTransformImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTransformImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGTransformImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTransformImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTransformImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGTransformImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTransformImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTransformImplConstructor,KSVGBridge<SVGTransformImplConstructor> >(p1,const_cast<SVGTransformImplConstructor *>(this)));
+}
+
+bool SVGTransformListImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTransformListImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGTransformListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTransformListImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGTransformListImplProtoFunc,SVGTransformListImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGTransformListImpl *SVGTransformListImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGTransformListImpl> *test = dynamic_cast<const KSVGBridge<SVGTransformListImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGTransformListImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGTransformListImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGTransformListImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGTransformListImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTransformListImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTransformListImpl,KSVGBridge<SVGTransformListImpl> >(p1,const_cast<SVGTransformListImpl *>(this)));
+}
+
+bool SVGTransformableImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGTransformableImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGLocatableImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGTransformableImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGTransformableImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGTransformableImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGLocatableImpl::hasProperty(p1,p2)) return SVGLocatableImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGTransformableImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGTransformableImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGTransformableImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGTransformableImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGTransformableImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGTransformableImpl,KSVGRWBridge<SVGTransformableImpl> >(p1,const_cast<SVGTransformableImpl *>(this)));
+}
+
+bool SVGUIEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGUIEventImpl::s_hashTable,p2);
+ if(e) return true;
+ Object proto = SVGUIEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return true;
+ if(SVGEventImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGUIEventImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGet<SVGUIEventImplProtoFunc,SVGUIEventImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+SVGUIEventImpl *SVGUIEventImplProtoFunc::cast(const ObjectImp *p1) const
+{
+ { const KSVGBridge<SVGUIEventImpl> *test = dynamic_cast<const KSVGBridge<SVGUIEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGKeyEventImpl> *test = dynamic_cast<const KSVGBridge<SVGKeyEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGMouseEventImpl> *test = dynamic_cast<const KSVGBridge<SVGMouseEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ { const KSVGBridge<SVGZoomEventImpl> *test = dynamic_cast<const KSVGBridge<SVGZoomEventImpl> * >(p1);
+ if(test) return test->impl(); }
+ return 0;
+}
+
+Value SVGUIEventImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Object proto = SVGUIEventImplProto::self(p1);
+ if(proto.hasProperty(p1,p2)) return proto.get(p1,p2);
+ if(SVGEventImpl::hasProperty(p1,p2)) return SVGEventImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGUIEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return SVGUIEventImplProto::self(p1);
+ return Object::dynamicCast(Null());
+}
+
+Value SVGUIEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGUIEventImpl,KSVGBridge<SVGUIEventImpl> >(p1,const_cast<SVGUIEventImpl *>(this)));
+}
+
+bool SVGURIReferenceImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGURIReferenceImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGURIReferenceImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGURIReferenceImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGURIReferenceImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGURIReferenceImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGURIReferenceImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGURIReferenceImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGURIReferenceImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGURIReferenceImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGURIReferenceImpl,KSVGRWBridge<SVGURIReferenceImpl> >(p1,const_cast<SVGURIReferenceImpl *>(this)));
+}
+
+bool SVGUseElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGUseElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return true;
+ if(SVGShapeImpl::hasProperty(p1,p2)) return true;
+ if(SVGStylableImpl::hasProperty(p1,p2)) return true;
+ if(SVGTestsImpl::hasProperty(p1,p2)) return true;
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return true;
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGUseElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGUseElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGUseElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) return SVGLangSpaceImpl::get(p1,p2,p3);
+ if(SVGShapeImpl::hasProperty(p1,p2)) return SVGShapeImpl::get(p1,p2,p3);
+ if(SVGStylableImpl::hasProperty(p1,p2)) return SVGStylableImpl::get(p1,p2,p3);
+ if(SVGTestsImpl::hasProperty(p1,p2)) return SVGTestsImpl::get(p1,p2,p3);
+ if(SVGTransformableImpl::hasProperty(p1,p2)) return SVGTransformableImpl::get(p1,p2,p3);
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) return SVGURIReferenceImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGUseElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGUseElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGUseElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGLangSpaceImpl::hasProperty(p1,p2)) {
+ SVGLangSpaceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGShapeImpl::hasProperty(p1,p2)) {
+ SVGShapeImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGStylableImpl::hasProperty(p1,p2)) {
+ SVGStylableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTestsImpl::hasProperty(p1,p2)) {
+ SVGTestsImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGTransformableImpl::hasProperty(p1,p2)) {
+ SVGTransformableImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGURIReferenceImpl::hasProperty(p1,p2)) {
+ SVGURIReferenceImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGUseElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGUseElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGUseElementImpl>(p1,const_cast<SVGUseElementImpl *>(this));
+}
+
+Value SVGUseElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGUseElementImpl,KSVGRWBridge<SVGUseElementImpl> >(p1,const_cast<SVGUseElementImpl *>(this)));
+}
+
+bool SVGVKernElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGVKernElementImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGVKernElementImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGVKernElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGVKernElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGVKernElementImpl,KSVGRWBridge<SVGVKernElementImpl> >(p1,const_cast<SVGVKernElementImpl *>(this)));
+}
+
+bool SVGViewElementImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGViewElementImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGElementImpl::hasProperty(p1,p2)) return true;
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return true;
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGViewElementImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGViewElementImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGViewElementImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) return SVGElementImpl::get(p1,p2,p3);
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) return SVGExternalResourcesRequiredImpl::get(p1,p2,p3);
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return SVGZoomAndPanImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGViewElementImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGViewElementImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGViewElementImpl::putInParents(PUT_METHOD_ARGS)
+{
+ if(SVGElementImpl::hasProperty(p1,p2)) {
+ SVGElementImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGExternalResourcesRequiredImpl::hasProperty(p1,p2)) {
+ SVGExternalResourcesRequiredImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) {
+ SVGZoomAndPanImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGViewElementImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+ObjectImp *SVGViewElementImpl::bridge(ExecState *p1) const
+{
+ return new KSVGRWBridge<SVGViewElementImpl>(p1,const_cast<SVGViewElementImpl *>(this));
+}
+
+Value SVGViewElementImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGViewElementImpl,KSVGRWBridge<SVGViewElementImpl> >(p1,const_cast<SVGViewElementImpl *>(this)));
+}
+
+bool SVGViewSpecImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return true;
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGViewSpecImpl::get(GET_METHOD_ARGS) const
+{
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) return SVGFitToViewBoxImpl::get(p1,p2,p3);
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) return SVGZoomAndPanImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+bool SVGViewSpecImpl::put(PUT_METHOD_ARGS)
+{
+ if(SVGFitToViewBoxImpl::hasProperty(p1,p2)) {
+ SVGFitToViewBoxImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ if(SVGZoomAndPanImpl::hasProperty(p1,p2)) {
+ SVGZoomAndPanImpl::put(p1,p2,p3,p4);
+ return true;
+ }
+ return false;
+}
+
+Object SVGViewSpecImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGViewSpecImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGViewSpecImpl,KSVGRWBridge<SVGViewSpecImpl> >(p1,const_cast<SVGViewSpecImpl *>(this)));
+}
+
+bool SVGZoomAndPanImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGZoomAndPanImpl::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGZoomAndPanImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGZoomAndPanImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGZoomAndPanImpl::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+bool SVGZoomAndPanImpl::put(PUT_METHOD_ARGS)
+{
+ return lookupPut<SVGZoomAndPanImpl>(p1,p2,p3,p4,&s_hashTable,this);
+}
+
+bool SVGZoomAndPanImpl::putInParents(PUT_METHOD_ARGS)
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3); Q_UNUSED(p4);
+ return false;
+}
+
+Object SVGZoomAndPanImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGZoomAndPanImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGZoomAndPanImpl,KSVGRWBridge<SVGZoomAndPanImpl> >(p1,const_cast<SVGZoomAndPanImpl *>(this)));
+}
+
+bool SVGZoomAndPanImplConstructor::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGZoomAndPanImplConstructor::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SVGZoomAndPanImplConstructor::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGZoomAndPanImplConstructor>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGZoomAndPanImplConstructor::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SVGZoomAndPanImplConstructor::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGZoomAndPanImplConstructor::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGZoomAndPanImplConstructor,KSVGBridge<SVGZoomAndPanImplConstructor> >(p1,const_cast<SVGZoomAndPanImplConstructor *>(this)));
+}
+
+bool SVGZoomEventImpl::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SVGZoomEventImpl::s_hashTable,p2);
+ if(e) return true;
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return true;
+ return false;
+}
+
+Value SVGZoomEventImpl::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SVGZoomEventImpl>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SVGZoomEventImpl::getInParents(GET_METHOD_ARGS) const
+{
+ if(SVGUIEventImpl::hasProperty(p1,p2)) return SVGUIEventImpl::get(p1,p2,p3);
+ return Undefined();
+}
+
+Object SVGZoomEventImpl::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SVGZoomEventImpl::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SVGZoomEventImpl,KSVGBridge<SVGZoomEventImpl> >(p1,const_cast<SVGZoomEventImpl *>(this)));
+}
+
+bool SharedString::hasProperty(ExecState *p1,const Identifier &p2) const
+{
+ const HashEntry *e = Lookup::findEntry(&SharedString::s_hashTable,p2);
+ if(e) return true;
+ Q_UNUSED(p1);
+ return false;
+}
+
+Value SharedString::get(GET_METHOD_ARGS) const
+{
+ return lookupGetValue<SharedString>(p1,p2,&s_hashTable,this,p3);
+}
+
+Value SharedString::getInParents(GET_METHOD_ARGS) const
+{
+ Q_UNUSED(p1); Q_UNUSED(p2); Q_UNUSED(p3);
+ return Undefined();
+}
+
+Object SharedString::prototype(ExecState *p1) const
+{
+ if(p1) return p1->interpreter()->builtinObjectPrototype();
+ return Object::dynamicCast(Null());
+}
+
+Value SharedString::cache(ExecState *p1) const
+{
+ return KJS::Value(cacheDOMObject<SharedString,KSVGBridge<SharedString> >(p1,const_cast<SharedString *>(this)));
+}
+
diff --git a/ksvg/impl/libs/Makefile.am b/ksvg/impl/libs/Makefile.am
new file mode 100644
index 00000000..76f41e24
--- /dev/null
+++ b/ksvg/impl/libs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = xrgbrender art_support libtext2path
diff --git a/ksvg/impl/libs/art_support/Makefile.am b/ksvg/impl/libs/art_support/Makefile.am
new file mode 100644
index 00000000..4bf00dd7
--- /dev/null
+++ b/ksvg/impl/libs/art_support/Makefile.am
@@ -0,0 +1,4 @@
+noinst_LTLIBRARIES = libksvgart.la
+libksvgart_la_SOURCES = art_render_misc.c art_rgba_svp.c art_misc.c
+
+INCLUDES = $(LIBART_CFLAGS) $(all_includes)
diff --git a/ksvg/impl/libs/art_support/art_misc.c b/ksvg/impl/libs/art_support/art_misc.c
new file mode 100644
index 00000000..69b45306
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_misc.c
@@ -0,0 +1,1841 @@
+#include <libart_lgpl/art_vpath.h>
+#include <libart_lgpl/art_bpath.h>
+#include <libart_lgpl/art_misc.h>
+#include <libart_lgpl/art_affine.h>
+#include <libart_lgpl/art_svp_render_aa.h>
+
+#include "art_misc.h"
+
+extern double ceil(double x);
+extern double floor(double x);
+
+/**
+ * art_vpath_render_bez: Render a bezier segment into the vpath.
+ * @p_vpath: Where the pointer to the #ArtVpath structure is stored.
+ * @pn_points: Pointer to the number of points in *@p_vpath.
+ * @pn_points_max: Pointer to the number of points allocated.
+ * @x0: X coordinate of starting bezier point.
+ * @y0: Y coordinate of starting bezier point.
+ * @x1: X coordinate of first bezier control point.
+ * @y1: Y coordinate of first bezier control point.
+ * @x2: X coordinate of second bezier control point.
+ * @y2: Y coordinate of second bezier control point.
+ * @x3: X coordinate of ending bezier point.
+ * @y3: Y coordinate of ending bezier point.
+ * @flatness: Flatness control.
+ *
+ * Renders a bezier segment into the vector path, reallocating and
+ * updating *@p_vpath and *@pn_vpath_max as necessary. *@pn_vpath is
+ * incremented by the number of vector points added.
+ *
+ * This step includes (@x0, @y0) but not (@x3, @y3).
+ *
+ * The @flatness argument guides the amount of subdivision. The Adobe
+ * PostScript reference manual defines flatness as the maximum
+ * deviation between the any point on the vpath approximation and the
+ * corresponding point on the "true" curve, and we follow this
+ * definition here. A value of 0.25 should ensure high quality for aa
+ * rendering.
+ **/
+ void
+ksvg_art_vpath_render_bez (ArtVpath **p_vpath, int *pn, int *pn_max,
+ double x0, double y0,
+ double x1, double y1,
+ double x2, double y2,
+ double x3, double y3,
+ double flatness)
+{
+ double x3_0, y3_0;
+ double z3_0_dot;
+ double z1_dot, z2_dot;
+ double z1_perp, z2_perp;
+ double max_perp_sq;
+
+ double x_m, y_m;
+ double xa1, ya1;
+ double xa2, ya2;
+ double xb1, yb1;
+ double xb2, yb2;
+
+ /* It's possible to optimize this routine a fair amount.
+
+ First, once the _dot conditions are met, they will also be met in
+ all further subdivisions. So we might recurse to a different
+ routine that only checks the _perp conditions.
+
+ Second, the distance _should_ decrease according to fairly
+ predictable rules (a factor of 4 with each subdivision). So it might
+ be possible to note that the distance is within a factor of 4 of
+ acceptable, and subdivide once. But proving this might be hard.
+
+ Third, at the last subdivision, x_m and y_m can be computed more
+ expeditiously (as in the routine above).
+
+ Finally, if we were able to subdivide by, say 2 or 3, this would
+ allow considerably finer-grain control, i.e. fewer points for the
+ same flatness tolerance. This would speed things up downstream.
+
+ In any case, this routine is unlikely to be the bottleneck. It's
+ just that I have this undying quest for more speed...
+
+*/
+
+ x3_0 = x3 - x0;
+ y3_0 = y3 - y0;
+
+ /* z3_0_dot is dist z0-z3 squared */
+ z3_0_dot = x3_0 * x3_0 + y3_0 * y3_0;
+
+ /* todo: this test is far from satisfactory. */
+ if (z3_0_dot < 0.001)
+ goto nosubdivide;
+
+ /* we can avoid subdivision if:
+
+ z1 has distance no more than flatness from the z0-z3 line
+
+ z1 is no more z0'ward than flatness past z0-z3
+
+ z1 is more z0'ward than z3'ward on the line traversing z0-z3
+
+ and correspondingly for z2 */
+
+ /* perp is distance from line, multiplied by dist z0-z3 */
+ max_perp_sq = flatness * flatness * z3_0_dot;
+ z1_perp = (y1 - y0) * x3_0 - (x1 - x0) * y3_0;
+ if (z1_perp * z1_perp > max_perp_sq)
+ goto subdivide;
+
+ z2_perp = (y3 - y2) * x3_0 - (x3 - x2) * y3_0;
+ if (z2_perp * z2_perp > max_perp_sq)
+ goto subdivide;
+
+ z1_dot = (x1 - x0) * x3_0 + (y1 - y0) * y3_0;
+ if (z1_dot < 0 && z1_dot * z1_dot > max_perp_sq)
+ goto subdivide;
+
+ z2_dot = (x3 - x2) * x3_0 + (y3 - y2) * y3_0;
+ if (z2_dot < 0 && z2_dot * z2_dot > max_perp_sq)
+ goto subdivide;
+
+ if (z1_dot + z1_dot > z3_0_dot)
+ goto subdivide;
+
+ if (z2_dot + z2_dot > z3_0_dot)
+ goto subdivide;
+
+nosubdivide:
+ /* don't subdivide */
+ art_vpath_add_point (p_vpath, pn, pn_max,
+ ART_LINETO, x3, y3);
+ return;
+
+subdivide:
+
+ xa1 = (x0 + x1) * 0.5;
+ ya1 = (y0 + y1) * 0.5;
+ xa2 = (x0 + 2 * x1 + x2) * 0.25;
+ ya2 = (y0 + 2 * y1 + y2) * 0.25;
+ xb1 = (x1 + 2 * x2 + x3) * 0.25;
+ yb1 = (y1 + 2 * y2 + y3) * 0.25;
+ xb2 = (x2 + x3) * 0.5;
+ yb2 = (y2 + y3) * 0.5;
+ x_m = (xa2 + xb1) * 0.5;
+ y_m = (ya2 + yb1) * 0.5;
+#ifdef VERBOSE
+ printf ("%g,%g %g,%g %g,%g %g,%g\n", xa1, ya1, xa2, ya2,
+ xb1, yb1, xb2, yb2);
+#endif
+ ksvg_art_vpath_render_bez (p_vpath, pn, pn_max,
+ x0, y0, xa1, ya1, xa2, ya2, x_m, y_m, flatness);
+ ksvg_art_vpath_render_bez (p_vpath, pn, pn_max,
+ x_m, y_m, xb1, yb1, xb2, yb2, x3, y3, flatness);
+}
+
+#define RENDER_LEVEL 4
+#define RENDER_SIZE (1 << (RENDER_LEVEL))
+
+/**
+ * ksvg_art_bez_path_to_vec: Create vpath from bezier path.
+ * @bez: Bezier path.
+ * @flatness: Flatness control.
+ *
+ * Creates a vector path closely approximating the bezier path defined by
+ * @bez. The @flatness argument controls the amount of subdivision. In
+ * general, the resulting vpath deviates by at most @flatness pixels
+ * from the "ideal" path described by @bez.
+ *
+ * Return value: Newly allocated vpath.
+ **/
+ ArtVpath *
+ksvg_art_bez_path_to_vec(const ArtBpath *bez, double flatness)
+{
+ ArtVpath *vec;
+ int vec_n, vec_n_max;
+ int bez_index;
+ double x, y;
+
+ vec_n = 0;
+ vec_n_max = RENDER_SIZE;
+ vec = art_new (ArtVpath, vec_n_max);
+
+ /* Initialization is unnecessary because of the precondition that the
+ bezier path does not begin with LINETO or CURVETO, but is here
+ to make the code warning-free. */
+ x = 0;
+ y = 0;
+
+ bez_index = 0;
+ do
+ {
+#ifdef VERBOSE
+ printf ("%s %g %g\n",
+ bez[bez_index].code == ART_CURVETO ? "curveto" :
+ bez[bez_index].code == ART_LINETO ? "lineto" :
+ bez[bez_index].code == ART_MOVETO ? "moveto" :
+ bez[bez_index].code == ART_MOVETO_OPEN ? "moveto-open" :
+ "end", bez[bez_index].x3, bez[bez_index].y3);
+#endif
+ /* make sure space for at least one more code */
+ if (vec_n >= vec_n_max)
+ art_expand (vec, ArtVpath, vec_n_max);
+ switch (bez[bez_index].code)
+ {
+ case ART_MOVETO_OPEN:
+ case ART_MOVETO:
+ case ART_LINETO:
+ x = bez[bez_index].x3;
+ y = bez[bez_index].y3;
+ vec[vec_n].code = bez[bez_index].code;
+ vec[vec_n].x = x;
+ vec[vec_n].y = y;
+ vec_n++;
+ break;
+ case ART_END:
+ vec[vec_n].code = ART_END;
+ vec[vec_n].x = 0;
+ vec[vec_n].y = 0;
+ vec_n++;
+ break;
+ case ART_END2:
+ vec[vec_n].code = (ArtPathcode)ART_END2;
+ vec[vec_n].x = bez[bez_index].x3;
+ vec[vec_n].y = bez[bez_index].y3;
+ vec_n++;
+ break;
+ case ART_CURVETO:
+#ifdef VERBOSE
+ printf ("%g,%g %g,%g %g,%g %g,%g\n", x, y,
+ bez[bez_index].x1, bez[bez_index].y1,
+ bez[bez_index].x2, bez[bez_index].y2,
+ bez[bez_index].x3, bez[bez_index].y3);
+#endif
+ ksvg_art_vpath_render_bez (&vec, &vec_n, &vec_n_max,
+ x, y,
+ bez[bez_index].x1, bez[bez_index].y1,
+ bez[bez_index].x2, bez[bez_index].y2,
+ bez[bez_index].x3, bez[bez_index].y3,
+ flatness);
+ x = bez[bez_index].x3;
+ y = bez[bez_index].y3;
+ break;
+ }
+ }
+ while (bez[bez_index++].code != ART_END);
+ return vec;
+}
+
+/* Private functions for the rgb affine image compositors - primarily,
+* the determination of runs, eliminating the need for source image
+* bbox calculation in the inner loop. */
+
+/* Determine a "run", such that the inverse affine of all pixels from
+* (x0, y) inclusive to (x1, y) exclusive fit within the bounds
+* of the source image.
+*
+* Initial values of x0, x1, and result values stored in first two
+* pointer arguments.
+* */
+
+#define EPSILON 1e-6
+
+ void ksvg_art_rgb_affine_run (int *p_x0, int *p_x1, int y,
+ int src_width, int src_height,
+ const double affine[6])
+{
+ int x0, x1;
+ double z;
+ double x_intercept;
+ int xi;
+
+ x0 = *p_x0;
+ x1 = *p_x1;
+
+ /* do left and right edges */
+ if (affine[0] > EPSILON)
+ {
+ z = affine[2] * (y + 0.5) + affine[4];
+ x_intercept = -z / affine[0];
+ xi = ceil (x_intercept + EPSILON - 0.5);
+ if (xi > x0)
+ x0 = xi;
+ x_intercept = (-z + src_width) / affine[0];
+ xi = ceil (x_intercept - EPSILON - 0.5);
+ if (xi < x1)
+ x1 = xi;
+ }
+ else if (affine[0] < -EPSILON)
+ {
+ z = affine[2] * (y + 0.5) + affine[4];
+ x_intercept = (-z + src_width) / affine[0];
+ xi = ceil (x_intercept + EPSILON - 0.5);
+ if (xi > x0)
+ x0 = xi;
+ x_intercept = -z / affine[0];
+ xi = ceil (x_intercept - EPSILON - 0.5);
+ if (xi < x1)
+ x1 = xi;
+ }
+ else
+ {
+ z = affine[2] * (y + 0.5) + affine[4];
+ if (z < 0 || z >= src_width)
+ {
+ *p_x1 = *p_x0;
+ return;
+ }
+ }
+ /* do top and bottom edges */
+ if (affine[1] > EPSILON)
+ {
+ z = affine[3] * (y + 0.5) + affine[5];
+ x_intercept = -z / affine[1];
+ xi = ceil (x_intercept + EPSILON - 0.5);
+ if (xi > x0)
+ x0 = xi;
+ x_intercept = (-z + src_height) / affine[1];
+ xi = ceil (x_intercept - EPSILON - 0.5);
+ if (xi < x1)
+ x1 = xi;
+ }
+ else if (affine[1] < -EPSILON)
+ {
+ z = affine[3] * (y + 0.5) + affine[5];
+ x_intercept = (-z + src_height) / affine[1];
+ xi = ceil (x_intercept + EPSILON - 0.5);
+ if (xi > x0)
+ x0 = xi;
+ x_intercept = -z / affine[1];
+ xi = ceil (x_intercept - EPSILON - 0.5);
+ if (xi < x1)
+ x1 = xi;
+ }
+ else
+ {
+ z = affine[3] * (y + 0.5) + affine[5];
+ if (z < 0 || z >= src_height)
+ {
+ *p_x1 = *p_x0;
+ return;
+ }
+ }
+
+ *p_x0 = x0;
+ *p_x1 = x1;
+}
+
+/**
+ * ksvg_art_rgb_affine: Affine transform source RGB image and composite.
+ * @dst: Destination image RGB buffer.
+ * @x0: Left coordinate of destination rectangle.
+ * @y0: Top coordinate of destination rectangle.
+ * @x1: Right coordinate of destination rectangle.
+ * @y1: Bottom coordinate of destination rectangle.
+ * @dst_rowstride: Rowstride of @dst buffer.
+ * @src: Source image RGB buffer.
+ * @src_width: Width of source image.
+ * @src_height: Height of source image.
+ * @src_rowstride: Rowstride of @src buffer.
+ * @affine: Affine transform.
+ * @level: Filter level.
+ * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
+ * @alpha: Alpha, range 0..256.
+ *
+ * Affine transform the source image stored in @src, compositing over
+ * the area of destination image @dst specified by the rectangle
+ * (@x0, @y0) - (@x1, @y1). As usual in libart, the left and top edges
+ * of this rectangle are included, and the right and bottom edges are
+ * excluded.
+ *
+ * The @alphagamma parameter specifies that the alpha compositing be done
+ * in a gamma-corrected color space. Since the source image is opaque RGB,
+ * this argument only affects the edges. In the current implementation,
+ * it is ignored.
+ *
+ * The @level parameter specifies the speed/quality tradeoff of the
+ * image interpolation. Currently, only ART_FILTER_NEAREST is
+ * implemented.
+ *
+ * KSVG additions : we have changed this function to support an alpha level as well.
+* also we made sure compositing an rgba image over an rgb buffer works.
+**/
+ void ksvg_art_rgb_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ ArtFilterLevel level,
+ ArtAlphaGamma *alphagamma,
+ int alpha)
+{
+ /* Note: this is a slow implementation, and is missing all filter
+ levels other than NEAREST. It is here for clarity of presentation
+ and to establish the interface. */
+ int x, y;
+ double inv[6];
+ art_u8 *dst_p, *dst_linestart;
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int run_x0, run_x1;
+
+ dst_linestart = dst;
+ art_affine_invert (inv, affine);
+
+ if(alpha == 255)
+ for (y = y0; y < y1; y++)
+ {
+ pt.y = y + 0.5;
+ run_x0 = x0;
+ run_x1 = x1;
+ ksvg_art_rgb_affine_run (&run_x0, &run_x1, y, src_width, src_height,
+ inv);
+ dst_p = dst_linestart + (run_x0 - x0) * 3;
+ for (x = run_x0; x < run_x1; x++)
+ {
+ pt.x = x + 0.5;
+ art_affine_point (&src_pt, &pt, inv);
+ src_x = floor (src_pt.x);
+ src_y = floor (src_pt.y);
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+ dst_p[0] = dst_p[0] + (((src_p[2] - dst_p[0]) * src_p[3] + 0x80) >> 8);
+ dst_p[1] = dst_p[1] + (((src_p[1] - dst_p[1]) * src_p[3] + 0x80) >> 8);
+ dst_p[2] = dst_p[2] + (((src_p[0] - dst_p[2]) * src_p[3] + 0x80) >> 8);
+ dst_p += 3;
+ }
+ dst_linestart += dst_rowstride;
+ }
+ else
+ for (y = y0; y < y1; y++)
+ {
+ pt.y = y + 0.5;
+ run_x0 = x0;
+ run_x1 = x1;
+ ksvg_art_rgb_affine_run (&run_x0, &run_x1, y, src_width, src_height,
+ inv);
+ dst_p = dst_linestart + (run_x0 - x0) * 3;
+ for (x = run_x0; x < run_x1; x++)
+ {
+ pt.x = x + 0.5;
+ art_affine_point (&src_pt, &pt, inv);
+ src_x = floor (src_pt.x);
+ src_y = floor (src_pt.y);
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+ dst_p[0] = dst_p[0] + (((src_p[2] - dst_p[0]) * alpha + 0x80) >> 8);
+ dst_p[1] = dst_p[1] + (((src_p[1] - dst_p[1]) * alpha + 0x80) >> 8);
+ dst_p[2] = dst_p[2] + (((src_p[0] - dst_p[2]) * alpha + 0x80) >> 8);
+ dst_p += 3;
+ }
+ dst_linestart += dst_rowstride;
+ }
+}
+
+
+typedef struct _ksvgArtRgbAffineClipAlphaData ksvgArtRgbAffineClipAlphaData;
+
+struct _ksvgArtRgbAffineClipAlphaData
+{
+ int alphatab[256];
+ art_u8 alpha;
+ art_u8 *dst;
+ int dst_rowstride;
+ int x0, x1;
+ double inv[6];
+ const art_u8 *src;
+ int src_width;
+ int src_height;
+ int src_rowstride;
+ const art_u8 *mask;
+ int y0;
+};
+
+static
+void ksvg_art_rgb_affine_clip_run(art_u8 *dst_p, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ pt.y = y;
+
+ for(x = x0; x < x1; x++)
+ {
+ pt.x = x;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)(src_pt.x);
+ src_y = (int)(src_pt.y);
+
+ if(src_x >= 0 && src_x < src_width && src_y >= 0 && src_y < src_height)
+ {
+ int s;
+ int d;
+ int tmp;
+ int srcAlpha;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ srcAlpha = alpha * src_p[3] + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ d = *dst_p;
+ s = src_p[2];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[1];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[0];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+ }
+ else
+ dst_p += 3;
+ }
+}
+
+static void
+ksvg_art_rgb_affine_clip_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_run(linebuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_run(linebuf + (run_x0 - x0) * 3, run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_run(linebuf + (run_x1 - x0) * 3, run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_run(linebuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgb_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ pt.y = y;
+
+ for(x = x0; x < x1; x++)
+ {
+ pt.x = x;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)(src_pt.x);
+ src_y = (int)(src_pt.y);
+
+ if(src_x >= 0 && src_x < src_width && src_y >= 0 && src_y < src_height)
+ {
+ int s;
+ int d;
+ int tmp;
+ int srcAlpha;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ srcAlpha = alpha * src_p[3] + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ srcAlpha = (srcAlpha * *mask++) + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ d = *dst_p;
+ s = src_p[2];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[1];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[0];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+ }
+ else
+ {
+ dst_p += 3;
+ mask++;
+ }
+ }
+}
+
+static void
+ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+ const art_u8 *maskbuf;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+ maskbuf = data->mask + (y - data->y0) * (x1 - x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgba_affine_clip_run(art_u8 *dst_p, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ pt.y = y;
+
+ for(x = x0; x < x1; x++)
+ {
+ pt.x = x;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)(src_pt.x);
+ src_y = (int)(src_pt.y);
+
+ if(src_x >= 0 && src_x < src_width && src_y >= 0 && src_y < src_height)
+ {
+ int s;
+ int d;
+ int tmp;
+ int srcAlpha;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ srcAlpha = alpha * src_p[3] + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ d = *dst_p;
+ s = src_p[2];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[1];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[0];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+
+ tmp = srcAlpha * (255 - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+ }
+ else
+ dst_p += 4;
+ }
+}
+
+static void
+ksvg_art_rgba_affine_clip_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_run(linebuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_run(linebuf + (run_x0 - x0) * 4, run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_run(linebuf + (run_x1 - x0) * 4, run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_run(linebuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgba_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ pt.y = y;
+
+ for(x = x0; x < x1; x++)
+ {
+ pt.x = x;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)(src_pt.x);
+ src_y = (int)(src_pt.y);
+
+ if(src_x >= 0 && src_x < src_width && src_y >= 0 && src_y < src_height)
+ {
+ int s;
+ int d;
+ int tmp;
+ int srcAlpha;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ srcAlpha = alpha * src_p[3] + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ srcAlpha = (srcAlpha * *mask++) + 0x80;
+ srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8;
+
+ d = *dst_p;
+ s = src_p[2];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[1];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+ s = src_p[0];
+
+ tmp = srcAlpha * (s - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+
+ d = *dst_p;
+
+ tmp = srcAlpha * (255 - d) + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ *dst_p++ = d + tmp;
+ }
+ else
+ {
+ dst_p += 4;
+ mask++;
+ }
+ }
+}
+
+static void
+ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+ const art_u8 *maskbuf;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+ maskbuf = data->mask + (y - data->y0) * (x1 - x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+/**
+ * ksvg_art_rgb_affine_clip: Affine transform source RGB image and composite, with clipping path.
+ * @svp: Clipping path.
+ * @dst: Destination image RGB buffer.
+ * @x0: Left coordinate of destination rectangle.
+ * @y0: Top coordinate of destination rectangle.
+ * @x1: Right coordinate of destination rectangle.
+ * @y1: Bottom coordinate of destination rectangle.
+ * @dst_rowstride: Rowstride of @dst buffer.
+ * @src: Source image RGB buffer.
+ * @src_width: Width of source image.
+ * @src_height: Height of source image.
+ * @src_rowstride: Rowstride of @src buffer.
+ * @affine: Affine transform.
+ * @level: Filter level.
+ * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
+ * @alpha: Alpha, range 0..256.
+ *
+ * Affine transform the source image stored in @src, compositing over
+ * the area of destination image @dst specified by the rectangle
+ * (@x0, @y0) - (@x1, @y1). As usual in libart, the left and top edges
+ * of this rectangle are included, and the right and bottom edges are
+ * excluded.
+ *
+ * The @alphagamma parameter specifies that the alpha compositing be done
+ * in a gamma-corrected color space. Since the source image is opaque RGB,
+ * this argument only affects the edges. In the current implementation,
+ * it is ignored.
+ *
+ * The @level parameter specifies the speed/quality tradeoff of the
+ * image interpolation. Currently, only ART_FILTER_NEAREST is
+ * implemented.
+ *
+ * KSVG additions : we have changed this function to support an alpha level as well.
+* also we made sure compositing an rgba image over an rgb buffer works.
+**/
+void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, int dst_channels,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ int alpha, const art_u8 *mask)
+{
+ ksvgArtRgbAffineClipAlphaData data;
+ int i;
+ int a, da;
+
+ data.alpha = alpha;
+
+ a = 0x8000;
+ da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */
+
+ for(i = 0; i < 256; i++)
+ {
+ data.alphatab[i] = a >> 16;
+ a += da;
+ }
+
+ data.dst = dst;
+ data.dst_rowstride = dst_rowstride;
+ data.x0 = x0;
+ data.x1 = x1;
+ data.y0 = y0;
+ data.mask = mask;
+
+ art_affine_invert(data.inv, affine);
+
+ data.src = src;
+ data.src_width = src_width;
+ data.src_height = src_height;
+ data.src_rowstride = src_rowstride;
+
+ if(dst_channels == 3)
+ {
+ if(mask)
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_mask_callback, &data);
+ else
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_callback, &data);
+ }
+ else
+ {
+ if(mask)
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_mask_callback, &data);
+ else
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_callback, &data);
+ }
+}
+
+
+static
+void ksvg_art_rgb_texture_run(art_u8 *dst_p, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+ int srcAlpha;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ /* TODO: optimise and filter? */
+ pt.y = y + 0.5;
+
+ for(x = x0; x < x1; x++)
+ {
+ int s;
+ int d;
+ int tmp;
+ int tmp2;
+
+ pt.x = x + 0.5;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)floor(src_pt.x);
+ src_y = (int)floor(src_pt.y);
+
+ if(src_x < 0)
+ {
+ /* Can't assume % behaviour with negative values */
+ src_x += ((src_x / -src_width) + 1) * src_width;
+ }
+
+ if(src_y < 0)
+ {
+ src_y += ((src_y / -src_height) + 1) * src_height;
+ }
+
+ src_x %= src_width;
+ src_y %= src_height;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ /* Pattern source is in RGBA format, premultiplied.
+ * alpha represents fill/stroke/group opacity.
+ *
+ * Multiply source alpha by 'alpha' then composite over.
+ * For each channel, d = d + alpha * (s - srcAlpha * d).
+ */
+
+ srcAlpha = src_p[3];
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+ }
+}
+
+static void
+ksvg_art_rgb_texture_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_run(linebuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_run(linebuf + (run_x0 - x0) * 3, run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_run(linebuf + (run_x1 - x0) * 3, run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_run(linebuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgb_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+ int srcAlpha;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ /* TODO: optimise and filter? */
+ pt.y = y + 0.5;
+
+ for(x = x0; x < x1; x++)
+ {
+ int s;
+ int d;
+ int am;
+ int tmp;
+ int tmp2;
+
+ pt.x = x + 0.5;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)floor(src_pt.x);
+ src_y = (int)floor(src_pt.y);
+
+ if(src_x < 0)
+ {
+ /* Can't assume % behaviour with negative values */
+ src_x += ((src_x / -src_width) + 1) * src_width;
+ }
+
+ if(src_y < 0)
+ {
+ src_y += ((src_y / -src_height) + 1) * src_height;
+ }
+
+ src_x %= src_width;
+ src_y %= src_height;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ /* Pattern source is in RGBA format, premultiplied.
+ * alpha represents fill/stroke/group opacity.
+ *
+ * Multiply source alpha by 'alpha' and mask value then composite over.
+ * For each channel, d = d + alpha * mask * (s - srcAlpha * d).
+ */
+
+ am = (alpha * *mask++) + 0x80;
+ am = (am + (am >> 8)) >> 8;
+
+ srcAlpha = src_p[3];
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+ }
+}
+
+static void
+ksvg_art_rgb_texture_mask_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+ const art_u8 *maskbuf;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ maskbuf = data->mask + (y - data->y0) * (x1 - x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgba_texture_run(art_u8 *dst_p, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+ int srcAlpha;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ /* TODO: optimise and filter? */
+ pt.y = y + 0.5;
+
+ for(x = x0; x < x1; x++)
+ {
+ int s;
+ int d;
+ int tmp;
+ int tmp2;
+
+ pt.x = x + 0.5;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)floor(src_pt.x);
+ src_y = (int)floor(src_pt.y);
+
+ if(src_x < 0)
+ {
+ /* Can't assume % behaviour with negative values */
+ src_x += ((src_x / -src_width) + 1) * src_width;
+ }
+
+ if(src_y < 0)
+ {
+ src_y += ((src_y / -src_height) + 1) * src_height;
+ }
+
+ src_x %= src_width;
+ src_y %= src_height;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ /* Pattern source is in RGBA format, premultiplied.
+ * alpha represents fill/stroke/group opacity.
+ *
+ * Multiply source alpha by 'alpha' then composite over.
+ * For each colour channel, d = d + alpha * (s - srcAlpha * d).
+ */
+
+ srcAlpha = src_p[3];
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = alpha * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ /* dstAlpha = dstAlpha + srcAlpha * alpha * (1 - dstAlpha) */
+ d = *dst_p;
+
+ tmp = srcAlpha * alpha + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = tmp * (255 - d) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+ src_p++;
+ }
+}
+
+static void
+ksvg_art_rgba_texture_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_run(linebuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_run(linebuf + (run_x0 - x0) * 4, run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_run(linebuf + (run_x1 - x0) * 4, run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_run(linebuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+static
+void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6],
+ int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height)
+{
+ const art_u8 *src_p;
+ ArtPoint pt, src_pt;
+ int src_x, src_y;
+ int x;
+ int srcAlpha;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ /* TODO: optimise and filter? */
+ pt.y = y + 0.5;
+
+ for(x = x0; x < x1; x++)
+ {
+ int s;
+ int d;
+ int am;
+ int tmp;
+ int tmp2;
+
+ pt.x = x + 0.5;
+
+ art_affine_point(&src_pt, &pt, inv);
+
+ src_x = (int)floor(src_pt.x);
+ src_y = (int)floor(src_pt.y);
+
+ if(src_x < 0)
+ {
+ /* Can't assume % behaviour with negative values */
+ src_x += ((src_x / -src_width) + 1) * src_width;
+ }
+
+ if(src_y < 0)
+ {
+ src_y += ((src_y / -src_height) + 1) * src_height;
+ }
+
+ src_x %= src_width;
+ src_y %= src_height;
+
+ src_p = src + (src_y * src_rowstride) + src_x * 4;
+
+ /* Pattern source is in RGBA format, premultiplied.
+ * alpha represents fill/stroke/group opacity.
+ *
+ * Multiply source alpha by 'alpha' and mask value then composite over.
+ * For each channel, d = d + alpha * mask * (s - srcAlpha * d).
+ */
+
+ am = (alpha * *mask++) + 0x80;
+ am = (am + (am >> 8)) >> 8;
+
+ srcAlpha = src_p[3];
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ d = *dst_p;
+ s = *src_p++;
+
+ tmp = srcAlpha * d + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = am * (s - tmp) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+
+ /* dstAlpha = dstAlpha + srcAlpha * alpha * mask * (1 - dstAlpha) */
+ d = *dst_p;
+
+ tmp = srcAlpha * am + 0x80;
+ tmp = (tmp + (tmp >> 8)) >> 8;
+
+ tmp2 = tmp * (255 - d) + 0x80;
+ tmp2 = (tmp2 + (tmp2 >> 8)) >> 8;
+
+ *dst_p++ = d + tmp2;
+ src_p++;
+ }
+}
+
+static void
+ksvg_art_rgba_texture_mask_callback (void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ int *alphatab;
+ int alpha;
+ const art_u8 *maskbuf;
+
+ linebuf = data->dst;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ alphatab = data->alphatab;
+
+ maskbuf = data->mask + (y - data->y0) * (x1 - x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height);
+ }
+
+ data->dst += data->dst_rowstride;
+}
+
+/**
+ * ksvg_art_rgb_texture: Affine transform source RGB image and composite, with clipping path.
+ * @svp: Clipping path.
+ * @dst: Destination image RGB buffer.
+ * @x0: Left coordinate of destination rectangle.
+ * @y0: Top coordinate of destination rectangle.
+ * @x1: Right coordinate of destination rectangle.
+ * @y1: Bottom coordinate of destination rectangle.
+ * @dst_rowstride: Rowstride of @dst buffer.
+ * @src: Source image RGB buffer.
+ * @src_width: Width of source image.
+ * @src_height: Height of source image.
+ * @src_rowstride: Rowstride of @src buffer.
+ * @affine: Affine transform.
+ * @level: Filter level.
+ * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
+ * @alpha: Alpha, range 0..256.
+ *
+ * Affine transform the source image stored in @src, compositing over
+ * the area of destination image @dst specified by the rectangle
+ * (@x0, @y0) - (@x1, @y1). As usual in libart, the left and top edges
+ * of this rectangle are included, and the right and bottom edges are
+ * excluded.
+ *
+ * The @alphagamma parameter specifies that the alpha compositing be done
+ * in a gamma-corrected color space. Since the source image is opaque RGB,
+ * this argument only affects the edges. In the current implementation,
+ * it is ignored.
+ *
+ * The @level parameter specifies the speed/quality tradeoff of the
+ * image interpolation. Currently, only ART_FILTER_NEAREST is
+ * implemented.
+ *
+ * KSVG additions : we have changed this function to support an alpha level as well.
+* also we made sure compositing an rgba image over an rgb buffer works.
+**/
+void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride,
+ int dst_channels,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ ArtFilterLevel level,
+ ArtAlphaGamma *alphaGamma,
+ int alpha,
+ const art_u8 *mask)
+{
+ ksvgArtRgbAffineClipAlphaData data;
+ int i;
+ int a, da;
+
+ data.alpha = alpha;
+
+ a = 0x8000;
+ da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */
+
+ for(i = 0; i < 256; i++)
+ {
+ data.alphatab[i] = a >> 16;
+ a += da;
+ }
+
+ data.dst = dst;
+ data.dst_rowstride = dst_rowstride;
+ data.x0 = x0;
+ data.x1 = x1;
+
+ data.inv[0] = affine[0];
+ data.inv[1] = affine[1];
+ data.inv[2] = affine[2];
+ data.inv[3] = affine[3];
+ data.inv[4] = affine[4];
+ data.inv[5] = affine[5];
+
+ data.src = src;
+ data.src_width = src_width;
+ data.src_height = src_height;
+ data.src_rowstride = src_rowstride;
+
+ data.mask = mask;
+ data.y0 = y0;
+
+ if(mask)
+ {
+ if(dst_channels == 3)
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_mask_callback, &data);
+ else
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_mask_callback, &data);
+ }
+ else
+ {
+ if(dst_channels == 3)
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_callback, &data);
+ else
+ art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_callback, &data);
+ }
+}
+
+/**
+ * ksvg_art_svp_move: moves an svp relatively to the current position.
+ * @svp: SVP to move.
+ * @dx: relative amount to move horizontally.
+ * @dy: relative amount to move vertically.
+ *
+ * Note : this function always moves the svp, not taking into account render buffer
+ * boundaries.
+ **/
+void ksvg_art_svp_move(ArtSVP *svp, int dx, int dy)
+{
+ int i, j;
+ ArtSVPSeg *seg;
+
+ if(dx == 0 && dy == 0) return;
+ for(i = 0;i < svp->n_segs;i++)
+ {
+ seg = &svp->segs[i];
+ for(j = 0;j < seg->n_points;j++)
+ {
+ seg->points[j].x += dx;
+ seg->points[j].y += dy;
+ }
+ seg->bbox.x0 += dx;
+ seg->bbox.y0 += dy;
+ seg->bbox.x1 += dx;
+ seg->bbox.y1 += dy;
+ }
+}
+
diff --git a/ksvg/impl/libs/art_support/art_misc.h b/ksvg/impl/libs/art_support/art_misc.h
new file mode 100644
index 00000000..52f09a63
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_misc.h
@@ -0,0 +1,79 @@
+/* Libart_LGPL - library of basic graphic primitives
+ * Copyright (C) 1998 Raph Levien
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __KSVG_ART_H__
+#define __KSVG_ART_H__
+
+#include <libart_lgpl/art_misc.h>
+#include <libart_lgpl/art_bpath.h>
+#include <libart_lgpl/art_vpath.h>
+#include <libart_lgpl/art_alphagamma.h>
+#include <libart_lgpl/art_filterlevel.h>
+#include <libart_lgpl/art_svp.h>
+
+#define ART_END2 10
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ void ksvg_art_vpath_render_bez (ArtVpath **p_vpath, int *pn, int *pn_max,
+ double x0, double y0,
+ double x1, double y1,
+ double x2, double y2,
+ double x3, double y3,
+ double flatness);
+
+ ArtVpath *ksvg_art_bez_path_to_vec(const ArtBpath *bez, double flatness);
+
+ void ksvg_art_rgb_affine_run (int *p_x0, int *p_x1, int y,
+ int src_width, int src_height,
+ const double affine[6]);
+
+ void ksvg_art_rgb_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ ArtFilterLevel level,
+ ArtAlphaGamma *alphagamma,
+ int alpha);
+
+ void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, int dst_channels,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ int alpha, const art_u8 *mask);
+
+ void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride,
+ int dst_channels,
+ const art_u8 *src,
+ int src_width, int src_height, int src_rowstride,
+ const double affine[6],
+ ArtFilterLevel level,
+ ArtAlphaGamma *alphaGamma,
+ int alpha,
+ const art_u8 *mask);
+
+ void ksvg_art_svp_move(ArtSVP *svp, int dx, int dy);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/ksvg/impl/libs/art_support/art_render_misc.c b/ksvg/impl/libs/art_support/art_render_misc.c
new file mode 100644
index 00000000..1603da1e
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_render_misc.c
@@ -0,0 +1,774 @@
+/* This file is part of the KDE project.
+ * art_render_misc.c: Here I store some routines I feel should be in libart :)
+ *
+ * Copyright (C) 2001-2003 KSVG Team
+ *
+ * This code is adapted from :
+ *
+ * art_render_gradient.c: Gradient image source for modular rendering.
+ *
+ * Libart_LGPL - library of basic graphic primitives
+ * Copyright (C) 2000 Raph Levien
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * Authors: Raph Levien <raph@acm.org>
+ * Alexander Larsson <alla@lysator.liu.se>
+ */
+
+#include "config.h"
+#include "art_render_misc.h"
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+/* These are in KSVGHelper.cpp */
+int linearRGBFromsRGB(int sRGB8bit);
+int sRGBFromLinearRGB(int linearRGB8bit);
+
+typedef struct _ArtImageSourceGradRad ArtImageSourceGradRad;
+
+struct _ArtImageSourceGradRad {
+ ArtImageSource super;
+ const ArtKSVGGradientRadial *gradient;
+ double a;
+};
+
+#define EPSILON 1e-6
+
+/**
+ * art_ksvg_render_gradient_setpix: Set a gradient pixel.
+ * @render: The render object.
+ * @dst: Pointer to destination (where to store pixel).
+ * @n_stops: Number of stops in @stops.
+ * @stops: The stops for the gradient.
+ * @offset: The offset.
+ *
+ * @n_stops must be > 0.
+ *
+ * Sets a gradient pixel, storing it at @dst.
+ **/
+static void
+art_ksvg_render_gradient_setpix (ArtRender *render,
+ art_u8 *dst,
+ int n_stops, ArtGradientStop *stops,
+ double offset, ArtKSVGGradientInterpolation interpolation)
+{
+ int ix;
+ int j;
+ double off0, off1;
+ int n_ch = render->n_chan + 1;
+
+ for (ix = 0; ix < n_stops; ix++)
+ if (stops[ix].offset > offset)
+ break;
+ /* stops[ix - 1].offset < offset < stops[ix].offset */
+ if (ix > 0 && ix < n_stops)
+ {
+ off0 = stops[ix - 1].offset;
+ off1 = stops[ix].offset;
+ if (fabs (off1 - off0) > EPSILON)
+ {
+ double interp;
+
+ interp = (offset - off0) / (off1 - off0);
+ if(interpolation == ART_KSVG_LINEARRGB_INTERPOLATION)
+ {
+ for (j = 0; j < n_ch; j++)
+ {
+ int z0, z1;
+ int z;
+ int z0_8bit, z0_linearRGB_8bit;
+ int z1_8bit, z1_linearRGB_8bit;
+ int z_8bit, z_sRGB_8bit;
+
+ /* Note: Using explicit variables for intermediate steps since */
+ /* the ART_PIX macros reference the argument more than once. */
+ z0 = stops[ix - 1].color[j];
+ z0_8bit = ART_PIX_8_FROM_MAX(z0);
+ z0_linearRGB_8bit = linearRGBFromsRGB(z0_8bit);
+ z0 = ART_PIX_MAX_FROM_8(z0_linearRGB_8bit);
+
+ z1 = stops[ix].color[j];
+ z1_8bit = ART_PIX_8_FROM_MAX(z1);
+ z1_linearRGB_8bit = linearRGBFromsRGB(z1_8bit);
+ z1 = ART_PIX_MAX_FROM_8(z1_linearRGB_8bit);
+
+ z = floor (z0 + (z1 - z0) * interp + 0.5);
+ z_8bit = ART_PIX_8_FROM_MAX(z);
+ z_sRGB_8bit = sRGBFromLinearRGB(z_8bit);
+
+ if (render->buf_depth == 8)
+ dst[j] = z_sRGB_8bit;
+ else /* (render->buf_depth == 16) */
+ ((art_u16 *)dst)[j] = ART_PIX_MAX_FROM_8(z_sRGB_8bit);
+ }
+ }
+ else
+ {
+ /* sRGB interpolation */
+ for (j = 0; j < n_ch; j++)
+ {
+ int z0, z1;
+ int z;
+ z0 = stops[ix - 1].color[j];
+ z1 = stops[ix].color[j];
+ z = floor (z0 + (z1 - z0) * interp + 0.5);
+ if (render->buf_depth == 8)
+ dst[j] = ART_PIX_8_FROM_MAX (z);
+ else /* (render->buf_depth == 16) */
+ ((art_u16 *)dst)[j] = z;
+ }
+ }
+ return;
+ }
+ }
+ else if (ix == n_stops)
+ ix--;
+
+ for (j = 0; j < n_ch; j++)
+ {
+ int z;
+ z = stops[ix].color[j];
+ if (render->buf_depth == 8)
+ dst[j] = ART_PIX_8_FROM_MAX (z);
+ else /* (render->buf_depth == 16) */
+ ((art_u16 *)dst)[j] = z;
+ }
+}
+
+static void
+art_ksvg_render_gradient_radial_done (ArtRenderCallback *self, ArtRender *render)
+{
+ art_free (self);
+}
+
+static void
+art_ksvg_render_gradient_radial_render (ArtRenderCallback *self, ArtRender *render,
+ art_u8 *dest, int y)
+{
+ ArtImageSourceGradRad *z = (ArtImageSourceGradRad *)self;
+ const ArtKSVGGradientRadial *gradient = z->gradient;
+ int pixstride = (render->n_chan + 1) * (render->depth >> 3);
+ int x;
+ int x0 = render->x0;
+ int width = render->x1 - x0;
+ int n_stops = gradient->n_stops;
+ ArtGradientStop *stops = gradient->stops;
+ art_u8 *bufp = render->image_buf;
+ double fx = gradient->fx;
+ double fy = gradient->fy;
+ double dx, dy;
+ double *affine = gradient->affine;
+ double aff0 = affine[0];
+ double aff1 = affine[1];
+ const double a = z->a;
+ const double arecip = 1.0 / a;
+ double b, db;
+ double c, dc, ddc;
+ double b_a, db_a;
+ double rad, drad, ddrad;
+ ArtGradientSpread spread = gradient->spread;
+
+ dx = x0 * aff0 + y * affine[2] + affine[4] - fx;
+ dy = x0 * aff1 + y * affine[3] + affine[5] - fy;
+ b = dx * fx + dy * fy;
+ db = aff0 * fx + aff1 * fy;
+ c = dx * dx + dy * dy;
+ dc = 2 * aff0 * dx + aff0 * aff0 + 2 * aff1 * dy + aff1 * aff1;
+ ddc = 2 * aff0 * aff0 + 2 * aff1 * aff1;
+
+ b_a = b * arecip;
+ db_a = db * arecip;
+
+ rad = b_a * b_a + c * arecip;
+ drad = 2 * b_a * db_a + db_a * db_a + dc * arecip;
+ ddrad = 2 * db_a * db_a + ddc * arecip;
+
+ for (x = 0; x < width; x++)
+ {
+ double z;
+
+ if (rad > 0)
+ z = b_a + sqrt (rad);
+ else
+ z = b_a;
+
+ if (spread == ART_GRADIENT_REPEAT)
+ z = z - floor (z);
+ else if (spread == ART_GRADIENT_REFLECT)
+ {
+ double tmp;
+
+ tmp = z - 2 * floor (0.5 * z);
+ z = tmp > 1 ? 2 - tmp : tmp;
+ }
+
+ art_ksvg_render_gradient_setpix (render, bufp, n_stops, stops, z, gradient->interpolation);
+ bufp += pixstride;
+ b_a += db_a;
+ rad += drad;
+ drad += ddrad;
+ }
+}
+
+static void
+art_ksvg_render_gradient_radial_negotiate (ArtImageSource *self, ArtRender *render,
+ ArtImageSourceFlags *p_flags,
+ int *p_buf_depth, ArtAlphaType *p_alpha)
+{
+ self->super.render = art_ksvg_render_gradient_radial_render;
+ *p_flags = 0;
+ *p_buf_depth = render->depth;
+ *p_alpha = ART_ALPHA_SEPARATE;
+}
+
+/**
+ * art_ksvg_render_gradient_radial: Add a radial gradient image source.
+ * @render: The render object.
+ * @gradient: The radial gradient.
+ *
+ * Adds the radial gradient @gradient as the image source for rendering
+ * in the render object @render.
+ **/
+void
+art_ksvg_render_gradient_radial (ArtRender *render,
+ const ArtKSVGGradientRadial *gradient,
+ ArtFilterLevel level)
+{
+ ArtImageSourceGradRad *image_source = art_new (ArtImageSourceGradRad, 1);
+ double fx = gradient->fx;
+ double fy = gradient->fy;
+
+ image_source->super.super.render = NULL;
+ image_source->super.super.done = art_ksvg_render_gradient_radial_done;
+ image_source->super.negotiate = art_ksvg_render_gradient_radial_negotiate;
+
+ image_source->gradient = gradient;
+ /* todo: sanitycheck fx, fy? */
+ image_source->a = 1 - fx * fx - fy * fy;
+
+ art_render_add_image_source (render, &image_source->super);
+}
+
+
+/* Hack to find out how to define alloca on different platforms.
+ * Modified version of glib/galloca.h.
+ */
+
+#ifdef __GNUC__
+/* GCC does the right thing */
+ #undef alloca
+ #define alloca(size) __builtin_alloca (size)
+#elif defined (HAVE_ALLOCA_H)
+/* a native and working alloca.h is there */
+ #include <alloca.h>
+#else /* !__GNUC__ && !HAVE_ALLOCA_H */
+ #ifdef _MSC_VER
+ #include <malloc.h>
+ #define alloca _alloca
+ #else /* !_MSC_VER */
+ #ifdef _AIX
+ #pragma alloca
+ #else /* !_AIX */
+ #ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+ #endif /* !alloca */
+ #endif /* !_AIX */
+ #endif /* !_MSC_VER */
+#endif /* !__GNUC__ && !HAVE_ALLOCA_H */
+
+#undef DEBUG_SPEW
+
+typedef struct _ArtImageSourceGradLin ArtImageSourceGradLin;
+
+/* The stops will be copied right after this structure */
+struct _ArtImageSourceGradLin
+{
+ ArtImageSource super;
+ ArtKSVGGradientLinear gradient;
+ ArtGradientStop stops[1];
+};
+
+#ifndef MAX
+ #define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif /* MAX */
+
+#ifndef MIN
+ #define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif /* MIN */
+
+static void
+art_ksvg_rgba_gradient_run (art_u8 *buf,
+ art_u8 *color1,
+ art_u8 *color2,
+ int len)
+{
+ int i;
+ int r, g, b, a;
+ int dr, dg, db, da;
+
+#ifdef DEBUG_SPEW
+ printf ("gradient run from %3d %3d %3d %3d to %3d %3d %3d %3d in %d pixels\n",
+ color1[0], color1[1], color1[2], color1[3],
+ color2[0], color2[1], color2[2], color2[3],
+ len);
+#endif
+
+ r = (color1[0] << 16) + 0x8000;
+ g = (color1[1] << 16) + 0x8000;
+ b = (color1[2] << 16) + 0x8000;
+ a = (color1[3] << 16) + 0x8000;
+ dr = ((color2[0] - color1[0]) << 16) / len;
+ dg = ((color2[1] - color1[1]) << 16) / len;
+ db = ((color2[2] - color1[2]) << 16) / len;
+ da = ((color2[3] - color1[3]) << 16) / len;
+
+ for(i = 0; i < len; i++)
+ {
+ *buf++ = (r>>16);
+ *buf++ = (g>>16);
+ *buf++ = (b>>16);
+ *buf++ = (a>>16);
+
+ r += dr;
+ g += dg;
+ b += db;
+ a += da;
+ }
+}
+
+static void
+ksvg_calc_color_at (ArtGradientStop *stops,
+ int n_stops,
+ ArtGradientSpread spread,
+ double offset,
+ double offset_fraction,
+ int favor_start,
+ int ix,
+ art_u8 *color)
+{
+ double off0, off1;
+ int j;
+
+ if(spread == ART_GRADIENT_PAD)
+ {
+ if(offset < EPSILON)
+ {
+ color[0] = ART_PIX_8_FROM_MAX (stops[0].color[0]);
+ color[1] = ART_PIX_8_FROM_MAX (stops[0].color[1]);
+ color[2] = ART_PIX_8_FROM_MAX (stops[0].color[2]);
+ color[3] = ART_PIX_8_FROM_MAX (stops[0].color[3]);
+ return;
+ }
+ if(offset >= 1.0 - EPSILON)
+ {
+ color[0] = ART_PIX_8_FROM_MAX (stops[n_stops-1].color[0]);
+ color[1] = ART_PIX_8_FROM_MAX (stops[n_stops-1].color[1]);
+ color[2] = ART_PIX_8_FROM_MAX (stops[n_stops-1].color[2]);
+ color[3] = ART_PIX_8_FROM_MAX (stops[n_stops-1].color[3]);
+ return;
+ }
+ }
+
+ if(ix > 0 && ix < n_stops)
+ {
+ off0 = stops[ix - 1].offset;
+ off1 = stops[ix].offset;
+ if(fabs (off1 - off0) > EPSILON)
+ {
+ double interp;
+ double o;
+ o = offset_fraction;
+
+ if((fabs (o) < EPSILON) && (!favor_start))
+ o = 1.0;
+ else if((fabs (o-1.0) < EPSILON) && (favor_start))
+ o = 0.0;
+
+ /*
+ if (offset_fraction == 0.0 && !favor_start)
+ offset_fraction = 1.0;
+ */
+
+ interp = (o - off0) / (off1 - off0);
+ for(j = 0; j < 4; j++)
+ {
+ int z0, z1;
+ int z;
+ z0 = stops[ix - 1].color[j];
+ z1 = stops[ix].color[j];
+ z = floor (z0 + (z1 - z0) * interp + 0.5);
+ color[j] = ART_PIX_8_FROM_MAX (z);
+ }
+ return;
+ }
+ /* If offsets are too close to safely do the division, just
+ pick the ix color. */
+ color[0] = ART_PIX_8_FROM_MAX (stops[ix].color[0]);
+ color[1] = ART_PIX_8_FROM_MAX (stops[ix].color[1]);
+ color[2] = ART_PIX_8_FROM_MAX (stops[ix].color[2]);
+ color[3] = ART_PIX_8_FROM_MAX (stops[ix].color[3]);
+ return;
+ }
+
+ /*printf ("WARNING! bad ix %d in calc_color_at() [internal error]\n", ix);
+ assert (0);*/
+}
+
+static void
+art_ksvg_render_gradient_linear_render_8 (ArtRenderCallback *self,
+ ArtRender *render,
+ art_u8 *dest, int y)
+{
+ ArtImageSourceGradLin *z = (ArtImageSourceGradLin *)self;
+ const ArtKSVGGradientLinear *gradient = &(z->gradient);
+ int i;
+ int width = render->x1 - render->x0;
+ int len;
+ double offset, d_offset;
+ double offset_fraction;
+ int next_stop;
+ int ix;
+ art_u8 color1[4], color2[4];
+ int n_stops = gradient->n_stops;
+ int extra_stops;
+ ArtGradientStop *stops = gradient->stops;
+ ArtGradientStop *tmp_stops;
+ art_u8 *bufp = render->image_buf;
+ ArtGradientSpread spread = gradient->spread;
+
+#ifdef DEBUG_SPEW
+ printf ("x1: %d, x2: %d, y: %d\n", render->x0, render->x1, y);
+ printf ("spread: %d, stops:", gradient->spread);
+ for(i=0;i<n_stops;i++)
+ {
+ printf ("%f, ", gradient->stops[i].offset);
+ }
+ printf ("\n");
+ printf ("a: %f, b: %f, c: %f\n", gradient->a, gradient->b, gradient->c);
+#endif
+
+ offset = render->x0 * gradient->affine[0] + y * gradient->affine[2] + gradient->affine[4];
+ d_offset = gradient->affine[0];
+
+ /* We need to force the gradient to extend the whole 0..1 segment,
+ because the rest of the code doesn't handle partial gradients
+ correctly */
+ if((gradient->stops[0].offset > EPSILON /* == 0.0 */) ||
+ (gradient->stops[n_stops-1].offset < (1.0 - EPSILON)))
+ {
+ extra_stops = 0;
+ tmp_stops = stops = alloca (sizeof (ArtGradientStop) * (n_stops + 2));
+ if(gradient->stops[0].offset > EPSILON /* 0.0 */)
+ {
+ memcpy (tmp_stops, gradient->stops, sizeof (ArtGradientStop));
+ tmp_stops[0].offset = 0.0;
+ tmp_stops += 1;
+ extra_stops++;
+ }
+ memcpy (tmp_stops, gradient->stops, sizeof (ArtGradientStop) * n_stops);
+ if(gradient->stops[n_stops-1].offset < (1.0 - EPSILON))
+ {
+ tmp_stops += n_stops;
+ memcpy (tmp_stops, &gradient->stops[n_stops-1], sizeof (ArtGradientStop));
+ tmp_stops[0].offset = 1.0;
+ extra_stops++;
+ }
+ n_stops += extra_stops;
+
+
+#ifdef DEBUG_SPEW
+ printf ("start/stop modified stops:");
+ for(i=0;i<n_stops;i++)
+ {
+ printf ("%f, ", stops[i].offset);
+ }
+ printf ("\n");
+#endif
+
+ }
+
+ if(spread == ART_GRADIENT_REFLECT)
+ {
+ tmp_stops = stops;
+ stops = alloca (sizeof (ArtGradientStop) * n_stops * 2);
+ memcpy (stops, tmp_stops, sizeof (ArtGradientStop) * n_stops);
+
+ for(i = 0; i< n_stops; i++)
+ {
+ stops[n_stops * 2 - 1 - i].offset = (1.0 - stops[i].offset / 2.0);
+ memcpy (stops[n_stops * 2 - 1 - i].color, stops[i].color, sizeof (stops[i].color));
+ stops[i].offset = stops[i].offset / 2.0;
+ }
+
+ spread = ART_GRADIENT_REPEAT;
+ offset = offset / 2.0;
+ d_offset = d_offset / 2.0;
+
+ n_stops = 2 * n_stops;
+
+#ifdef DEBUG_SPEW
+ printf ("reflect modified stops:");
+ for(i=0;i<n_stops;i++)
+ {
+ printf ("%f, ", stops[i].offset);
+ }
+ printf ("\n");
+#endif
+ }
+
+ offset_fraction = offset - floor (offset);
+#ifdef DEBUG_SPEW
+ printf ("inital offset: %f, fraction: %f d_offset: %f\n", offset, offset_fraction, d_offset);
+#endif
+ /* ix is selected so that offset_fraction is
+ stops[ix-1] <= offset_fraction <= stops[ix]
+ If offset_fraction is equal to one of the edges, ix
+ is selected so the the section of the line extending
+ in the same direction as d_offset is between ix-1 and ix.
+ */
+ for(ix = 0; ix < n_stops; ix++)
+ if(stops[ix].offset > offset_fraction ||
+ (d_offset < 0.0 && fabs (stops[ix].offset - offset_fraction) < EPSILON))
+ break;
+ if(ix == 0)
+ ix = n_stops - 1;
+ else if(ix == n_stops)
+ ix = n_stops - 1;
+
+#ifdef DEBUG_SPEW
+ printf ("Initial ix: %d\n", ix);
+#endif
+#if 0
+ assert (ix > 0);
+ assert (ix < n_stops);
+ assert ((stops[ix-1].offset <= offset_fraction + EPSILON) ||
+ ((stops[ix].offset > (1.0 - EPSILON)) && (offset_fraction < EPSILON /* == 0.0*/)));
+ /*assert (offset_fraction <= stops[ix].offset);*/
+ /* FIXME: These asserts may be broken, it is for now
+ safer to not use them. Should be fixed!
+ See bug #121850
+ assert ((offset_fraction != stops[ix-1].offset) ||
+ (d_offset >= 0.0));
+ assert ((offset_fraction != stops[ix].offset) ||
+ (d_offset <= 0.0));
+ */
+#endif
+ while(width > 0)
+ {
+#ifdef DEBUG_SPEW
+ printf ("ix: %d\n", ix);
+ printf ("start offset: %f\n", offset);
+#endif
+ ksvg_calc_color_at (stops, n_stops,
+ spread,
+ offset,
+ offset_fraction,
+ (d_offset > -EPSILON),
+ ix,
+ color1);
+
+ if(d_offset > 0)
+ next_stop = ix;
+ else
+ next_stop = ix-1;
+
+#ifdef DEBUG_SPEW
+ printf ("next_stop: %d\n", next_stop);
+#endif
+ if(fabs (d_offset) > EPSILON)
+ {
+ double o;
+ o = offset_fraction;
+
+ if((fabs (o) <= EPSILON) && (ix == n_stops - 1))
+ o = 1.0;
+ else if((fabs (o-1.0) <= EPSILON) && (ix == 1))
+ o = 0.0;
+
+#ifdef DEBUG_SPEW
+ printf ("o: %f\n", o);
+#endif
+ len = (int)floor (fabs ((stops[next_stop].offset - o) / d_offset)) + 1;
+ len = MAX (len, 0);
+ len = MIN (len, width);
+ }
+ else
+ {
+ len = width;
+ }
+#ifdef DEBUG_SPEW
+ printf ("len: %d\n", len);
+#endif
+ if(len > 0)
+ {
+ offset = offset + (len-1) * d_offset;
+ offset_fraction = offset - floor (offset);
+#ifdef DEBUG_SPEW
+ printf ("end offset: %f, fraction: %f\n", offset, offset_fraction);
+#endif
+ ksvg_calc_color_at (stops, n_stops,
+ spread,
+ offset,
+ offset_fraction,
+ (d_offset < EPSILON),
+ ix,
+ color2);
+
+ art_ksvg_rgba_gradient_run (bufp,
+ color1,
+ color2,
+ len);
+ offset += d_offset;
+ offset_fraction = offset - floor (offset);
+ }
+
+ if(d_offset > 0)
+ {
+ do
+ {
+ ix++;
+ if(ix == n_stops)
+ ix = 1;
+ /* Note: offset_fraction can actually be one here on x86 machines that
+ does calculations with extended precision, but later rounds to 64bit.
+ This happens if the 80bit offset_fraction is larger than the
+ largest 64bit double that is less than one.
+ */
+ }
+ while(!((stops[ix-1].offset <= offset_fraction &&
+ offset_fraction < stops[ix].offset) ||
+ (ix == 1 && offset_fraction > (1.0 - EPSILON))));
+ }
+ else
+ {
+ do
+ {
+ ix--;
+ if(ix == 0)
+ ix = n_stops - 1;
+ }
+ while(!((stops[ix-1].offset < offset_fraction &&
+ offset_fraction <= stops[ix].offset) ||
+ (ix == n_stops - 1 && offset_fraction < EPSILON /* == 0.0*/)));
+ }
+
+ bufp += 4*len;
+ width -= len;
+ }
+}
+
+static void
+art_ksvg_render_gradient_linear_done (ArtRenderCallback *self, ArtRender *render)
+{
+ art_free (self);
+}
+
+static void
+art_ksvg_render_gradient_linear_render (ArtRenderCallback *self, ArtRender *render,
+ art_u8 *dest, int y)
+{
+ ArtImageSourceGradLin *z = (ArtImageSourceGradLin *)self;
+ const ArtKSVGGradientLinear *gradient = &(z->gradient);
+ int pixstride = (render->n_chan + 1) * (render->depth >> 3);
+ int x;
+ int width = render->x1 - render->x0;
+ double offset, d_offset;
+ double actual_offset;
+ int n_stops = gradient->n_stops;
+ ArtGradientStop *stops = gradient->stops;
+ art_u8 *bufp = render->image_buf;
+ ArtGradientSpread spread = gradient->spread;
+
+ offset = render->x0 * gradient->affine[0] + y * gradient->affine[2] + gradient->affine[4];
+ d_offset = gradient->affine[0];
+
+ for(x = 0; x < width; x++)
+ {
+ if(spread == ART_GRADIENT_PAD)
+ actual_offset = offset;
+ else if(spread == ART_GRADIENT_REPEAT)
+ actual_offset = offset - floor (offset);
+ else /* (spread == ART_GRADIENT_REFLECT) */
+ {
+ double tmp;
+
+ tmp = offset - 2 * floor (0.5 * offset);
+ actual_offset = tmp > 1 ? 2 - tmp : tmp;
+ }
+ art_ksvg_render_gradient_setpix (render, bufp, n_stops, stops, actual_offset, gradient->interpolation);
+ offset += d_offset;
+ bufp += pixstride;
+ }
+}
+
+static void
+art_ksvg_render_gradient_linear_negotiate (ArtImageSource *self, ArtRender *render,
+ ArtImageSourceFlags *p_flags,
+ int *p_buf_depth, ArtAlphaType *p_alpha)
+{
+ ArtImageSourceGradLin *z = (ArtImageSourceGradLin *)self;
+
+ if(render->depth == 8 &&
+ render->n_chan == 3 &&
+ z->gradient.interpolation == ART_KSVG_SRGB_INTERPOLATION)
+ {
+ /* The optimised renderer doesn't support linearRGB interpolation at the moment */
+ /* so we only use it for sRGB, which is more common anyway. */
+ self->super.render = art_ksvg_render_gradient_linear_render_8;
+ *p_flags = 0;
+ *p_buf_depth = 8;
+ *p_alpha = ART_ALPHA_SEPARATE;
+ return;
+ }
+
+ self->super.render = art_ksvg_render_gradient_linear_render;
+ *p_flags = 0;
+ *p_buf_depth = render->depth;
+ *p_alpha = ART_ALPHA_SEPARATE;
+}
+
+/**
+ * art_render_gradient_linear: Add a linear gradient image source.
+ * @render: The render object.
+ * @gradient: The linear gradient.
+ *
+ * Adds the linear gradient @gradient as the image source for rendering
+ * in the render object @render.
+ **/
+void
+art_ksvg_render_gradient_linear (ArtRender *render,
+ const ArtKSVGGradientLinear *gradient,
+ ArtFilterLevel level)
+{
+ ArtImageSourceGradLin *image_source = art_alloc (sizeof (ArtImageSourceGradLin) +
+ sizeof (ArtGradientStop) * (gradient->n_stops - 1));
+
+ image_source->super.super.render = NULL;
+ image_source->super.super.done = art_ksvg_render_gradient_linear_done;
+ image_source->super.negotiate = art_ksvg_render_gradient_linear_negotiate;
+
+ /* copy the gradient into the structure */
+ image_source->gradient = *gradient;
+ image_source->gradient.stops = image_source->stops;
+ memcpy (image_source->gradient.stops, gradient->stops, sizeof (ArtGradientStop) * gradient->n_stops);
+
+ art_render_add_image_source (render, &image_source->super);
+}
+
diff --git a/ksvg/impl/libs/art_support/art_render_misc.h b/ksvg/impl/libs/art_support/art_render_misc.h
new file mode 100644
index 00000000..d1f3690b
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_render_misc.h
@@ -0,0 +1,90 @@
+/* This file is part of the KDE project.
+ * art_render_misc.c: Here I store some routines I feel should be in libart :)
+ *
+ * Copyright (C) 2001-2002 KSVG Team
+ *
+ * This code is adapted from :
+ *
+ * art_render_gradient.h: Gradient image source for modular rendering.
+ *
+ * Libart_LGPL - library of basic graphic primitives
+ * Copyright (C) 2000 Raph Levien
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ * Authors: Raph Levien <raph@acm.org>
+ * Alexander Larsson <alla@lysator.liu.se>
+ */
+
+#ifndef __ART_RENDER_MISC_H__
+#define __ART_RENDER_MISC_H__
+
+#ifdef LIBART_COMPILATION
+#include "art_filterlevel.h"
+#include "art_render.h"
+#include "art_render_gradient.h"
+#else
+#include <libart_lgpl/art_filterlevel.h>
+#include <libart_lgpl/art_render.h>
+#include <libart_lgpl/art_render_gradient.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef enum
+{
+ ART_KSVG_SRGB_INTERPOLATION,
+ ART_KSVG_LINEARRGB_INTERPOLATION
+} ArtKSVGGradientInterpolation;
+
+typedef struct _ArtKSVGGradientRadial ArtKSVGGradientRadial;
+
+struct _ArtKSVGGradientRadial {
+ double affine[6]; /* transforms user coordinates to unit circle */
+ double fx, fy; /* focal point in unit circle coords */
+ int n_stops;
+ ArtGradientSpread spread;
+ ArtGradientStop *stops;
+ ArtKSVGGradientInterpolation interpolation;
+};
+
+void
+art_ksvg_render_gradient_radial (ArtRender *render,
+ const ArtKSVGGradientRadial *gradient,
+ ArtFilterLevel level);
+
+typedef struct _ArtKSVGGradientLinear ArtKSVGGradientLinear;
+
+struct _ArtKSVGGradientLinear {
+ double affine[6]; /* transforms screen gradient vector to unit vector (1, 0) */
+ ArtGradientSpread spread;
+ int n_stops;
+ ArtGradientStop *stops;
+ ArtKSVGGradientInterpolation interpolation;
+};
+
+void
+art_ksvg_render_gradient_linear (ArtRender *render,
+ const ArtKSVGGradientLinear *gradient,
+ ArtFilterLevel level);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __ART_RENDER_MISC_H__ */
diff --git a/ksvg/impl/libs/art_support/art_rgba_svp.c b/ksvg/impl/libs/art_support/art_rgba_svp.c
new file mode 100644
index 00000000..47c7d924
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_rgba_svp.c
@@ -0,0 +1,659 @@
+/* Libart_LGPL - library of basic graphic primitives
+ * Copyright (C) 1998 Raph Levien
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/* Render a sorted vector path into an RGB buffer. */
+
+#include <X11/Xos.h>
+
+#include "art_rgba_svp.h"
+
+#include <libart_lgpl/art_svp.h>
+#include <libart_lgpl/art_svp_render_aa.h>
+#include <libart_lgpl/art_rgba.h>
+#include <libart_lgpl/art_rgb.h>
+
+/* RGBA renderers */
+
+typedef struct _ArtKSVGRgbaSVPAlphaData ArtKSVGRgbaSVPAlphaData;
+
+struct _ArtKSVGRgbaSVPAlphaData {
+ int alphatab[256];
+ art_u8 r, g, b, alpha;
+ art_u32 rgba;
+ art_u8 *buf;
+ art_u8 *mask;
+ int rowstride;
+ int x0, x1;
+ int y0;
+};
+
+/**
+ * art_rgba_fill_run: fill an RGBA buffer a solid RGB color.
+ * @buf: Buffer to fill.
+ * @r: Red, range 0..255.
+ * @g: Green, range 0..255.
+ * @b: Blue, range 0..255.
+ * @n: Number of RGB triples to fill.
+ *
+ * Fills a buffer with @n copies of the (@r, @g, @b) triple, solid
+ * alpha. Thus, locations @buf (inclusive) through @buf + 4 * @n
+ * (exclusive) are written.
+ **/
+static void
+art_ksvg_rgba_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n)
+{
+ int i;
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ art_u32 src_rgba;
+#else
+ art_u32 src_abgr;
+#endif
+
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ src_rgba = (r << 24) | (g << 16) | (b << 8) | 255;
+#else
+ src_abgr = (255 << 24) | (b << 16) | (g << 8) | r;
+#endif
+ for(i = 0; i < n; i++)
+ {
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ ((art_u32 *)buf)[i] = src_rgba;
+#else
+ ((art_u32 *)buf)[i] = src_abgr;
+#endif
+ }
+}
+
+/**
+ * art_rgba_run_alpha: Render semitransparent color over RGBA buffer.
+ * @buf: Buffer for rendering.
+ * @r: Red, range 0..255.
+ * @g: Green, range 0..255.
+ * @b: Blue, range 0..255.
+ * @alpha: Alpha, range 0..255.
+ * @n: Number of RGB triples to render.
+ *
+ * Renders a sequential run of solid (@r, @g, @b) color over @buf with
+ * opacity @alpha. Note that the range of @alpha is 0..255, in contrast
+ * to art_rgb_run_alpha, which has a range of 0..256.
+ **/
+static void
+art_ksvg_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n)
+{
+ int i;
+ int v;
+ int tmp;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ for(i = 0; i < n; i++)
+ {
+ v = *buf;
+ tmp = (r - v) * alpha + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (g - v) * alpha + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (b - v) * alpha + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (255 - alpha) * v + 0x80;
+ *buf++ = alpha + ((tmp + (tmp >> 8)) >> 8);
+ }
+}
+
+static void
+art_ksvg_rgba_mask_run_alpha (art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n)
+{
+ int i;
+ int v;
+ int am;
+ int tmp;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ for(i = 0; i < n; i++)
+ {
+ am = (alpha * *mask++) + 0x80;
+ am = (am + (am >> 8)) >> 8;
+
+ v = *buf;
+ tmp = (r - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (g - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (b - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (255 - am) * v + 0x80;
+ *buf++ = am + ((tmp + (tmp >> 8)) >> 8);
+ }
+}
+
+static void
+art_ksvg_rgba_svp_alpha_callback(void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ art_u8 r, g, b;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->buf;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ r = data->r;
+ g = data->g;
+ b = data->b;
+ alphatab = data->alphatab;
+
+ if (n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if (run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if (alpha)
+ art_ksvg_rgba_run_alpha (linebuf,
+ r, g, b, alphatab[alpha],
+ run_x1 - x0);
+ }
+
+ for (k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if (run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if (alpha)
+ art_ksvg_rgba_run_alpha (linebuf + (run_x0 - x0) * 4,
+ r, g, b, alphatab[alpha],
+ run_x1 - run_x0);
+ }
+ }
+ running_sum += steps[k].delta;
+ if (x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if (alpha)
+ art_ksvg_rgba_run_alpha (linebuf + (run_x1 - x0) * 4,
+ r, g, b, alphatab[alpha],
+ x1 - run_x1);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if (alpha)
+ art_ksvg_rgba_run_alpha (linebuf,
+ r, g, b, alphatab[alpha],
+ x1 - x0);
+ }
+
+ data->buf += data->rowstride;
+}
+
+static void
+art_ksvg_rgba_svp_alpha_opaque_callback(void *callback_data, int y,
+ int start,
+ ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ art_u8 r, g, b;
+ art_u32 rgba;
+ int *alphatab;
+ int alpha;
+
+ linebuf = data->buf;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ r = data->r;
+ g = data->g;
+ b = data->b;
+ rgba = data->rgba;
+ alphatab = data->alphatab;
+
+ if (n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if (run_x1 > x0)
+ {
+ alpha = running_sum >> 16;
+ if (alpha)
+ {
+ if (alpha >= 255)
+ art_ksvg_rgba_fill_run (linebuf,
+ r, g, b,
+ run_x1 - x0);
+ else
+ art_ksvg_rgba_run_alpha (linebuf,
+ r, g, b, alphatab[alpha],
+ run_x1 - x0);
+ }
+ }
+
+ for (k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if (run_x1 > run_x0)
+ {
+ alpha = running_sum >> 16;
+ if (alpha)
+ {
+ if (alpha >= 255)
+ art_ksvg_rgba_fill_run (linebuf + (run_x0 - x0) * 4,
+ r, g, b,
+ run_x1 - run_x0);
+ else
+ art_ksvg_rgba_run_alpha (linebuf + (run_x0 - x0) * 4,
+ r, g, b, alphatab[alpha],
+ run_x1 - run_x0);
+ }
+ }
+ }
+ running_sum += steps[k].delta;
+ if (x1 > run_x1)
+ {
+ alpha = running_sum >> 16;
+ if (alpha)
+ {
+ if (alpha >= 255)
+ art_ksvg_rgba_fill_run (linebuf + (run_x1 - x0) * 4,
+ r, g, b,
+ x1 - run_x1);
+ else
+ art_ksvg_rgba_run_alpha (linebuf + (run_x1 - x0) * 4,
+ r, g, b, alphatab[alpha],
+ x1 - run_x1);
+ }
+ }
+ }
+ else
+ {
+ alpha = running_sum >> 16;
+ if (alpha)
+ {
+ if (alpha >= 255)
+ art_ksvg_rgba_fill_run (linebuf,
+ r, g, b,
+ x1 - x0);
+ else
+ art_ksvg_rgba_run_alpha (linebuf,
+ r, g, b, alphatab[alpha],
+ x1 - x0);
+ }
+ }
+ data->buf += data->rowstride;
+}
+
+static void
+art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ art_u8 r, g, b;
+ int *alphatab;
+ int alpha;
+ art_u8 *maskbuf;
+
+ linebuf = data->buf;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ r = data->r;
+ g = data->g;
+ b = data->b;
+ alphatab = data->alphatab;
+
+ maskbuf = data->mask + (y - data->y0) * (data->x1 - data->x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf,
+ r, g, b, alphatab[alpha],
+ run_x1 - x0);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgba_mask_run_alpha (linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0),
+ r, g, b, alphatab[alpha],
+ run_x1 - run_x0);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgba_mask_run_alpha (linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0) ,
+ r, g, b, alphatab[alpha],
+ x1 - run_x1);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf,
+ r, g, b, alphatab[alpha],
+ x1 - x0);
+ }
+
+ data->buf += data->rowstride;
+}
+
+/**
+ * art_rgb_svp_alpha: Alpha-composite sorted vector path over RGB buffer.
+ * @svp: The source sorted vector path.
+ * @x0: Left coordinate of destination rectangle.
+ * @y0: Top coordinate of destination rectangle.
+ * @x1: Right coordinate of destination rectangle.
+ * @y1: Bottom coordinate of destination rectangle.
+ * @rgba: Color in 0xRRGGBBAA format.
+ * @buf: Destination RGB buffer.
+ * @rowstride: Rowstride of @buf buffer.
+ * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
+ *
+ * Renders the shape specified with @svp over the @buf RGB buffer.
+ * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
+ * of the rectangle rendered. The new pixels are stored starting at
+ * the first byte of @buf. Thus, the @x0 and @y0 parameters specify
+ * an offset within @svp, and may be tweaked as a way of doing
+ * integer-pixel translations without fiddling with @svp itself.
+ *
+ * The @rgba argument specifies the color for the rendering. Pixels of
+ * entirely 0 winding number are left untouched. Pixels of entirely
+ * 1 winding number have the color @rgba composited over them (ie,
+ * are replaced by the red, green, blue components of @rgba if the alpha
+ * component is 0xff). Pixels of intermediate coverage are interpolated
+ * according to the rule in @alphagamma, or default to linear if
+ * @alphagamma is NULL.
+ **/
+void
+art_ksvg_rgba_svp_alpha(const ArtSVP *svp,
+ int x0, int y0, int x1, int y1,
+ art_u32 rgba,
+ art_u8 *buf, int rowstride,
+ ArtAlphaGamma *alphagamma,
+ art_u8 *mask)
+{
+ ArtKSVGRgbaSVPAlphaData data;
+ int r, g, b;
+ int i;
+ int a, da;
+ int alpha;
+
+ r = (rgba >> 24) & 0xff;
+ g = (rgba >> 16) & 0xff;
+ b = (rgba >> 8) & 0xff;
+ alpha = rgba & 0xff;
+
+ data.r = r;
+ data.g = g;
+ data.b = b;
+ data.alpha = alpha;
+ data.rgba = rgba;
+ data.mask = mask;
+
+ a = 0x8000;
+ da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */
+
+ for (i = 0; i < 256; i++)
+ {
+ data.alphatab[i] = a >> 16;
+ a += da;
+ }
+
+ data.buf = buf;
+ data.rowstride = rowstride;
+ data.x0 = x0;
+ data.x1 = x1;
+ data.y0 = y0;
+
+ if(mask)
+ art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_mask_callback, &data);
+ else
+ {
+ if (alpha == 255)
+ art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_opaque_callback, &data);
+ else
+ art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_callback, &data);
+ }
+}
+
+/* RGB renderers */
+
+static void
+art_ksvg_rgb_mask_run_alpha(art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n)
+{
+ int i;
+ int v;
+ int am;
+ int tmp;
+
+ if(alpha > 255)
+ alpha = 255;
+
+ for(i = 0; i < n; i++)
+ {
+ am = (alpha * *mask++) + 0x80;
+ am = (am + (am >> 8)) >> 8;
+
+ v = *buf;
+ tmp = (r - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (g - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+
+ v = *buf;
+ tmp = (b - v) * am + 0x80;
+ *buf++ = v + ((tmp + (tmp >> 8)) >> 8);
+ }
+}
+
+static void
+art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y,
+ int start, ArtSVPRenderAAStep *steps, int n_steps)
+{
+ ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data;
+ art_u8 *linebuf;
+ int run_x0, run_x1;
+ art_u32 running_sum = start;
+ int x0, x1;
+ int k;
+ art_u8 r, g, b;
+ int *alphatab;
+ int alpha;
+ art_u8 *maskbuf;
+
+ linebuf = data->buf;
+ x0 = data->x0;
+ x1 = data->x1;
+
+ r = data->r;
+ g = data->g;
+ b = data->b;
+ alphatab = data->alphatab;
+
+ maskbuf = data->mask + (y - data->y0) * (data->x1 - data->x0);
+
+ if(n_steps > 0)
+ {
+ run_x1 = steps[0].x;
+ if(run_x1 > x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf,
+ r, g, b, alphatab[alpha],
+ run_x1 - x0);
+ }
+
+ for(k = 0; k < n_steps - 1; k++)
+ {
+ running_sum += steps[k].delta;
+ run_x0 = run_x1;
+ run_x1 = steps[k + 1].x;
+ if(run_x1 > run_x0)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgb_mask_run_alpha (linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0),
+ r, g, b, alphatab[alpha],
+ run_x1 - run_x0);
+ }
+ }
+ running_sum += steps[k].delta;
+ if(x1 > run_x1)
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgb_mask_run_alpha (linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0) ,
+ r, g, b, alphatab[alpha],
+ x1 - run_x1);
+ }
+ }
+ else
+ {
+ alpha = (running_sum >> 16) & 0xff;
+ if(alpha)
+ art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf,
+ r, g, b, alphatab[alpha],
+ x1 - x0);
+ }
+
+ data->buf += data->rowstride;
+}
+
+/**
+ * art_rgb_svp_alpha: Alpha-composite sorted vector path over RGB buffer.
+ * @svp: The source sorted vector path.
+ * @x0: Left coordinate of destination rectangle.
+ * @y0: Top coordinate of destination rectangle.
+ * @x1: Right coordinate of destination rectangle.
+ * @y1: Bottom coordinate of destination rectangle.
+ * @rgba: Color in 0xRRGGBBAA format.
+ * @buf: Destination RGB buffer.
+ * @rowstride: Rowstride of @buf buffer.
+ * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
+ *
+ * Renders the shape specified with @svp over the @buf RGB buffer.
+ * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
+ * of the rectangle rendered. The new pixels are stored starting at
+ * the first byte of @buf. Thus, the @x0 and @y0 parameters specify
+ * an offset within @svp, and may be tweaked as a way of doing
+ * integer-pixel translations without fiddling with @svp itself.
+ *
+ * The @rgba argument specifies the color for the rendering. Pixels of
+ * entirely 0 winding number are left untouched. Pixels of entirely
+ * 1 winding number have the color @rgba composited over them (ie,
+ * are replaced by the red, green, blue components of @rgba if the alpha
+ * component is 0xff). Pixels of intermediate coverage are interpolated
+ * according to the rule in @alphagamma, or default to linear if
+ * @alphagamma is NULL.
+ **/
+void
+art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp,
+ int x0, int y0, int x1, int y1,
+ art_u32 rgba,
+ art_u8 *buf, int rowstride,
+ ArtAlphaGamma *alphagamma,
+ art_u8 *mask)
+{
+ ArtKSVGRgbaSVPAlphaData data;
+ int r, g, b, alpha;
+ int i;
+ int a, da;
+
+ r = rgba >> 24;
+ g = (rgba >> 16) & 0xff;
+ b = (rgba >> 8) & 0xff;
+ alpha = rgba & 0xff;
+
+ data.r = r;
+ data.g = g;
+ data.b = b;
+ data.alpha = alpha;
+ data.mask = mask;
+
+ a = 0x8000;
+ da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */
+
+ for(i = 0; i < 256; i++)
+ {
+ data.alphatab[i] = a >> 16;
+ a += da;
+ }
+
+ data.buf = buf;
+ data.rowstride = rowstride;
+ data.x0 = x0;
+ data.x1 = x1;
+ data.y0 = y0;
+
+ art_svp_render_aa(svp, x0, y0, x1, y1, art_ksvg_rgb_svp_alpha_mask_callback, &data);
+}
+
diff --git a/ksvg/impl/libs/art_support/art_rgba_svp.h b/ksvg/impl/libs/art_support/art_rgba_svp.h
new file mode 100644
index 00000000..b59096d4
--- /dev/null
+++ b/ksvg/impl/libs/art_support/art_rgba_svp.h
@@ -0,0 +1,57 @@
+/* Libart_LGPL - library of basic graphic primitives
+ * Copyright (C) 1998 Raph Levien
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __ART_RGBA_SVP_H__
+#define __ART_RGBA_SVP_H__
+
+/* Render a sorted vector path into an RGB buffer. */
+
+#ifdef LIBART_COMPILATION
+#include "art_alphagamma.h"
+#include "art_svp.h"
+#else
+#include <libart_lgpl/art_alphagamma.h>
+#include <libart_lgpl/art_svp.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+void
+art_ksvg_rgba_svp_alpha(const ArtSVP *svp,
+ int x0, int y0, int x1, int y1,
+ art_u32 rgba,
+ art_u8 *buf, int rowstride,
+ ArtAlphaGamma *alphagamma,
+ art_u8 *mask);
+
+void
+art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp,
+ int x0, int y0, int x1, int y1,
+ art_u32 rgba,
+ art_u8 *buf, int rowstride,
+ ArtAlphaGamma *alphagamma,
+ art_u8 *mask);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __ART_RGB_SVP_H__ */
diff --git a/ksvg/impl/libs/libtext2path/AUTHORS b/ksvg/impl/libs/libtext2path/AUTHORS
new file mode 100644
index 00000000..efa499dd
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/AUTHORS
@@ -0,0 +1 @@
+Nikolas Zimmermann <wildfox@kde.org>
diff --git a/ksvg/impl/libs/libtext2path/COPYING b/ksvg/impl/libs/libtext2path/COPYING
new file mode 100644
index 00000000..0b84a43f
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ksvg/impl/libs/libtext2path/ChangeLog b/ksvg/impl/libs/libtext2path/ChangeLog
new file mode 100644
index 00000000..fad2a19b
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/ChangeLog
@@ -0,0 +1,2 @@
+Fri Jul 25 08:30:43 CEST 2003 - Nikolas Zimmermann <wildfox@kde.org>
+ o Initial Creation
diff --git a/ksvg/impl/libs/libtext2path/INSTALL b/ksvg/impl/libs/libtext2path/INSTALL
new file mode 100644
index 00000000..28fadaa7
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/INSTALL
@@ -0,0 +1,181 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/ksvg/impl/libs/libtext2path/Makefile.am b/ksvg/impl/libs/libtext2path/Makefile.am
new file mode 100644
index 00000000..c7f2f390
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = src
+DIST_SUBDIRS = src
+
+#pkgconfigdir = $(libdir)/pkgconfig
+#kgconfig_DATA = libtext2path-0.1.pc
+
+#EXTRA_DIST = autogen.sh
diff --git a/ksvg/impl/libs/libtext2path/NEWS b/ksvg/impl/libs/libtext2path/NEWS
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/NEWS
@@ -0,0 +1 @@
+
diff --git a/ksvg/impl/libs/libtext2path/README b/ksvg/impl/libs/libtext2path/README
new file mode 100644
index 00000000..b9493b88
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/README
@@ -0,0 +1,4 @@
+libtext2path v0.1
+Nikolas Zimmermann <wildfox@kde.org>
+----------------------------------------------------------------------
+TODO: Write documentation! :)
diff --git a/ksvg/impl/libs/libtext2path/VERSION b/ksvg/impl/libs/libtext2path/VERSION
new file mode 100644
index 00000000..6c2cb464
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/VERSION
@@ -0,0 +1 @@
+libtext2path-0.1
diff --git a/ksvg/impl/libs/libtext2path/configure.in.in b/ksvg/impl/libs/libtext2path/configure.in.in
new file mode 100644
index 00000000..2198ab52
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/configure.in.in
@@ -0,0 +1,41 @@
+#AC_INIT(src/Converter.h)
+#AM_CONFIG_HEADER(config.h)
+
+dnl -----------------------------------------------
+dnl Package name and version number (user defined)
+dnl -----------------------------------------------
+GENERIC_LIBRARY_NAME=libtext2path-0.1
+
+# release versioning
+GENERIC_MAJOR_VERSION=0
+GENERIC_MINOR_VERSION=1
+GENERIC_MICRO_VERSION=0
+
+# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION)
+GENERIC_API_VERSION=0.1
+AC_SUBST(GENERIC_API_VERSION)
+
+#shared library versioning
+GENERIC_LIBRARY_VERSION=0:1:0
+
+dnl --------------------------------
+dnl Package name and version number
+dnl --------------------------------
+AC_SUBST(GENERIC_LIBRARY_VERSION)
+
+AC_SUBST(GENERIC_LIBRARY_NAME)
+
+GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
+GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
+AC_SUBST(GENERIC_RELEASE)
+AC_SUBST(GENERIC_VERSION)
+
+
+dnl -----------------------------------------------
+dnl Checks for programs.
+dnl -----------------------------------------------
+
+dnl Check for fontconfig
+# PKG_CHECK_MODULES(DEPS, fontconfig >= 2.2.0)
+#AC_SUBST(DEPS_CFLAGS)
+#AC_SUBST(DEPS_LIBS)
diff --git a/ksvg/impl/libs/libtext2path/libtext2path.lsm b/ksvg/impl/libs/libtext2path/libtext2path.lsm
new file mode 100644
index 00000000..7407a0ff
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/libtext2path.lsm
@@ -0,0 +1,16 @@
+Begin4
+Title: libtext2path -- Some description
+Version: 0.1
+Entered-date: YYYY-MM-DD
+Description:
+Keywords: KDE3 Qt
+Author: Nikolas Zimmermann <wildfox@kde.org>
+Maintained-by: Nikolas Zimmermann <wildfox@kde.org>
+Home-page:
+Alternate-site:
+Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils
+ xxxxxx libtext2path-0.1.tar.gz
+ xxx libtext2path-0.1.lsm
+Platform: Linux. Needs KDE 2.x
+Copying-policy: GPL
+End
diff --git a/ksvg/impl/libs/libtext2path/libtext2path.pc.in b/ksvg/impl/libs/libtext2path/libtext2path.pc.in
new file mode 100644
index 00000000..1d4b4210
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/libtext2path.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libtext2path
+Description: Converts FreeType glyphs to bezier paths
+Version: @VERSION@
+Libs: -L${libdir} -ltext2path
+Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@ -I${libdir}/@GENERIC_LIBRARY_NAME@/include
+
diff --git a/ksvg/impl/libs/libtext2path/libtext2path.spec b/ksvg/impl/libs/libtext2path/libtext2path.spec
new file mode 100644
index 00000000..e0c217bd
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/libtext2path.spec
@@ -0,0 +1,41 @@
+%define distversion %( perl -e 'Creating /home/nikoz/Projects/libtext2path/libtext2path.spec...=\<\>;/(\d+)\.(\d)\.?(\d)?/; print "".(||0)' /etc/*-release)
+Name: libtext2path
+Summary: libtext2path -- Some description
+Version: 0.1
+Release: %{_vendor}_%{distversion}
+Copyright: GPL
+Group: X11/KDE/Utilities
+Source: ftp://ftp.kde.org/pub/kde/unstable/apps/utils/%{name}-%{version}.tar.gz
+Packager: Nikolas Zimmermann <wildfox@kde.org>
+BuildRoot: /tmp/%{name}-%{version}
+Prefix: /usr/kde/cvs
+
+%description
+A long description
+
+%prep
+rm -rf $RPM_BUILD_ROOT
+%setup -n %{name}-%{version}
+CFLAGS="" CXXFLAGS="" ./configure --disable-debug --enable-final --prefix=%{prefix}
+
+%build
+# Setup for parallel builds
+numprocs=1
+if [ "" = "0" ]; then
+ numprocs=1
+fi
+
+make -j
+
+%install
+make install-strip DESTDIR=$RPM_BUILD_ROOT
+
+cd
+find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > /%{name}-master.list
+find . -type f -o -type l | sed 's|^\.||' >> $RPM_BUILD_DIR/%{name}-master.list
+
+%clean
+rm -rf $RPM_BUILD_DIR/%{name}-%{version}
+rm -rf $RPM_BUILD_DIR/-master.list
+
+%files -f $RPM_BUILD_DIR/%{name}-master.list
diff --git a/ksvg/impl/libs/libtext2path/src/Affine.cpp b/ksvg/impl/libs/libtext2path/src/Affine.cpp
new file mode 100644
index 00000000..d06b53bc
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Affine.cpp
@@ -0,0 +1,174 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include "Point.h"
+#include "Affine.h"
+
+using namespace T2P;
+
+Affine::Affine()
+{
+ m_affine[0] = 1.0;
+ m_affine[1] = 0.0;
+ m_affine[2] = 0.0;
+ m_affine[3] = 1.0;
+ m_affine[4] = 0.0;
+ m_affine[5] = 0.0;
+}
+
+Affine::Affine(double affine[6])
+{
+ for(int i = 0; i < 6; i++)
+ m_affine[i] = affine[i];
+}
+
+Affine::Affine(const Affine &other)
+{
+ (*this) = other;
+}
+
+Affine::Affine(double m11, double m12, double m21, double m22, double dx, double dy)
+{
+ m_affine[0] = m11; m_affine[1] = m12; m_affine[2] = m21;
+ m_affine[3] = m22; m_affine[4] = dx; m_affine[5] = dy;
+}
+
+Affine::~Affine()
+{
+}
+
+Affine &Affine::operator*=(Affine &other)
+{
+ double d0 = m11() * other.m11() + m12() * other.m21();
+ double d1 = m11() * other.m12() + m12() * other.m22();
+ double d2 = m21() * other.m11() + m22() * other.m21();
+ double d3 = m21() * other.m12() + m22() * other.m22();
+ double d4 = dx() * other.m11() + dy() * other.m21() + other.dx();
+ double d5 = dx() * other.m12() + dy() * other.m22() + other.dy();
+
+ m_affine[0] = d0; m_affine[1] = d1; m_affine[2] = d2;
+ m_affine[3] = d3; m_affine[4] = d4; m_affine[5] = d5;
+
+ return *this;
+}
+
+Affine &Affine::operator=(const Affine &other)
+{
+ for(int i = 0; i < 6; i++)
+ m_affine[i] = other.m_affine[i];
+
+ return *this;
+}
+
+double &Affine::m11()
+{
+ return m_affine[0];
+}
+
+double &Affine::m12()
+{
+ return m_affine[1];
+}
+
+double &Affine::m21()
+{
+ return m_affine[2];
+}
+
+double &Affine::m22()
+{
+ return m_affine[3];
+}
+
+double &Affine::dx()
+{
+ return m_affine[4];
+}
+
+double &Affine::dy()
+{
+ return m_affine[5];
+}
+
+void Affine::scale(double s)
+{
+ scale(s, s);
+}
+
+void Affine::scale(double sx, double sy)
+{
+ m_affine[0] = sx;
+ m_affine[3] = sy;
+}
+
+void Affine::translate(const Point &point)
+{
+ m_affine[4] += point.x();
+ m_affine[5] += point.y();
+}
+
+void Affine::translate(double tx, double ty)
+{
+ m_affine[4] += tx * m_affine[0] + ty * m_affine[2];
+ m_affine[5] += tx * m_affine[1] + ty * m_affine[3];
+}
+
+void Affine::rotate(double angle)
+{
+ double sina = sin(angle);
+ double cosa = cos(angle);
+
+ double tm11 = cosa * m_affine[0] + sina * m_affine[2];
+ double tm12 = cosa * m_affine[1] + sina * m_affine[3];
+ double tm21 = -sina * m_affine[0] + cosa * m_affine[2];
+ double tm22 = -sina * m_affine[1] + cosa * m_affine[3];
+
+ m_affine[0] = tm11; m_affine[1] = tm12;
+ m_affine[2] = tm21; m_affine[3] = tm22;
+}
+
+void Affine::rotateAround(double angle, const Point &point)
+{
+ translate(point);
+ rotate(angle);
+ translate(point.invert());
+}
+
+void Affine::rotateAround(double angle, double cx, double cy)
+{
+ translate(-cx, -cy);
+ rotate(angle);
+ translate(cx, cy);
+}
+
+Point Affine::mapPoint(const Point &p) const
+{
+ return Point(p.x() * m_affine[0] + p.y() * m_affine[2] + m_affine[4],
+ p.x() * m_affine[1] + p.y() * m_affine[3] + m_affine[5]);
+}
+
+double *Affine::data()
+{
+ return m_affine;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Affine.h b/ksvg/impl/libs/libtext2path/src/Affine.h
new file mode 100644
index 00000000..c0f11e9b
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Affine.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_AFFINE_H
+#define T2P_AFFINE_H
+
+namespace T2P
+{
+ class Point;
+ class Affine
+ {
+ public:
+ Affine();
+ Affine(double affine[6]);
+ Affine(const Affine &other);
+ Affine(double m11, double m12, double m21, double m22, double dx, double dy);
+ ~Affine();
+
+ Affine &operator*=(Affine &other);
+ Affine &operator=(const Affine &other);
+
+ double &m11();
+ double &m12();
+ double &m21();
+ double &m22();
+ double &dx();
+ double &dy();
+
+ void scale(double s);
+ void scale(double sx, double sy);
+ void translate(const Point &point); // Assumes point is already transformed
+ void translate(double tx, double ty);
+
+ void rotate(double angle);
+ void rotateAround(double angle, const Point &point); // Assumes point is already transformed
+ void rotateAround(double angle, double cx, double cy);
+
+ Point mapPoint(const Point &p) const;
+
+ // Internal
+ double *data();
+
+ private:
+ double m_affine[6];
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/BezierPath.h b/ksvg/impl/libs/libtext2path/src/BezierPath.h
new file mode 100644
index 00000000..1c357abd
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/BezierPath.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_BEZIERPATH_H
+#define T2P_BEZIERPATH_H
+
+#include <list>
+
+namespace T2P
+{
+ class Point;
+ class BezierPath
+ {
+ public:
+ BezierPath() { }
+ virtual ~BezierPath() { }
+
+ /**
+ * Calculates the arclength from p0 to the point parametrized by 0 <= t <= 1.
+ */
+ virtual double length(double t = 1.0) = 0;
+
+ /**
+ * Calculates the point, the tangent vector and the normal vector for
+ * 0 <= t <= 1. The tangent vector and the normal vector are
+ * normalized (length=1).
+ */
+ virtual void pointTangentNormalAt(double t, Point *p = 0, Point *tn = 0, Point *n = 0) = 0;
+
+ /**
+ * Calculates the axis-aligned bounding box.
+ */
+ virtual void boundingBox(Point *topLeft, Point *bottomRight) = 0;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Cache.h b/ksvg/impl/libs/libtext2path/src/Cache.h
new file mode 100644
index 00000000..a85fdf92
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Cache.h
@@ -0,0 +1,156 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_CACHE_H
+#define T2P_CACHE_H
+
+#include <map>
+#include <string>
+#include <vector>
+#include <iostream>
+
+#include "myboost/shared_ptr.hpp"
+
+namespace T2P
+{
+ class CacheElement
+ {
+ public:
+ CacheElement(std::string key) : m_key(key), m_usage(0) { }
+ ~CacheElement() { }
+
+ std::string key() const { return m_key; }
+ int usage() const { return m_usage; }
+
+ void incUsage() { m_usage++; }
+
+ private:
+ std::string m_key;
+ int m_usage;
+ };
+
+ template<typename T>
+ class Cache
+ {
+ public:
+ typedef myboost::shared_ptr<T> SharedT;
+
+ Cache(int maxSize = 10) : m_size(0), m_maxSize(maxSize) { }
+ ~Cache() { clear(); }
+
+ // Number of elements in cache
+ int size() const { return m_size; }
+
+ // Maximum number of elements in cache
+ int maxSize() const { return m_maxSize; }
+
+ // Add new entry
+ void insert(const std::string &key, SharedT &value)
+ {
+ // TODO: Add real LRU logic, now i will just delete the less
+ // used item when inserting a new item would exceed maxSize
+ if(m_size == m_maxSize)
+ {
+ // Find less used item
+ typename std::map<SharedT, CacheElement *>::const_iterator it = m_cacheMap.begin();
+ int usage = (*it).second->usage(); std::string keyUsage = (*it).second->key();
+ for(it++; it != m_cacheMap.end(); ++it)
+ {
+ int curUsage = (*it).second->usage();
+ if(curUsage < usage)
+ {
+ usage = curUsage;
+ keyUsage = (*it).second->key();
+ }
+ }
+
+// std::cout << "[CACHE] Removing less used element with key: " << keyUsage << " (Used " << usage << " times!)" << std::endl;
+ remove(keyUsage);
+ }
+
+ m_size++;
+ m_entries.push_back(value);
+ m_cacheMap[value] = new CacheElement(key);
+ }
+
+ // Remove single entry
+ void remove(const std::string &key)
+ {
+ for(typename std::vector<SharedT>::iterator it = m_entries.begin(); it != m_entries.end(); ++it)
+ {
+ SharedT cur = *it;
+ if(m_cacheMap[cur]->key() == key)
+ {
+ m_size--;
+
+ typename std::map<SharedT, CacheElement *>::iterator cacheElement = m_cacheMap.find(cur);
+ m_cacheMap.erase(cacheElement);
+ delete cacheElement->second;
+ m_entries.erase(it); // Only valid to write because we don't go on here!
+ break; // Otherwhise the iterators _may_ be invalid!
+ }
+ }
+ }
+
+ // Remove all entries
+ void clear()
+ {
+ m_size = 0;
+ m_entries.clear();
+ m_cacheMap.clear();
+ }
+
+ // Lookup entry
+ SharedT find(const std::string &key)
+ {
+ for(typename std::vector<SharedT>::const_iterator it = m_entries.begin(); it != m_entries.end(); ++it)
+ {
+ SharedT cur = *it;
+ if(m_cacheMap[cur]->key() == key)
+ {
+ m_cacheMap[cur]->incUsage();
+ return cur;
+ }
+ }
+
+ return SharedT();
+ }
+
+ void dump()
+ {
+ std::cout << "[CACHE] " << size() << " of " << maxSize() << " Objects in the cache." << std::endl;
+
+ for(typename std::vector<SharedT>::iterator it = m_entries.begin(); it != m_entries.end(); ++it)
+ {
+ SharedT cur = *it;
+ std::cout << "[CACHE] - " << m_cacheMap[cur]->key() << " -> " << cur << " (Usage: " << m_cacheMap[cur]->usage() << ")" << std::endl;
+ }
+ }
+
+ private:
+ std::vector<SharedT> m_entries;
+ std::map<SharedT, CacheElement *> m_cacheMap;
+ int m_size, m_maxSize;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Converter.cpp b/ksvg/impl/libs/libtext2path/src/Converter.cpp
new file mode 100644
index 00000000..7810b417
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Converter.cpp
@@ -0,0 +1,505 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+
+#include "myboost/shared_ptr.hpp"
+#include <fontconfig/fontconfig.h>
+#include <fribidi/fribidi.h>
+#include <fribidi/fribidi_types.h>
+
+#include "Font.h"
+#include "Glyph.h"
+#include "Tools.h"
+#include "Rectangle.h"
+#include "Converter.h"
+#include "QtUnicode.h"
+#include "GlyphTracer.h"
+
+// Macros
+#define FT_TRUNC(x) ((x) >> 6)
+#define FT_TOFLOAT(x) ((x) * (1.0 / 64.0))
+#define FT_FROMFLOAT(x) ((int) floor ((x) * 64.0 + 0.5))
+
+const double deg2rad = 0.017453292519943295769; // pi/180
+
+using namespace T2P;
+
+// Font engine. The core component.
+Converter::Converter(GlyphTracer *tracer) : m_glyphTracer(tracer)
+{
+ m_init = false;
+ m_kerning = true;
+ m_library = 0;
+}
+
+Converter::~Converter()
+{
+ if(m_glyphTracer)
+ delete m_glyphTracer;
+
+ m_fontCache.clear();
+ m_glyphCache.clear();
+
+ // Close FreeType2 library
+ if(m_library)
+ FT_Done_FreeType(m_library);
+}
+
+void Converter::init()
+{
+ // Initialize FreeType2
+ m_init = (FT_Init_FreeType(&m_library) == 0);
+}
+
+bool Converter::ready()
+{
+ return m_init;
+}
+
+void Converter::setKerning(bool mode)
+{
+ m_kerning = mode;
+}
+
+// Lookup font in cache or create new font
+SharedFont Converter::requestFont(const FontVisualParams *params)
+{
+ std::string cacheKey = cacheFontKey(params);
+ SharedFont cached = m_fontCache.find(cacheKey);
+
+ // If not available in cache, create new one and cache it :)
+ if(cached)
+ {
+ delete params;
+ return cached;
+ }
+ else
+ {
+ // Create a new Font
+ SharedFont newFont(new Font(this));
+
+ // Load the font
+ if(!newFont->load(params))
+ {
+ delete params;
+ return SharedFont();
+ }
+
+ // Append to cache
+ m_fontCache.insert(cacheKey, newFont);
+ return newFont;
+ }
+}
+
+GlyphAffinePair *Converter::requestGlyph(GlyphRenderParams *params, Rectangle &bbox, Affine &affine, bool onlyLatin)
+{
+ // 1. Select glyph to have glyphIndex information,
+ // needed to generate the cache lookup key
+ selectGlyph(params);
+
+ SharedGlyph cached = m_glyphCache.find(cacheGlyphKey(params));
+
+ // If not available in cache, render new one and cache it :)
+ // If we're mixing ie. japanese and latin characters (TTB layout),
+ // then we also have to re-calculate the glyph again with the appropriate rotation matrix (Niko)
+ if(!cached || !onlyLatin)
+ cached = calcGlyph(params, affine, onlyLatin);
+
+ // Correct bezier path by setting up the correct scaling matrix
+ // and multiplying with the current glyph affine
+ double fontSize = params->font()->fontParams()->size();
+
+ T2P::Affine correctAffine;
+ correctAffine.scale(0.001 * fontSize, -0.001 * fontSize);
+ correctAffine *= affine;
+
+ // Get bbox information
+ Point p1(FT_TRUNC(cached->ftBbox()->xMin), FT_TRUNC(cached->ftBbox()->yMin));
+ Point p2(FT_TRUNC(cached->ftBbox()->xMax), FT_TRUNC(cached->ftBbox()->yMax));
+
+ bbox.setA(affine.mapPoint(p1));
+ bbox.setB(affine.mapPoint(p2));
+
+ return new GlyphAffinePair(cached.get(), correctAffine);
+}
+
+void Converter::selectGlyph(GlyphRenderParams *params)
+{
+ // 1. Select glyph + test if it exists
+ // |
+ // |-> if it doesn't exist, replace by a '?' and check if exists
+ // |-> if it does exist, use it!
+ params->setGlyphIndex(FT_Get_Char_Index(params->font()->fontFace(), (FT_ULong) params->character()));
+
+ if(params->glyphIndex() == 0)
+ params->setGlyphIndex(FT_Get_Char_Index(params->font()->fontFace(), '?'));
+
+ // 2. Load glyph into font's glyphSlot, according to the GlyphLayoutParams
+ int flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
+
+ // 3. Don't pass FT_LOAD_VERTICAL_LAYOUT on TTB layouts when rendering
+ // a latin glyph because it needs to be rotated...
+ if(params->layout()->tb())
+ {
+ Script script;
+ SCRIPT_FOR_CHAR(script, params->character())
+ if(script != Latin || params->layout()->glyphOrientationVertical() == 0)
+ flags |= FT_LOAD_VERTICAL_LAYOUT;
+ }
+
+ FT_Error error = FT_Load_Glyph(params->font()->fontFace(), params->glyphIndex(), flags);
+ if(error)
+ params->setGlyphIndex(0);
+}
+
+SharedGlyph Converter::calcGlyph(const GlyphRenderParams *params, Affine &affine, bool onlyLatin)
+{
+ // 2. Apply kerning if needed
+ if(m_kerning && params->lastGlyph() != 0 && params->glyphIndex() != 0)
+ {
+ FT_Vector kerningVector;
+ double kx, ky;
+
+ FT_Get_Kerning(params->font()->fontFace(), params->lastGlyph(), params->glyphIndex(), ft_kerning_default, &kerningVector);
+
+ kx = FT_TRUNC(kerningVector.x);
+ ky = FT_TRUNC(kerningVector.y);
+
+ affine.dx() += kx + affine.m21() * ky;
+
+ // Only apply y kerning in TB mode
+ if(params->layout()->tb())
+ affine.dy() += kx + affine.m22() * ky;
+ }
+
+ // 3. Prepare path tracing
+ FT_OutlineGlyph ftGlyph;
+ FT_Get_Glyph(params->font()->fontFace()->glyph, reinterpret_cast<FT_Glyph *>(&ftGlyph));
+
+ // 3a. Prepare tracing matrix
+ Affine traceAffine;
+ traceAffine.scale(1000.0 / params->font()->fontFace()->units_per_EM);
+
+ // 3b. Enable character rotation, if needed
+ if(params->layout()->tb())
+ {
+ Script script;
+ SCRIPT_FOR_CHAR(script, params->character())
+ if(!onlyLatin && script == Latin)
+ {
+ FT_Matrix matrix;
+
+ double angle = deg2rad * params->layout()->glyphOrientationVertical();
+ matrix.xx = (FT_Fixed)( cos(angle) * 0x10000L);
+ matrix.xy = (FT_Fixed)(-sin(angle) * 0x10000L);
+ matrix.yx = (FT_Fixed)( sin(angle) * 0x10000L);
+ matrix.yy = (FT_Fixed)( cos(angle) * 0x10000L);
+
+ FT_Glyph_Transform(reinterpret_cast<FT_Glyph>(ftGlyph), &matrix, 0);
+ }
+ }
+
+ // 4. Begin path tracing
+ // - Setup glyphOutlineing glyph
+ // - Start tracing
+ // - Close path
+ FT_Outline *ftOut = &ftGlyph->outline;
+
+ SharedGlyph glyphOutline(new Glyph());
+ glyphOutline->setBezierPath(m_glyphTracer->allocBezierPath(ftOut->n_points * 2 + ftOut->n_contours + 1));
+ glyphOutline->setAffine(traceAffine);
+
+ FT_Outline_Decompose(ftOut, m_glyphTracer->outlineFuncs(), glyphOutline.get());
+
+ m_glyphTracer->closePath(glyphOutline.get());
+
+ // 5. Determine bounding box (aka "cbox")
+ FT_Glyph_Get_CBox(reinterpret_cast<FT_Glyph>(ftGlyph), ft_glyph_bbox_unscaled, glyphOutline->ftBbox());
+
+ // 6. Cache glyph!
+ m_glyphCache.insert(cacheGlyphKey(params), glyphOutline);
+
+ FT_Done_Glyph(reinterpret_cast<FT_Glyph>(ftGlyph));
+
+ return glyphOutline;
+}
+
+GlyphSet *Converter::calcString(Font *font, const unsigned short *text, unsigned int length, Affine &affine, const GlyphLayoutParams *params, BezierPath *bpath)
+{
+ unsigned short *bidi = 0;
+
+ // 0. Apply BiDi Rules
+ if(params->useBidi())
+ {
+ FriBidiCharType baseDir = FRIBIDI_TYPE_N;
+ FriBidiChar *unicodeIn = new FriBidiChar[length + 1];
+ FriBidiChar *unicodeOut = new FriBidiChar[length + 1];
+ bidi = new unsigned short[length + 1];
+
+ for(unsigned int i = 0; i < length; i++)
+ unicodeIn[i] = text[i];
+
+ fribidi_log2vis(unicodeIn, length, &baseDir, unicodeOut, 0, 0, 0);
+
+ for(unsigned int i = 0; i < length; i++)
+ bidi[i] = unicodeOut[i];
+
+ bidi[length] = 0;
+ delete []unicodeIn;
+ delete []unicodeOut;
+ }
+ else
+ bidi = const_cast<unsigned short *>(text);
+
+ // Detect character rotation if needed,
+ // probably working in 0.1% of the cases :/
+ Script script;
+ bool onlyLatin = true;
+ for(unsigned int i = 0; i < length; i++)
+ {
+ SCRIPT_FOR_CHAR(script, bidi[i])
+ if(script != Latin)
+ {
+ onlyLatin = false;
+ break;
+ }
+ }
+
+ // 1. Set initial font size
+ double fontSize = font->fontParams()->size();
+ FT_Set_Char_Size(font->fontFace(), FT_FROMFLOAT(fontSize), FT_FROMFLOAT(fontSize), 0, 0);
+
+ // 2. Compute positioning metrics
+ // - See http://www.freetype.org/freetype2/docs/tutorial/stepX.html (X = 1 or 2)
+ int pixelHeight = (int) (FT_TOFLOAT(font->fontFace()->size->metrics.ascender - font->fontFace()->size->metrics.descender) * affine.m22());
+ int pixelBaseline = (int) (FT_TOFLOAT(font->fontFace()->size->metrics.ascender) * affine.m22());
+ int pixelUnderlinePosition = (int) (((font->fontFace()->ascender - font->fontFace()->underline_position - font->fontFace()->underline_thickness / 2) * fontSize / font->fontFace()->units_per_EM) * affine.m22());
+ int pixelUnderlineThickness = T2PMAX(1, (int) ((font->fontFace()->underline_thickness * fontSize / font->fontFace()->units_per_EM) * affine.m22()));
+
+ // 3. Prepare needed variables for the rendering loop
+ // - rendering params (layout, font...)
+ // - bounding box (per glyph, overall)
+ // - glyph matrix (overall)
+ // - resulting glyph sets
+ GlyphRenderParams *renderParams = new GlyphRenderParams();
+ renderParams->setFont(font);
+ renderParams->setLayout(params);
+ renderParams->setLastGlyph(0);
+ renderParams->setGlyphIndex(0);
+
+ Affine glyphAffine(affine);
+ Rectangle bbox, currentBbox;
+ GlyphSet *result = new GlyphSet();
+
+ // Align to path start, if bpath != 0
+ Point pathPoint, pathTangent, pathNormal;
+ double pathLength = 0, pathAdvance = 0;
+ double startOffset = params->textPathStartOffset();
+
+ if(bpath)
+ {
+ pathLength = bpath->length();
+ bpath->pointTangentNormalAt(startOffset, &pathPoint, &pathTangent);
+
+ glyphAffine.dx() = pathPoint.x();
+ glyphAffine.dy() = pathPoint.y();
+ glyphAffine.rotate(atan2(pathTangent.y(), pathTangent.x()));
+
+ std::cout << "[T2P] Starting textPath at: " << pathPoint.x() << ", " << pathPoint.y() << std::endl;
+ }
+
+ // <tspan> elements can have different baseline-shift's
+ // baseline-shift support (Niko)
+ double baseline = 0;
+ if(!params->baselineShift().empty())
+ {
+ if(params->baselineShift() == "sub")
+ baseline += fontSize / 5 + 1;
+ else if(params->baselineShift() == "super")
+ baseline -= fontSize / 3 + 1;
+ else
+ {
+ std::string temp = params->baselineShift();
+ if(temp.find("%") > 0)
+ baseline -= (atof(temp.c_str()) / 100.0) * fontSize;
+ else
+ baseline -= atoi(temp.c_str());
+ }
+
+ if(!params->tb())
+ glyphAffine.translate(0, baseline);
+ else
+ glyphAffine.translate(-baseline, 0);
+ }
+
+ // 4. Enter main rendering loop
+ for(unsigned int i = 0; i < length; i++)
+ {
+ // 4a. Modify character to render
+ renderParams->setCharacter(bidi[i]);
+
+ // 4c. Get glyph outline
+ GlyphAffinePair *glyphOutline = requestGlyph(renderParams, currentBbox, glyphAffine, onlyLatin);
+ m_glyphTracer->correctGlyph(glyphOutline);
+
+ // 4d. Save advance values
+ result->m_glyphXAdvance.push_back((font->fontFace()->glyph->advance.x * fontSize / font->fontFace()->units_per_EM) * affine.m11());
+ result->m_glyphYAdvance.push_back((font->fontFace()->glyph->advance.y * fontSize / font->fontFace()->units_per_EM) * affine.m22());
+
+ // 4e. Misc
+ // - union current + overall bounding box
+ // - add glyph to list of glyphs
+ // - apply letter & word spacing
+ if(renderParams->glyphIndex() != 0)
+ {
+ // Remember last glyph for kerning
+ renderParams->setLastGlyph(renderParams->glyphIndex());
+
+ // Union current + overall bounding box
+ bbox.bboxUnion(bbox, currentBbox);
+
+ // Move glyph locations for the next glyph to be
+ // rendered apply letter & word spacing
+ bool addGlyph = true;
+ if(!params->tb())
+ {
+ if(bpath)
+ {
+ double advance = startOffset + (pathAdvance / pathLength);
+ if(advance < 0.0 || advance > 1.0) // dont render off-path glyphs
+ addGlyph = false;
+
+ pathAdvance += (result->m_glyphXAdvance.back() + params->letterSpacing() * affine.m11()) + ((bidi[(i + 1)] == ' ') ? params->wordSpacing() * affine.m11() : 0);
+
+ std::cout << "[T2P] Adjusting textPath advance: " << pathAdvance << " Path Length: " << pathLength << " StartOffset: " << startOffset << " Position in Path (relative 0-1): " << pathAdvance/pathLength << " Adjusted by offset: " << startOffset + (pathAdvance / pathLength) << std::endl;
+
+ bpath->pointTangentNormalAt(startOffset + (pathAdvance / pathLength), &pathPoint, &pathTangent, &pathNormal);
+
+ glyphAffine.m11() = affine.m11();
+ glyphAffine.m12() = affine.m12();
+ glyphAffine.m21() = affine.m21();
+ glyphAffine.m22() = affine.m22();
+ glyphAffine.dx() = pathPoint.x();
+ glyphAffine.dy() = pathPoint.y();
+
+ glyphAffine.rotateAround(atan2(pathTangent.y(), pathTangent.x()), Point(result->m_glyphXAdvance.back() / 2, result->m_glyphYAdvance.back() / 2));
+
+ std::cout << "[T2P] Aligning textPath to: " << pathPoint.x() << ", " << pathPoint.y() << std::endl;
+ if(!params->tb())
+ glyphAffine.translate(0, baseline);
+ else
+ glyphAffine.translate(-baseline, 0);
+ }
+ else
+ glyphAffine.dx() += (result->m_glyphXAdvance.back() + params->letterSpacing() * affine.m11()) + ((bidi[(i + 1)] == ' ') ? params->wordSpacing() * affine.m11() : 0);
+ }
+ else
+ {
+ double advy = result->m_glyphYAdvance.back();
+
+ Script script;
+ SCRIPT_FOR_CHAR(script, bidi[i])
+ if(!onlyLatin && script == Latin && params->glyphOrientationVertical() != 0)
+ advy = result->m_glyphXAdvance.back();
+
+ glyphAffine.dy() += (advy + params->letterSpacing() * affine.m22()) + ((bidi[(i + 1)] == ' ') ? params->wordSpacing() * affine.m22() : 0);
+ }
+
+ // Copy bezier path/affine pair
+ if(addGlyph)
+ {
+ result->m_set.push_back(glyphOutline);
+ result->m_glyphCount++;
+ }
+ else
+ delete glyphOutline;
+ }
+ }
+
+ // 5. Fill out resulting data structures
+ result->m_underlinePosition = pixelUnderlinePosition;
+ result->m_overlinePosition = pixelHeight - pixelUnderlinePosition;
+ result->m_strikeThroughPosition = (result->m_underlinePosition + result->m_overlinePosition) / 2;
+ result->m_pixelBaseline = pixelBaseline;
+ result->m_underlineThickness = pixelUnderlineThickness;
+
+ result->m_xpen = glyphAffine.dx() - affine.dx();
+ result->m_ypen = glyphAffine.dy() - affine.dy();
+
+ result->m_bboxX = T2PMAX(1, int(bbox.a().x()));
+ result->m_bboxY = T2PMAX(1, int(bbox.a().y() - int(pixelHeight / 2)));
+ result->m_height = T2PMAX(1, int(bbox.b().y() - bbox.a().y()));
+
+ // Correct bounding box information also on
+ // vertical layouts! (Niko)
+ if(!params->tb())
+ {
+ if(bpath)
+ result->m_width = int(pathAdvance);
+ else
+ result->m_width = T2PMAX(1, int(bbox.b().x() - bbox.a().x()));
+ }
+ else
+ result->m_width = T2PMAX(1, pixelHeight);
+
+ // 6. Cleanup memory
+ if(text != bidi)
+ delete []bidi;
+
+ delete renderParams;
+
+ // 7. Eventually, dump cache statistics
+ // m_glyphCache.dump();
+ // m_fontCache.dump();
+
+ return result;
+}
+
+std::string Converter::cacheFontKey(const FontVisualParams *params) const
+{
+ // TODO: Tune the key
+ std::string key;
+
+ key += Tools::joinList('|', const_cast<FontVisualParams *>(params)->fontList());
+ key += Tools::a2str(params->weight());
+ key += Tools::a2str(params->slant());
+ key += Tools::a2str(params->size());
+
+ // std::cout << "Font cache key: " << key << std::endl;
+ return key;
+}
+
+std::string Converter::cacheGlyphKey(const GlyphRenderParams *params) const
+{
+ // TODO: Tune the key
+ std::string key;
+
+ key += params->font()->fontFile();
+ key += Tools::a2str(params->character());
+ key += Tools::a2str(params->glyphIndex());
+ key += Tools::a2str(params->font()->fontParams()->size());
+ key += Tools::a2str(params->font()->fontParams()->weight());
+ key += Tools::a2str(params->font()->fontParams()->slant());
+
+ // std::cout << "Glyph cache key: " << key << std::endl;
+ return key;
+}
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Converter.h b/ksvg/impl/libs/libtext2path/src/Converter.h
new file mode 100644
index 00000000..d6e19521
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Converter.h
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_CONVERTER_H
+#define T2P_CONVERTER_H
+
+#include "Cache.h"
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_OUTLINE_H
+#include FT_GLYPH_H
+
+namespace T2P
+{
+ class BezierPath;
+
+ class Font;
+ class Glyph;
+ class Affine;
+ class GlyphSet;
+ class Rectangle;
+ class GlyphTracer;
+ class GlyphAffinePair;
+ class FontVisualParams;
+ class GlyphLayoutParams;
+ class GlyphRenderParams;
+
+ typedef myboost::shared_ptr<Font> SharedFont;
+ typedef myboost::shared_ptr<Glyph> SharedGlyph;
+
+ class Converter
+ {
+ public:
+ Converter(GlyphTracer *tracer);
+ ~Converter();
+
+ // Is initialized?
+ void init();
+ bool ready();
+
+ // Kerning control
+ void setKerning(bool mode);
+
+ SharedFont requestFont(const FontVisualParams *params);
+ GlyphAffinePair *requestGlyph(GlyphRenderParams *params, Rectangle &bbox, Affine &affine, bool onlyLatin);
+
+ GlyphSet *calcString(Font *font, const unsigned short *text, unsigned int length, Affine &affine, const GlyphLayoutParams *params, BezierPath *bpath = 0);
+ SharedGlyph calcGlyph(const GlyphRenderParams *params, Affine &affine, bool onlyLatin);
+
+ void selectGlyph(GlyphRenderParams *params);
+
+ protected:
+ friend class Font;
+
+ // Internal
+ FT_Library library() { return m_library; }
+
+ private:
+ std::string cacheFontKey(const FontVisualParams *params) const;
+ std::string cacheGlyphKey(const GlyphRenderParams *params) const;
+
+ FT_Library m_library;
+
+ GlyphTracer *m_glyphTracer;
+
+ Cache<Glyph> m_glyphCache;
+ Cache<Font> m_fontCache;
+
+ bool m_init, m_kerning;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Font.cpp b/ksvg/impl/libs/libtext2path/src/Font.cpp
new file mode 100644
index 00000000..1d6f7005
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Font.cpp
@@ -0,0 +1,252 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include <iostream>
+#include <fontconfig/fontconfig.h>
+
+#include "Font.h"
+#include "Tools.h"
+#include "Converter.h"
+
+// Macros
+#define FT_TRUNC(x) ((x) >> 6)
+#define FT_TOFLOAT(x) ((x) * (1.0 / 64.0))
+#define FT_FROMFLOAT(x) ((int) floor ((x) * 64.0 + 0.5))
+
+using namespace T2P;
+
+FontVisualParams::FontVisualParams()
+{
+ m_size = 0.0;
+ m_slant = 0;
+ m_weight = 0;
+}
+
+FontVisualParams::FontVisualParams(const FontVisualParams &other)
+{
+ (*this) = other;
+}
+
+FontVisualParams::~FontVisualParams()
+{
+}
+
+FontVisualParams &FontVisualParams::operator=(const FontVisualParams &other)
+{
+ m_size = other.m_size;
+ m_slant = other.m_slant;
+ m_weight = other.m_weight;
+ m_fontList = other.m_fontList;
+
+ return *this;
+}
+
+void FontVisualParams::setWeight(int weight)
+{
+ m_weight = weight;
+}
+
+int FontVisualParams::weight() const
+{
+ return m_weight;
+}
+
+void FontVisualParams::setSlant(int slant)
+{
+ m_slant = slant;
+}
+
+int FontVisualParams::slant() const
+{
+ return m_slant;
+}
+
+void FontVisualParams::setSize(double size)
+{
+ m_size = size;
+}
+
+double FontVisualParams::size() const
+{
+ return m_size;
+}
+
+std::list<std::string> &FontVisualParams::fontList()
+{
+ return m_fontList;
+}
+
+// #####
+
+Font::Font(Converter *context) : m_context(context)
+{
+ m_ready = false;
+
+ m_fontFace = 0;
+ m_fontParams = 0;
+}
+
+Font::~Font()
+{
+ // Release font face
+ if(m_ready && m_fontFace)
+ {
+ // FIXME: Debug that!
+ //std::cout << "CALLING DONE FACE " << m_fontFace << std::endl;
+ FT_Done_Face(m_fontFace);
+ }
+
+ delete m_fontParams;
+}
+
+std::string Font::buildRequest(const FontVisualParams *fontParams, int &id)
+{
+ // Use FontConfig to locate & select fonts and use
+ // FreeType2 to open them
+ FcPattern *pattern;
+ std::string fileName;
+
+ pattern = FcPatternBuild(0,
+ FC_WEIGHT, FcTypeInteger, fontParams->weight(),
+ FC_SLANT, FcTypeInteger, fontParams->slant(),
+ FC_SIZE, FcTypeDouble, fontParams->size(),
+ NULL);
+
+ // Add multiple font names
+ std::list<std::string> &fontList = const_cast<FontVisualParams *>(fontParams)->fontList();
+
+ for(std::list<std::string>::const_iterator it = fontList.begin(); it != fontList.end(); ++it)
+ {
+ std::string string = *it;
+
+ if(!string.empty())
+ FcPatternAddString(pattern, FC_FAMILY, reinterpret_cast<const FcChar8 *>(string.c_str()));
+ }
+
+ // Always load vertical layout
+ FcPatternAddBool(pattern, FC_VERTICAL_LAYOUT, true);
+
+ // Disable hinting
+ FcPatternAddBool(pattern, FC_HINTING, false);
+
+ // Perform the default font pattern modification operations.
+ FcDefaultSubstitute(pattern);
+ FcConfigSubstitute(FcConfigGetCurrent(), pattern, FcMatchPattern);
+
+ // Match the pattern!
+ FcResult result;
+ FcPattern *match = FcFontMatch(0, pattern, &result);
+
+ // Destroy pattern
+ FcPatternDestroy(pattern);
+
+ // Get index & filename
+ FcChar8 *temp;
+
+ if(match)
+ {
+ FcPattern *pattern = FcPatternDuplicate(match);
+
+ // Get index & filename
+ if(FcPatternGetString(pattern, FC_FILE, 0, &temp) != FcResultMatch ||
+ FcPatternGetInteger(pattern, FC_INDEX, 0, &id) != FcResultMatch)
+ {
+ std::cout << "Font::buildRequest(), could not load font file for requested font \"" << Tools::joinList('|', fontList) << "\"" << std::endl;
+ return fileName;
+ }
+
+ fileName = reinterpret_cast<const char *>(temp);
+
+ // Kill pattern
+ FcPatternDestroy(pattern);
+ }
+
+ // Kill pattern
+ FcPatternDestroy(match);
+
+ return fileName;
+}
+
+bool Font::load(const FontVisualParams *fontParams)
+{
+ // Build FontConfig request pattern
+ int id = -1;
+ std::string filename = Font::buildRequest(fontParams, id);
+
+ // Load font directly using FreeType2
+ std::cout << "Font::load(), loading " << filename << " for requested font \"" << Tools::joinList('|', const_cast<FontVisualParams *>(fontParams)->fontList()) << "\"" << std::endl;
+
+ FT_Error error = FT_New_Face(m_context->library(), filename.c_str(), id, &m_fontFace);
+ if(error)
+ {
+ std::cout << "Font::load(), could not load font. Aborting!" << std::endl;
+ return false;
+ }
+ if(!FT_IS_SCALABLE(m_fontFace))
+ {
+ std::cout << "Font::load(), font does not contain outlines. Aborting!" << std::endl;
+ FT_Done_Face(m_fontFace);
+ m_fontFace = 0;
+ return false;
+ }
+
+ // Choose unicode charmap
+ for(int charmap = 0; charmap < m_fontFace->num_charmaps; charmap++)
+ {
+ if(m_fontFace->charmaps[charmap]->encoding == ft_encoding_unicode)
+ {
+ FT_Error error = FT_Set_Charmap(m_fontFace, m_fontFace->charmaps[charmap]);
+
+ if(error)
+ {
+ std::cout << "Font::load(), unable to select unicode charmap. Aborting!" << std::endl;
+
+ FT_Done_Face(m_fontFace);
+ m_fontFace = 0;
+
+ return false;
+ }
+ }
+ }
+
+ m_fontParams = fontParams;
+ m_fontFile = filename;
+ m_ready = true;
+
+ return true;
+}
+
+FT_Face &Font::fontFace()
+{
+ return m_fontFace;
+}
+
+std::string Font::fontFile() const
+{
+ return m_fontFile;
+}
+
+const FontVisualParams *Font::fontParams() const
+{
+ return m_fontParams;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Font.h b/ksvg/impl/libs/libtext2path/src/Font.h
new file mode 100644
index 00000000..72844285
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Font.h
@@ -0,0 +1,91 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_FONT_H
+#define T2P_FONT_H
+
+#include <list>
+#include <string>
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+namespace T2P
+{
+ class Converter;
+
+ class FontVisualParams
+ {
+ public:
+ FontVisualParams();
+ FontVisualParams(const FontVisualParams &other);
+ ~FontVisualParams();
+
+ FontVisualParams &operator=(const FontVisualParams &other);
+
+ void setWeight(int weight);
+ int weight() const;
+
+ void setSlant(int slant);
+ int slant() const;
+
+ void setSize(double size);
+ double size() const;
+
+ std::list<std::string> &fontList();
+
+ private:
+ int m_weight, m_slant;
+ double m_size;
+
+ std::list<std::string> m_fontList;
+ };
+
+ class Font
+ {
+ public:
+ Font(Converter *context);
+ ~Font();
+
+ // Build font loading request for FontConfig
+ static std::string buildRequest(const FontVisualParams *fontParams, int &id);
+
+ // Load it! :)
+ bool load(const FontVisualParams *fontParams);
+
+ FT_Face &fontFace();
+ std::string fontFile() const;
+ const FontVisualParams *fontParams() const;
+
+ private:
+ FT_Face m_fontFace;
+ std::string m_fontFile;
+
+ Converter *m_context;
+ const FontVisualParams *m_fontParams;
+
+ bool m_ready;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Glyph.cpp b/ksvg/impl/libs/libtext2path/src/Glyph.cpp
new file mode 100644
index 00000000..5d172018
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Glyph.cpp
@@ -0,0 +1,353 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <iostream>
+#include "Glyph.h"
+
+using namespace T2P;
+
+Glyph::Glyph()
+{
+ m_bezierPath = 0;
+}
+
+Glyph::~Glyph()
+{
+ delete m_bezierPath;
+ m_bezierPath = 0;
+}
+
+Affine &Glyph::affine()
+{
+ return m_affine;
+}
+
+void Glyph::setAffine(const Affine &affine)
+{
+ m_affine = affine;
+}
+
+const BezierPath *Glyph::bezierPath() const
+{
+ return const_cast<const BezierPath *>(m_bezierPath);
+}
+
+BezierPath *Glyph::modifiableBezierPath()
+{
+ return m_bezierPath;
+}
+
+void Glyph::setBezierPath(const BezierPath *bpath)
+{
+ m_bezierPath = const_cast<BezierPath *>(bpath);
+}
+
+FT_BBox *Glyph::ftBbox()
+{
+ return m_ftBbox;
+}
+
+// #####
+
+GlyphAffinePair::GlyphAffinePair(const Glyph *glyph, const Affine &affine)
+{
+ m_glyph = glyph;
+ m_affine = affine;
+ m_transformatedPath = 0;
+}
+
+GlyphAffinePair::~GlyphAffinePair()
+{
+ // The glyphs are shared and thus not deleted (Niko)
+ delete m_transformatedPath;
+}
+
+void GlyphAffinePair::setTransformatedPath(const BezierPath *path)
+{
+ m_transformatedPath = path;
+}
+
+const BezierPath *GlyphAffinePair::transformatedPath() const
+{
+ return m_transformatedPath;
+}
+
+const Glyph *GlyphAffinePair::glyph() const
+{
+ return m_glyph;
+}
+
+Affine &GlyphAffinePair::affine()
+{
+ return m_affine;
+}
+
+// #####
+
+GlyphSet::GlyphSet()
+{
+ m_glyphCount = 0;
+
+ m_bboxX = 0;
+ m_bboxY = 0;
+ m_width = 0;
+ m_height = 0;
+
+ m_xpen = 0;
+ m_ypen = 0;
+
+ m_underlinePosition = 0;
+ m_underlineThickness = 0;
+ m_overlinePosition = 0;
+ m_strikeThroughPosition = 0;
+ m_pixelBaseline = 0;
+}
+
+GlyphSet::~GlyphSet()
+{
+ m_set.clear();
+}
+
+std::vector<GlyphAffinePair *> &GlyphSet::set()
+{
+ return m_set;
+}
+
+std::list<float> GlyphSet::glyphXAdvance()
+{
+ return m_glyphXAdvance;
+}
+
+std::list<float> GlyphSet::glyphYAdvance()
+{
+ return m_glyphYAdvance;
+}
+
+unsigned int GlyphSet::glyphCount() const
+{
+ return m_glyphCount;
+}
+
+int GlyphSet::width() const
+{
+ return m_width;
+}
+
+int GlyphSet::height() const
+{
+ return m_height;
+}
+
+int GlyphSet::bboxX() const
+{
+ return m_bboxX;
+}
+
+int GlyphSet::bboxY() const
+{
+ return m_bboxY;
+}
+
+double GlyphSet::xpen() const
+{
+ return m_xpen;
+}
+
+double GlyphSet::ypen() const
+{
+ return m_ypen;
+}
+
+int GlyphSet::underlinePosition() const
+{
+ return m_underlinePosition;
+}
+
+int GlyphSet::underlineThickness() const
+{
+ return m_underlineThickness;
+}
+
+int GlyphSet::overlinePosition() const
+{
+ return m_overlinePosition;
+}
+
+int GlyphSet::strikeThroughPosition() const
+{
+ return m_strikeThroughPosition;
+}
+
+int GlyphSet::pixelBaseline() const
+{
+ return m_pixelBaseline;
+}
+
+// #####
+
+GlyphLayoutParams::GlyphLayoutParams()
+{
+}
+
+GlyphLayoutParams::~GlyphLayoutParams()
+{
+}
+
+bool GlyphLayoutParams::tb() const
+{
+ return m_tb;
+}
+
+void GlyphLayoutParams::setTb(bool tb)
+{
+ m_tb = tb;
+}
+
+bool GlyphLayoutParams::useBidi() const
+{
+ return m_useBidi;
+}
+
+void GlyphLayoutParams::setUseBidi(bool bidi)
+{
+ m_useBidi = bidi;
+}
+
+double GlyphLayoutParams::wordSpacing() const
+{
+ return m_wordSpacing;
+}
+
+void GlyphLayoutParams::setWordSpacing(double wordSpacing)
+{
+ m_wordSpacing = wordSpacing;
+}
+
+double GlyphLayoutParams::letterSpacing() const
+{
+ return m_letterSpacing;
+}
+
+void GlyphLayoutParams::setLetterSpacing(double letterSpacing)
+{
+ m_letterSpacing = letterSpacing;
+}
+
+std::string GlyphLayoutParams::baselineShift() const
+{
+ return m_baseline;
+}
+
+void GlyphLayoutParams::setBaselineShift(const std::string &baseline)
+{
+ m_baseline = baseline;
+}
+
+int GlyphLayoutParams::glyphOrientationVertical() const
+{
+ return m_glyphOrientationVertical;
+}
+
+void GlyphLayoutParams::setGlyphOrientationVertical(int orient)
+{
+ m_glyphOrientationVertical = orient;
+}
+
+int GlyphLayoutParams::glyphOrientationHorizontal() const
+{
+ return m_glyphOrientationHorizontal;
+}
+
+void GlyphLayoutParams::setGlyphOrientationHorizontal(int orient)
+{
+ m_glyphOrientationHorizontal = orient;
+}
+
+double GlyphLayoutParams::textPathStartOffset() const
+{
+ return m_textPathStartOffset;
+}
+
+void GlyphLayoutParams::setTextPathStartOffset(double offset)
+{
+ m_textPathStartOffset = offset;
+}
+
+// #####
+
+GlyphRenderParams::GlyphRenderParams()
+{
+}
+
+GlyphRenderParams::~GlyphRenderParams()
+{
+}
+
+Font *GlyphRenderParams::font() const
+{
+ return m_font;
+}
+
+void GlyphRenderParams::setFont(Font *font)
+{
+ m_font = font;
+}
+
+const GlyphLayoutParams *GlyphRenderParams::layout() const
+{
+ return m_layout;
+}
+
+void GlyphRenderParams::setLayout(const GlyphLayoutParams *layout)
+{
+ m_layout = layout;
+}
+
+unsigned int GlyphRenderParams::glyphIndex() const
+{
+ return m_glyphIndex;
+}
+
+void GlyphRenderParams::setGlyphIndex(unsigned int glyphIndex)
+{
+ m_glyphIndex = glyphIndex;
+}
+
+unsigned int GlyphRenderParams::lastGlyph() const
+{
+ return m_lastGlyph;
+}
+
+void GlyphRenderParams::setLastGlyph(unsigned int lastGlyph)
+{
+ m_lastGlyph = lastGlyph;
+}
+
+unsigned short GlyphRenderParams::character() const
+{
+ return m_character;
+}
+
+void GlyphRenderParams::setCharacter(unsigned short character)
+{
+ m_character = character;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Glyph.h b/ksvg/impl/libs/libtext2path/src/Glyph.h
new file mode 100644
index 00000000..b3bd3fb5
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Glyph.h
@@ -0,0 +1,198 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_GLYPH_H
+#define T2P_GLYPH_H
+
+#include <list>
+#include <vector>
+#include <string>
+
+#include "Affine.h"
+#include "BezierPath.h"
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+namespace T2P
+{
+ class Font;
+
+ // Represent one single glyph in cache
+ class Glyph
+ {
+ public:
+ Glyph();
+ ~Glyph();
+
+ Affine &affine(); // Initial tracing affine
+ void setAffine(const Affine &affine);
+
+ const BezierPath *bezierPath() const; // Non-modifyable bezierPath belonging to this glyph
+ BezierPath *modifiableBezierPath(); // ONLY USED BY GLYPHTRACER, DO NOT USE SOMEWHERE ELSE!
+ void setBezierPath(const BezierPath *bpath);
+
+ FT_BBox *ftBbox();
+
+ private:
+ Affine m_affine;
+ FT_BBox m_ftBbox[4];
+ BezierPath *m_bezierPath;
+ };
+
+ // Is created for every character which needs to
+ // be rendered and has to be deleted by the "client"
+ class GlyphAffinePair
+ {
+ public:
+ GlyphAffinePair(const Glyph *glyph, const Affine &affine);
+ ~GlyphAffinePair();
+
+ void setTransformatedPath(const BezierPath *path);
+ const BezierPath *transformatedPath() const;
+
+ const Glyph *glyph() const;
+ Affine &affine();
+
+ private:
+ const Glyph *m_glyph;
+ const BezierPath *m_transformatedPath;
+ Affine m_affine;
+ };
+
+ class GlyphSet
+ {
+ public:
+ GlyphSet();
+ ~GlyphSet();
+
+ std::vector<GlyphAffinePair *> &set();
+ std::list<float> glyphXAdvance();
+ std::list<float> glyphYAdvance();
+
+ unsigned int glyphCount() const;
+
+ int width() const;
+ int height() const;
+
+ int bboxX() const;
+ int bboxY() const;
+
+ double xpen() const;
+ double ypen() const;
+
+ int underlinePosition() const;
+ int underlineThickness() const;
+ int overlinePosition() const;
+ int strikeThroughPosition() const;
+ int pixelBaseline() const;
+
+ private:
+ friend class Converter;
+ unsigned int m_glyphCount; // Number of glyphs in the set
+
+ int m_bboxX, m_bboxY; // Bounding box locations (x,y) + (x + width, y + width)
+ int m_width, m_height;
+
+ double m_xpen, m_ypen; // relative pen locations
+
+ int m_underlinePosition, m_underlineThickness, m_overlinePosition, m_strikeThroughPosition, m_pixelBaseline;
+
+ std::vector<GlyphAffinePair *> m_set; // Bezier paths in the set
+
+ std::list<float> m_glyphXAdvance; // List of advance values needed ie. for text paths
+ std::list<float> m_glyphYAdvance;
+ };
+
+ class GlyphLayoutParams
+ {
+ public:
+ GlyphLayoutParams();
+ ~GlyphLayoutParams();
+
+ bool tb() const;
+ void setTb(bool tb);
+
+ bool useBidi() const;
+ void setUseBidi(bool bidi);
+
+ double wordSpacing() const;
+ void setWordSpacing(double wordSpacing);
+
+ double letterSpacing() const;
+ void setLetterSpacing(double letterSpacing);
+
+ std::string baselineShift() const;
+ void setBaselineShift(const std::string &baseline);
+
+ int glyphOrientationVertical() const;
+ void setGlyphOrientationVertical(int orient);
+
+ int glyphOrientationHorizontal() const;
+ void setGlyphOrientationHorizontal(int orient);
+
+ // textOnPath specific stuff
+ double textPathStartOffset() const;
+ void setTextPathStartOffset(double offset);
+
+ private:
+ bool m_tb; // Top-To-Bottom or Bottom-To-Top ?
+ bool m_useBidi; // Use Bidi ?
+ double m_wordSpacing, m_letterSpacing; // word/character spacing
+ double m_textPathStartOffset; // range: 0.0 - 1.0; start offset in the path
+ int m_glyphOrientationVertical, m_glyphOrientationHorizontal; // Degrees...
+ std::string m_baseline; // baseline description, using same system as svg
+ };
+
+ class GlyphRenderParams
+ {
+ public:
+ GlyphRenderParams();
+ ~GlyphRenderParams();
+
+ Font *font() const;
+ void setFont(Font *font);
+
+ const GlyphLayoutParams *layout() const;
+ void setLayout(const GlyphLayoutParams *layout);
+
+ unsigned int glyphIndex() const;
+ void setGlyphIndex(unsigned int glyphIndex);
+
+ unsigned int lastGlyph() const;
+ void setLastGlyph(unsigned int lastGlyph);
+
+ unsigned short character() const;
+ void setCharacter(unsigned short character);
+
+ private:
+ Font *m_font;
+ const GlyphLayoutParams *m_layout; // Glyph layouting params
+
+ unsigned int m_glyphIndex; // 'character' index in font
+ unsigned int m_lastGlyph; // Kerning
+ unsigned short m_character; // Unicode glyph to process
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/GlyphTracer.cpp b/ksvg/impl/libs/libtext2path/src/GlyphTracer.cpp
new file mode 100644
index 00000000..42457553
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/GlyphTracer.cpp
@@ -0,0 +1,76 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "GlyphTracer.h"
+
+using namespace T2P;
+
+GlyphTracer::GlyphTracer()
+{
+ m_moveTo = 0;
+ m_lineTo = 0;
+ m_conicBezier = 0;
+ m_cubicBezier = 0;
+ m_outlineMethods = 0;
+}
+
+GlyphTracer::~GlyphTracer()
+{
+ delete m_outlineMethods;
+}
+
+void GlyphTracer::setMoveto(FT_Outline_MoveToFunc funcPtr)
+{
+ m_moveTo = funcPtr;
+}
+
+void GlyphTracer::setLineto(FT_Outline_LineToFunc funcPtr)
+{
+ m_lineTo = funcPtr;
+}
+
+void GlyphTracer::setConicBezier(FT_Outline_ConicToFunc funcPtr)
+{
+ m_conicBezier = funcPtr;
+}
+
+void GlyphTracer::setCubicBezier(FT_Outline_CubicToFunc funcPtr)
+{
+ m_cubicBezier = funcPtr;
+}
+
+FT_Outline_Funcs *GlyphTracer::outlineFuncs()
+{
+ if(m_outlineMethods)
+ return m_outlineMethods;
+
+ FT_Outline_Funcs *ret = new FT_Outline_Funcs();
+ ret->move_to = m_moveTo;
+ ret->line_to = m_lineTo;
+ ret->conic_to = m_conicBezier;
+ ret->cubic_to = m_cubicBezier;
+ ret->shift = 0;
+ ret->delta = 0;
+
+ m_outlineMethods = ret;
+ return m_outlineMethods;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/GlyphTracer.h b/ksvg/impl/libs/libtext2path/src/GlyphTracer.h
new file mode 100644
index 00000000..7607ecad
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/GlyphTracer.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_GLYPHTRACER_H
+#define T2P_GLYPHTRACER_H
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+namespace T2P
+{
+ class Glyph;
+ class BezierPath;
+ class GlyphAffinePair;
+
+ class GlyphTracer
+ {
+ public:
+ GlyphTracer();
+ virtual ~GlyphTracer();
+
+ // Needs to be implemented
+ virtual void correctGlyph(GlyphAffinePair *glyphAffine) = 0;
+ virtual BezierPath *allocBezierPath(int size) = 0;
+ virtual void closePath(Glyph *glyph) = 0;
+
+ // FreeType glyph tracing functions
+ void setMoveto(FT_Outline_MoveToFunc funcPtr);
+ void setLineto(FT_Outline_LineToFunc funcPtr);
+ void setConicBezier(FT_Outline_ConicToFunc funcPtr);
+ void setCubicBezier(FT_Outline_CubicToFunc funcPtr);
+
+ FT_Outline_Funcs *outlineFuncs();
+
+ private:
+ FT_Outline_Funcs *m_outlineMethods;
+
+ FT_Outline_MoveToFunc m_moveTo;
+ FT_Outline_LineToFunc m_lineTo;
+ FT_Outline_ConicToFunc m_conicBezier;
+ FT_Outline_CubicToFunc m_cubicBezier;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Makefile.am b/ksvg/impl/libs/libtext2path/src/Makefile.am
new file mode 100644
index 00000000..175e1a91
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Makefile.am
@@ -0,0 +1,10 @@
+lib_LTLIBRARIES = libtext2path.la
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+INCLUDES = $(FRIBIDI_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
+
+libtext2path_includedir=$(includedir)/libtext2path-0.1
+libtext2path_include_HEADERS = BezierPath.h Glyph.h GlyphTracer.h
+
+libtext2path_la_SOURCES = Affine.cpp Rectangle.cpp Font.cpp Glyph.cpp GlyphTracer.cpp Converter.cpp QtUnicode.cpp
+libtext2path_la_LDFLAGS = $(FRIBIDI_LIBS) $(FONTCONFIG_LIBS)
diff --git a/ksvg/impl/libs/libtext2path/src/Point.h b/ksvg/impl/libs/libtext2path/src/Point.h
new file mode 100644
index 00000000..d95742a2
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Point.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_POINT_H
+#define T2P_POINT_H
+
+namespace T2P
+{
+ class Point
+ {
+ public:
+ Point() { m_x = 0.0; m_y = 0.0; }
+ Point(double x, double y) { m_x = x; m_y = y; }
+ Point &operator=(const Point &other) { m_x = other.x(); m_y = other.y(); return *this; }
+
+ friend inline Point operator+(const Point &, const Point &);
+ friend inline Point operator-(const Point &, const Point &);
+ friend inline Point operator*(const double &, const Point &);
+ friend inline Point operator*(const Point &, const double &);
+
+ double x() const { return m_x; }
+ double y() const { return m_y; }
+
+ void setX(double x) { m_x = x; }
+ void setY(double y) { m_y = y; }
+
+ const Point invert() const
+ {
+ Point temp;
+ temp.setX(-x());
+ temp.setY(-y());
+ return temp;
+ }
+
+ private:
+ double m_x;
+ double m_y;
+ };
+
+ inline Point operator+(const Point &p1, const Point &p2) { return Point(p1.m_x + p2.m_x, p1.m_y + p2.m_y); }
+ inline Point operator-(const Point &p1, const Point &p2) { return Point(p1.m_x - p2.m_x, p1.m_y - p2.m_y); }
+ inline Point operator*(const double &c, const Point &p) { return Point(p.m_x * c, p.m_y * c); }
+ inline Point operator*(const Point &p, const double &c) { return Point(p.m_x * c, p.m_y * c); }
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp
new file mode 100644
index 00000000..694ed5c7
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+**
+** ???
+**
+** Copyright (C) 2002-2003 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "QtUnicode.h"
+
+using namespace T2P;
+// START OF GENERATED DATA
+
+// copied form qfont.h, as we can't include it in tools. Do not modify without
+// changing the script enum in qfont.h aswell.
+const unsigned char QtUnicode::otherScripts [120] = {
+#define SCRIPTS_02 0
+ 0xaf, Latin, 0xff, SpacingModifiers, // row 0x02, index 0
+#define SCRIPTS_03 4
+ 0x6f, CombiningMarks, 0xff, Greek, // row 0x03, index 4
+#define SCRIPTS_05 8
+ 0x2f, Cyrillic, 0x8f, Armenian, 0xff, Hebrew, // row 0x05, index 8
+#define SCRIPTS_07 14
+ 0x4f, Syriac, 0x7f, Unicode, 0xbf, Thaana,
+ 0xff, Unicode, // row 0x07, index 14
+#define SCRIPTS_10 22
+ 0x9f, Myanmar, 0xff, Georgian, // row 0x10, index 20
+#define SCRIPTS_13 26
+ 0x7f, Ethiopic, 0x9f, Unicode, 0xff, Cherokee, // row 0x13, index 24
+#define SCRIPTS_16 32
+ 0x7f, CanadianAboriginal, 0x9f, Ogham,
+ 0xff, Runic, // row 0x16 index 30
+#define SCRIPTS_17 38
+ 0x1f, Tagalog, 0x3f, Hanunoo, 0x5f, Buhid,
+ 0x7f, Tagbanwa, 0xff, Khmer, // row 0x17, index 36
+#define SCRIPTS_18 48
+ 0xaf, Mongolian, 0xff, Unicode, // row 0x18, index 46
+#define SCRIPTS_20 52
+ 0x0b, Unicode, 0x0d, UnknownScript, 0x6f, Unicode, 0x9f, NumberForms,
+ 0xab, CurrencySymbols, 0xac, Latin,
+ 0xcf, CurrencySymbols, 0xff, CombiningMarks, // row 0x20, index 50
+#define SCRIPTS_21 68
+ 0x4f, LetterlikeSymbols, 0x8f, NumberForms,
+ 0xff, MathematicalOperators, // row 0x21, index 62
+#define SCRIPTS_24 74
+ 0x5f, TechnicalSymbols, 0xff, EnclosedAndSquare, // row 0x24, index 68
+#define SCRIPTS_2e 78
+ 0x7f, Unicode, 0xff, Han, // row 0x2e, index 72
+#define SCRIPTS_30 82
+ 0x3f, Han, 0x9f, Hiragana, 0xff, Katakana, // row 0x30, index 76
+#define SCRIPTS_31 88
+ 0x2f, Bopomofo, 0x8f, Hangul, 0x9f, Han,
+ 0xff, Unicode, // row 0x31, index 82
+#define SCRIPTS_fb 96
+ 0x06, Latin, 0x1c, Unicode, 0x4f, Hebrew,
+ 0xff, Arabic, // row 0xfb, index 90
+#define SCRIPTS_fe 104
+ 0x1f, Unicode, 0x2f, CombiningMarks, 0x6f, Unicode,
+ 0xff, Arabic, // row 0xfe, index 98
+#define SCRIPTS_ff 112
+ 0x5e, Katakana, 0x60, Unicode, // row 0xff, index 106
+ 0x9f, KatakanaHalfWidth, 0xff, Unicode
+};
+
+// (uc-0x0900)>>7
+const unsigned char QtUnicode::indicScripts [] =
+{
+ Devanagari, Bengali,
+ Gurmukhi, Gujarati,
+ Oriya, Tamil,
+ Telugu, Kannada,
+ Malayalam, Sinhala,
+ Thai, Lao
+};
+
+
+// 0x80 + x: x is the offset into the otherScripts table
+const unsigned char QtUnicode::scriptTable[256] =
+{
+ Latin, Latin, 0x80+SCRIPTS_02, 0x80+SCRIPTS_03,
+ Cyrillic, 0x80+SCRIPTS_05, Arabic, 0x80+SCRIPTS_07,
+ Unicode, SCRIPTS_INDIC, SCRIPTS_INDIC, SCRIPTS_INDIC,
+ SCRIPTS_INDIC, SCRIPTS_INDIC, SCRIPTS_INDIC, Tibetan,
+
+ 0x80+SCRIPTS_10, Hangul, Ethiopic, 0x80+SCRIPTS_13,
+ CanadianAboriginal, CanadianAboriginal, 0x80+SCRIPTS_16, 0x80+SCRIPTS_17,
+ 0x80+SCRIPTS_18, Unicode, Unicode, Unicode,
+ Unicode, Unicode, Latin, Greek,
+
+ 0x80+SCRIPTS_20, 0x80+SCRIPTS_21, MathematicalOperators, TechnicalSymbols,
+ 0x80+SCRIPTS_24, GeometricSymbols, MiscellaneousSymbols, MiscellaneousSymbols,
+ Braille, Unicode, Unicode, Unicode,
+ Unicode, Unicode, 0x80+SCRIPTS_2e, Han,
+
+ 0x80+SCRIPTS_30, 0x80+SCRIPTS_31, EnclosedAndSquare, EnclosedAndSquare,
+ Han, Han, Han, Han,
+ Han, Han, Han, Han,
+ Han, Han, Han, Han,
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+ Han, Han, Han, Han, Han, Han, Han, Han,
+ Han, Han, Han, Han, Han, Han, Han, Han,
+
+ Yi, Yi, Yi, Yi, Yi, Unicode, Unicode, Unicode,
+ Unicode, Unicode, Unicode, Unicode, Hangul, Hangul, Hangul, Hangul,
+
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+ Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
+
+ Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
+ Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
+
+ Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode, Unicode,
+ Unicode, Han, Han, 0x80+SCRIPTS_fb, Arabic, Arabic, 0x80+SCRIPTS_fe, 0x80+SCRIPTS_ff
+};
+
diff --git a/ksvg/impl/libs/libtext2path/src/QtUnicode.h b/ksvg/impl/libs/libtext2path/src/QtUnicode.h
new file mode 100644
index 00000000..41008500
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/QtUnicode.h
@@ -0,0 +1,149 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_QT_UNICODE_H
+#define T2P_QT_UNICODE_H
+
+namespace T2P
+{
+ enum Script
+ {
+ // European Alphabetic Scripts
+ Latin,
+ Greek,
+ Cyrillic,
+ Armenian,
+ Georgian,
+ Runic,
+ Ogham,
+ SpacingModifiers,
+ CombiningMarks,
+
+ // Middle Eastern Scripts
+ Hebrew,
+ Arabic,
+ Syriac,
+ Thaana,
+
+ // South and Southeast Asian Scripts
+ Devanagari,
+ Bengali,
+ Gurmukhi,
+ Gujarati,
+ Oriya,
+ Tamil,
+ Telugu,
+ Kannada,
+ Malayalam,
+ Sinhala,
+ Thai,
+ Lao,
+ Tibetan,
+ Myanmar,
+ Khmer,
+
+ // East Asian Scripts
+ Han,
+ Hiragana,
+ Katakana,
+ Hangul,
+ Bopomofo,
+ Yi,
+
+ // Additional Scripts
+ Ethiopic,
+ Cherokee,
+ CanadianAboriginal,
+ Mongolian,
+
+ // Symbols
+ CurrencySymbols,
+ LetterlikeSymbols,
+ NumberForms,
+ MathematicalOperators,
+ TechnicalSymbols,
+ GeometricSymbols,
+ MiscellaneousSymbols,
+ EnclosedAndSquare,
+ Braille,
+
+ Unicode,
+
+ // some scripts added in Unicode 3.2
+ Tagalog,
+ Hanunoo,
+ Buhid,
+ Tagbanwa,
+
+ KatakanaHalfWidth,
+
+ // End
+ NScripts,
+ UnknownScript = NScripts
+ };
+
+ class QtUnicode
+ {
+ public:
+ QtUnicode() { }
+ ~QtUnicode() { }
+
+ static int scriptForChar(unsigned short uc)
+ {
+ unsigned char script = QtUnicode::scriptTable[(uc >> 8)];
+ if(script >= QtUnicode::SCRIPTS_INDIC)
+ {
+ if(script == QtUnicode::SCRIPTS_INDIC)
+ script = QtUnicode::indicScripts[(uc - 0x0900) >> 7];
+ else
+ {
+ // 0x80 + SCRIPTS_xx
+ unsigned char index = script - 0x80;
+ unsigned char cell = uc & 0xff;
+ while(QtUnicode::otherScripts[index++] < cell)
+ index++;
+ script = QtUnicode::otherScripts[index];
+ }
+ }
+
+ return script;
+ }
+
+ private:
+ enum
+ {
+ SCRIPTS_INDIC = 0x7e
+ };
+
+ static const unsigned char otherScripts[];
+ static const unsigned char indicScripts[];
+ static const unsigned char scriptTable[];
+ };
+}
+
+#define SCRIPT_FOR_CHAR(script, c) \
+if(c < 0x100) \
+ script = T2P::Latin; \
+else \
+ script = (T2P::Script) QtUnicode::scriptForChar(c);
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Rectangle.cpp b/ksvg/impl/libs/libtext2path/src/Rectangle.cpp
new file mode 100644
index 00000000..ef59d6be
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Rectangle.cpp
@@ -0,0 +1,102 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "Tools.h"
+#include "Rectangle.h"
+
+using namespace T2P;
+
+Rectangle::Rectangle()
+{
+}
+
+Rectangle::Rectangle(const Rectangle &other)
+{
+ (*this) = other;
+}
+
+Rectangle::Rectangle(const Point &a, const Point &b) : m_a(a), m_b(b)
+{
+}
+
+Rectangle::Rectangle(double x, double y, double width, double height)
+{
+ m_a = Point(x, y);
+ m_b = Point(x + width, y + height);
+}
+
+Rectangle::~Rectangle()
+{
+}
+
+Rectangle &Rectangle::operator=(const Rectangle &other)
+{
+ m_a = other.m_a;
+ m_b = other.m_b;
+
+ return *this;
+}
+
+Point Rectangle::a() const
+{
+ return m_a;
+}
+
+void Rectangle::setA(const Point &a)
+{
+ m_a = a;
+}
+
+Point Rectangle::b() const
+{
+ return m_b;
+}
+
+void Rectangle::setB(const Point &b)
+{
+ m_b = b;
+}
+
+void Rectangle::bboxUnion(const Rectangle &src1, const Rectangle &src2)
+{
+ double src1x0 = src1.a().x(), src1x1 = src1.b().x();
+ double src1y0 = src1.a().y(), src1y1 = src1.b().y();
+
+ double src2x0 = src2.a().x(), src2x1 = src2.b().x();
+ double src2y0 = src2.a().y(), src2y1 = src2.b().y();
+
+ if(src1x1 <= src1x0 || src1y1 <= src1y0) // Is src1 empty?
+ { // Copy src2 to dst
+ setA(Point(src2x0, src2y0));
+ setB(Point(src2x1, src2y1));
+ }
+ else if(src2x1 <= src2x0 || src2y1 <= src2y0) // Is src2 empty?
+ { // Copy src1 to dest
+ setA(Point(src1x0, src1y0));
+ setB(Point(src1x1, src1y1));
+ }
+ else
+ {
+ setA(Point(T2PMIN(src1x0, src2x0), T2PMIN(src1y0, src2y0)));
+ setB(Point(T2PMAX(src1x1, src2x1), T2PMAX(src1y1, src2y1)));
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Rectangle.h b/ksvg/impl/libs/libtext2path/src/Rectangle.h
new file mode 100644
index 00000000..1a5eeeb1
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Rectangle.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_RECTANGLE_H
+#define T2P_RECTANGLE_H
+
+#include "Point.h"
+
+namespace T2P
+{
+ class Rectangle
+ {
+ public:
+ Rectangle();
+ Rectangle(const Rectangle &other);
+ Rectangle(const Point &a, const Point &b);
+ Rectangle(double x, double y, double width, double height);
+ ~Rectangle();
+
+ Rectangle &operator=(const Rectangle &other);
+
+ Point a() const;
+ void setA(const Point &a);
+
+ Point b() const;
+ void setB(const Point &b);
+
+ // Finds the smallest rectangle that includes src1 and src2.
+ void bboxUnion(const Rectangle &src1, const Rectangle &src2);
+
+ private:
+ Point m_a, m_b;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/Tools.h b/ksvg/impl/libs/libtext2path/src/Tools.h
new file mode 100644
index 00000000..c7753365
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/Tools.h
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_TOOLS_H
+#define T2P_TOOLS_H
+
+#include <list>
+#include <string>
+#include <config.h>
+#ifdef HAVE_SSTREAM
+# include <sstream>
+#else
+# include <strstream>
+# define ostringstream ostrstream
+#endif
+
+#define T2PMAX(a, b) ((b) < (a) ? (a) : (b))
+#define T2PMIN(a, b) ((a) < (b) ? (a) : (b))
+
+namespace T2P
+{
+ class Tools
+ {
+ public:
+ static std::string joinList(char seperator, std::list<std::string> &list)
+ {
+ std::string result;
+
+ if(list.empty())
+ return result;
+
+ bool first = true;
+ for(std::list<std::string>::const_iterator it = list.begin(); it != list.end(); ++it)
+ {
+ std::string string = *it;
+
+ if(!string.empty())
+ {
+ if(!first)
+ result += seperator + string;
+ else
+ {
+ result += string;
+ first = false;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ template<typename T>
+ static std::string a2str(T arg)
+ {
+ std::ostringstream buffer;
+ buffer << arg;
+ return buffer.str();
+ }
+ };
+}
+
+#ifdef ostringstream
+# undef ostringstream
+#endif
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/assert.hpp b/ksvg/impl/libs/libtext2path/src/myboost/assert.hpp
new file mode 100644
index 00000000..3f3c61c2
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/assert.hpp
@@ -0,0 +1,24 @@
+//
+// boost/assert.hpp - BOOST_ASSERT(expr)
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// Note: There are no include guards. This is intentional.
+//
+// See http://www.boost.org/libs/utility/assert.html for documentation.
+//
+
+#ifndef ASSERT_HPP
+#define ASSERT_HPP
+
+#undef BOOST_ASSERT
+
+# include <assert.h>
+# define BOOST_ASSERT(expr) assert(expr)
+
+#endif
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/checked_delete.hpp b/ksvg/impl/libs/libtext2path/src/myboost/checked_delete.hpp
new file mode 100644
index 00000000..73afd5f5
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/checked_delete.hpp
@@ -0,0 +1,61 @@
+#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
+#define BOOST_CHECKED_DELETE_HPP_INCLUDED
+
+//
+// boost/checked_delete.hpp
+//
+// Copyright (c) 1999, 2000, 2001, 2002 boost.org
+// Copyright (c) 2002, 2003 Peter Dimov
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org/libs/utility/checked_delete.html for documentation.
+//
+
+namespace myboost
+{
+
+// verify that types are complete for increased safety
+
+template<class T> inline void checked_delete(T * x)
+{
+ // Intel 7 accepts sizeof(incomplete) as 0 in system headers
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ delete x;
+}
+
+template<class T> inline void checked_array_delete(T * x)
+{
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ delete [] x;
+}
+
+template<class T> struct checked_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const
+ {
+ // boost:: disables ADL
+ myboost::checked_delete(x);
+ }
+};
+
+template<class T> struct checked_array_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const
+ {
+ myboost::checked_array_delete(x);
+ }
+};
+
+} // namespace myboost
+
+#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/lightweight_mutex.hpp b/ksvg/impl/libs/libtext2path/src/myboost/lightweight_mutex.hpp
new file mode 100644
index 00000000..10db127c
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/lightweight_mutex.hpp
@@ -0,0 +1,74 @@
+#ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
+
+//
+// boost/detail/lwm_pthreads.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <pthread.h>
+
+namespace myboost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ pthread_mutex_t m_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex()
+ {
+ pthread_mutex_init(&m_, 0);
+ }
+
+ ~lightweight_mutex()
+ {
+ pthread_mutex_destroy(&m_);
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ pthread_mutex_t & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ scoped_lock(lightweight_mutex & m): m_(m.m_)
+ {
+ pthread_mutex_lock(&m_);
+ }
+
+ ~scoped_lock()
+ {
+ pthread_mutex_unlock(&m_);
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace myboost
+
+#endif // #ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/shared_count.hpp b/ksvg/impl/libs/libtext2path/src/myboost/shared_count.hpp
new file mode 100644
index 00000000..e8ec19a8
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/shared_count.hpp
@@ -0,0 +1,367 @@
+#ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
+#define BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
+
+//
+// detail/shared_count.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include "myboost/checked_delete.hpp"
+#include "myboost/throw_exception.hpp"
+#include "myboost/lightweight_mutex.hpp"
+
+#include <memory> // std::auto_ptr, std::allocator
+#include <functional> // std::less
+#include <exception> // std::exception
+#include <new> // std::bad_alloc
+#include <typeinfo> // std::type_info in get_deleter
+#include <cstddef> // std::size_t
+
+namespace myboost
+{
+
+class bad_weak_ptr: public std::exception
+{
+public:
+
+ virtual char const * what() const throw()
+ {
+ return "myboost::bad_weak_ptr";
+ }
+};
+
+namespace detail
+{
+
+class sp_counted_base
+{
+private:
+
+ typedef detail::lightweight_mutex mutex_type;
+
+public:
+
+ sp_counted_base(): use_count_(1), weak_count_(1)
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destruct() is called when weak_count_ drops to zero.
+
+ virtual void destruct() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter(std::type_info const & ti) = 0;
+
+ void add_ref_copy()
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ ++use_count_;
+ }
+
+ void add_ref_lock()
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ if(use_count_ == 0) myboost::throw_exception(myboost::bad_weak_ptr());
+ ++use_count_;
+ }
+
+ void release() // nothrow
+ {
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ long new_use_count = --use_count_;
+
+ if(new_use_count != 0) return;
+ }
+
+ dispose();
+ weak_release();
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ ++weak_count_;
+ }
+
+ void weak_release() // nothrow
+ {
+ long new_weak_count;
+
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ new_weak_count = --weak_count_;
+ }
+
+ if(new_weak_count == 0)
+ {
+ destruct();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ mutex_type::scoped_lock lock(mtx_);
+ return use_count_;
+ }
+
+private:
+
+ sp_counted_base(sp_counted_base const &);
+ sp_counted_base & operator= (sp_counted_base const &);
+
+ long use_count_; // #shared
+ long weak_count_; // #weak + (#shared != 0)
+
+ mutable mutex_type mtx_;
+};
+
+template<class P, class D> class sp_counted_base_impl: public sp_counted_base
+{
+private:
+
+ P ptr; // copy constructor must not throw
+ D del; // copy constructor must not throw
+
+ sp_counted_base_impl(sp_counted_base_impl const &);
+ sp_counted_base_impl & operator= (sp_counted_base_impl const &);
+
+ typedef sp_counted_base_impl<P, D> this_type;
+
+public:
+
+ // pre: initial_use_count <= initial_weak_count, d(p) must not throw
+
+ sp_counted_base_impl(P p, D d): ptr(p), del(d)
+ {
+ }
+
+ virtual void dispose() // nothrow
+ {
+ del(ptr);
+ }
+
+ virtual void * get_deleter(std::type_info const & ti)
+ {
+ return ti == typeid(D)? &del: 0;
+ }
+
+ void * operator new(std::size_t)
+ {
+ return std::allocator<this_type>().allocate(1, static_cast<this_type *>(0));
+ }
+
+ void operator delete(void * p)
+ {
+ std::allocator<this_type>().deallocate(static_cast<this_type *>(p), 1);
+ }
+};
+
+class weak_count;
+
+class shared_count
+{
+private:
+
+ sp_counted_base * pi_;
+
+ friend class weak_count;
+
+public:
+
+ shared_count(): pi_(0) // nothrow
+ {
+ }
+
+ template<class P, class D> shared_count(P p, D d): pi_(0)
+ {
+
+ try
+ {
+ pi_ = new sp_counted_base_impl<P, D>(p, d);
+ }
+ catch(...)
+ {
+ d(p); // delete p
+ throw;
+ }
+
+
+ pi_ = new sp_counted_base_impl<P, D>(p, d);
+
+ if(pi_ == 0)
+ {
+ d(p); // delete p
+ myboost::throw_exception(std::bad_alloc());
+ }
+ }
+
+ // auto_ptr<Y> is special cased to provide the strong guarantee
+
+ template<class Y>
+ explicit shared_count(std::auto_ptr<Y> & r): pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>()))
+ {
+ r.release();
+ }
+
+ ~shared_count() // nothrow
+ {
+ if(pi_ != 0) pi_->release();
+ }
+
+ shared_count(shared_count const & r): pi_(r.pi_) // nothrow
+ {
+ if(pi_ != 0) pi_->add_ref_copy();
+ }
+
+ explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0
+
+ shared_count & operator= (shared_count const & r) // nothrow
+ {
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->add_ref_copy();
+ if(pi_ != 0) pi_->release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ void swap(shared_count & r) // nothrow
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const // nothrow
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+
+ bool unique() const // nothrow
+ {
+ return use_count() == 1;
+ }
+
+ friend inline bool operator==(shared_count const & a, shared_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(shared_count const & a, shared_count const & b)
+ {
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
+ }
+
+ void * get_deleter(std::type_info const & ti) const
+ {
+ return pi_? pi_->get_deleter(ti): 0;
+ }
+};
+
+class weak_count
+{
+private:
+
+ sp_counted_base * pi_;
+
+ friend class shared_count;
+
+public:
+
+ weak_count(): pi_(0) // nothrow
+ {
+ }
+
+ weak_count(shared_count const & r): pi_(r.pi_) // nothrow
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+
+ weak_count(weak_count const & r): pi_(r.pi_) // nothrow
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+
+ ~weak_count() // nothrow
+ {
+ if(pi_ != 0) pi_->weak_release();
+ }
+
+ weak_count & operator= (shared_count const & r) // nothrow
+ {
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ weak_count & operator= (weak_count const & r) // nothrow
+ {
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ void swap(weak_count & r) // nothrow
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const // nothrow
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+
+ friend inline bool operator==(weak_count const & a, weak_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(weak_count const & a, weak_count const & b)
+ {
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
+ }
+};
+
+inline shared_count::shared_count(weak_count const & r): pi_(r.pi_)
+{
+ if(pi_ != 0)
+ {
+ pi_->add_ref_lock();
+ }
+ else
+ {
+ myboost::throw_exception(myboost::bad_weak_ptr());
+ }
+}
+
+} // namespace detail
+
+} // namespace myboost
+
+#endif // #ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp b/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp
new file mode 100644
index 00000000..3f2fe30d
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp
@@ -0,0 +1,395 @@
+#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
+#define BOOST_SHARED_PTR_HPP_INCLUDED
+
+// shared_ptr.hpp
+//
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+// Copyright (c) 2001, 2002, 2003 Peter Dimov
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
+//
+
+#include "myboost/assert.hpp"
+#include "myboost/checked_delete.hpp"
+#include "myboost/throw_exception.hpp"
+#include "myboost/shared_count.hpp"
+
+#include <memory> // for std::auto_ptr
+#include <algorithm> // for std::swap
+#include <functional> // for std::less
+#include <typeinfo> // for std::bad_cast
+#include <iosfwd> // for std::basic_ostream
+
+namespace myboost
+{
+
+template<class T> class weak_ptr;
+template<class T> class enable_shared_from_this;
+
+namespace detail
+{
+
+struct static_cast_tag {};
+struct const_cast_tag {};
+struct dynamic_cast_tag {};
+struct polymorphic_cast_tag {};
+
+template<class T> struct shared_ptr_traits
+{
+ typedef T & reference;
+};
+
+template<> struct shared_ptr_traits<void>
+{
+ typedef void reference;
+};
+
+template<> struct shared_ptr_traits<void const>
+{
+ typedef void reference;
+};
+
+template<> struct shared_ptr_traits<void volatile>
+{
+ typedef void reference;
+};
+
+template<> struct shared_ptr_traits<void const volatile>
+{
+ typedef void reference;
+};
+
+// enable_shared_from_this support
+
+template<class T, class Y> void sp_enable_shared_from_this(myboost::enable_shared_from_this<T> * pe, Y * px, shared_count const & pn)
+{
+ if(pe != 0) pe->_internal_weak_this._internal_assign(px, pn);
+}
+
+inline void sp_enable_shared_from_this(void const *, void const *, shared_count const &)
+{
+}
+
+} // namespace detail
+
+
+//
+// shared_ptr
+//
+// An enhanced relative of scoped_ptr with reference counted copy semantics.
+// The object pointed to is deleted when the last shared_ptr pointing to it
+// is destroyed or reset.
+//
+
+template<class T> class shared_ptr
+{
+private:
+
+ // Borland 5.5.1 specific workaround
+ typedef shared_ptr<T> this_type;
+
+public:
+
+ typedef T element_type;
+ typedef T value_type;
+ typedef T * pointer;
+ typedef typename detail::shared_ptr_traits<T>::reference reference;
+
+ shared_ptr(): px(0), pn() // never throws in 1.30+
+ {
+ }
+
+ template<class Y>
+ explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>()) // Y must be complete
+ {
+ detail::sp_enable_shared_from_this(p, p, pn);
+ }
+
+ //
+ // Requirements: D's copy constructor must not throw
+ //
+ // shared_ptr will release p by calling d(p)
+ //
+
+ template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
+ {
+ detail::sp_enable_shared_from_this(p, p, pn);
+ }
+
+// generated copy constructor, assignment, destructor are fine...
+// except that Borland C++ has a bug, and g++ with -Wsynth warns
+ shared_ptr & operator=(shared_ptr const & r) // never throws
+ {
+ px = r.px;
+ pn = r.pn; // shared_count::op= doesn't throw
+ return *this;
+ }
+
+ template<class Y>
+ explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
+ {
+ // it is now safe to copy r.px, as pn(r.pn) did not throw
+ px = r.px;
+ }
+
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+ {
+ }
+
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ }
+
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ }
+
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ if(px == 0) // need to allocate new counter -- the cast failed
+ {
+ pn = detail::shared_count();
+ }
+ }
+
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ if(px == 0)
+ {
+ myboost::throw_exception(std::bad_cast());
+ }
+ }
+
+ template<class Y>
+ explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
+ {
+ Y * tmp = r.get();
+ pn = detail::shared_count(r);
+ detail::sp_enable_shared_from_this(tmp, tmp, pn);
+ }
+
+ template<class Y>
+ shared_ptr & operator=(shared_ptr<Y> const & r) // never throws
+ {
+ px = r.px;
+ pn = r.pn; // shared_count::op= doesn't throw
+ return *this;
+ }
+
+ template<class Y>
+ shared_ptr & operator=(std::auto_ptr<Y> & r)
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+
+ void reset() // never throws in 1.30+
+ {
+ this_type().swap(*this);
+ }
+
+ template<class Y> void reset(Y * p) // Y must be complete
+ {
+ BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors
+ this_type(p).swap(*this);
+ }
+
+ template<class Y, class D> void reset(Y * p, D d)
+ {
+ this_type(p, d).swap(*this);
+ }
+
+ reference operator* () const // never throws
+ {
+ BOOST_ASSERT(px != 0);
+ return *px;
+ }
+
+ T * operator-> () const // never throws
+ {
+ BOOST_ASSERT(px != 0);
+ return px;
+ }
+
+ T * get() const // never throws
+ {
+ return px;
+ }
+
+ typedef T * (this_type::*unspecified_bool_type)() const;
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return px == 0? 0: &this_type::get;
+ }
+
+ // operator! is redundant, but some compilers need it
+
+ bool operator! () const // never throws
+ {
+ return px == 0;
+ }
+
+ bool unique() const // never throws
+ {
+ return pn.unique();
+ }
+
+ long use_count() const // never throws
+ {
+ return pn.use_count();
+ }
+
+ void swap(shared_ptr<T> & other) // never throws
+ {
+ std::swap(px, other.px);
+ pn.swap(other.pn);
+ }
+
+ template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const
+ {
+ return pn < rhs.pn;
+ }
+
+ void * _internal_get_deleter(std::type_info const & ti) const
+ {
+ return pn.get_deleter(ti);
+ }
+
+// Tasteless as this may seem, making all members public allows member templates
+// to work in the absence of member template friends. (Matthew Langston)
+
+# if __GNUC__ >= 2 && __GNUC_MINOR__ >= 97
+private:
+
+ template<class Y> friend class shared_ptr;
+ template<class Y> friend class weak_ptr;
+#endif
+
+ T * px; // contained pointer
+ detail::shared_count pn; // reference counter
+
+}; // shared_ptr
+
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() == b.get();
+}
+
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() != b.get();
+}
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
+
+// Resolve the ambiguity between our op!= and the one in rel_ops
+
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
+{
+ return a.get() != b.get();
+}
+
+#endif
+
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a._internal_less(b);
+}
+
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
+{
+ a.swap(b);
+}
+
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::static_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::const_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::dynamic_cast_tag());
+}
+
+// shared_*_cast names are deprecated. Use *_pointer_cast instead.
+
+template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::static_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::dynamic_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::polymorphic_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)
+{
+ BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get());
+ return shared_static_cast<T>(r);
+}
+
+// get_pointer() enables boost::mem_fn to recognize shared_ptr
+
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)
+{
+ return p.get();
+}
+
+// operator<<
+
+
+template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
+{
+ os << p.get();
+ return os;
+}
+
+
+// get_deleter (experimental)
+
+#if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238))
+
+// g++ 2.9x doesn't allow static_cast<X const *>(void *)
+// apparently EDG 2.38 also doesn't accept it
+
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
+{
+ void const * q = p._internal_get_deleter(typeid(D));
+ return const_cast<D *>(static_cast<D const *>(q));
+}
+
+#else
+
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
+{
+ return static_cast<D *>(p._internal_get_deleter(typeid(D)));
+}
+
+#endif
+
+} // namespace boost
+
+
+#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
diff --git a/ksvg/impl/libs/libtext2path/src/myboost/throw_exception.hpp b/ksvg/impl/libs/libtext2path/src/myboost/throw_exception.hpp
new file mode 100644
index 00000000..dd32ec43
--- /dev/null
+++ b/ksvg/impl/libs/libtext2path/src/myboost/throw_exception.hpp
@@ -0,0 +1,30 @@
+#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
+#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
+
+
+//
+// boost/throw_exception.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// http://www.boost.org/libs/utility/throw_exception.html
+//
+
+# include <exception>
+
+namespace myboost
+{
+
+template<class E> void throw_exception(E const & e)
+{
+ throw e;
+}
+
+} // namespace myboost
+
+#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
diff --git a/ksvg/impl/libs/xrgbrender/Makefile.am b/ksvg/impl/libs/xrgbrender/Makefile.am
new file mode 100644
index 00000000..1e9ebcc1
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/Makefile.am
@@ -0,0 +1,5 @@
+INCLUDES = $(all_includes)
+
+noinst_LTLIBRARIES = libksvgxrgbrender.la
+
+libksvgxrgbrender_la_SOURCES = gdk-pixbuf-xlib.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlibrgb.c
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c
new file mode 100644
index 00000000..01f60976
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c
@@ -0,0 +1,1137 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* GdkPixbuf library - convert X drawable information to RGB
+ *
+ * Copyright (C) 1999 Michael Zucchi
+ *
+ * Authors: Michael Zucchi <zucchi@zedzone.mmc.com.au>
+ * Cody Russell <bratsche@dfw.net>
+ * Federico Mena-Quintero <federico@gimp.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/* Ported to Xlib by John Harper <john@dcs.warwick.ac.uk> */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <string.h>
+#include "gdk-pixbuf-xlib-private.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#if (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+#define LITTLE
+#endif
+#define d(x)
+
+
+
+static unsigned int mask_table[] = {
+ 0x00000000, 0x00000001, 0x00000003, 0x00000007,
+ 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
+ 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
+ 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff,
+ 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff,
+ 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff,
+ 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff,
+ 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff,
+ 0xffffffff
+};
+
+
+/* color handling */
+
+typedef struct xlib_colormap_struct xlib_colormap;
+struct xlib_colormap_struct {
+ int size;
+ XColor *colors;
+ Visual *visual;
+ Colormap colormap;
+};
+
+
+/* from gdkvisual.c */
+static void
+visual_decompose_mask (unsigned long mask,
+ int *shift,
+ int *prec)
+{
+ *shift = 0;
+ *prec = 0;
+
+ while (!(mask & 0x1)) {
+ (*shift)++;
+ mask >>= 1;
+ }
+
+ while (mask & 0x1) {
+ (*prec)++;
+ mask >>= 1;
+ }
+}
+
+static int x_error;
+
+static int
+handle_x_error (Display *dpy, XErrorEvent *ev)
+{
+ x_error = 1;
+ return 0;
+}
+
+static int
+drawable_is_pixmap (Drawable d)
+{
+ /* copied from Imlib */
+
+ XErrorHandler errh;
+ XWindowAttributes wa;
+ int is_pixmap;
+
+ errh = XSetErrorHandler (handle_x_error);
+ x_error = 0;
+ XGetWindowAttributes (gdk_pixbuf_dpy, d, &wa);
+ XSync (gdk_pixbuf_dpy, False);
+ is_pixmap = x_error;
+ XSetErrorHandler (errh);
+
+ return is_pixmap;
+}
+
+
+
+/*
+ convert 1 bits-pixel data
+ no alpha
+*/
+static void
+rgb1 (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+ unsigned char *s;
+ register unsigned char data;
+ unsigned char *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ d (printf ("1 bits/pixel\n"));
+
+ /* convert upto 8 pixels/time */
+ /* its probably not worth trying to make this run very fast, who uses
+ 1 bit displays anymore? */
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+
+ for (xx = 0; xx < width; xx ++) {
+ data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;
+ *o++ = colormap->colors[data].red;
+ *o++ = colormap->colors[data].green;
+ *o++ = colormap->colors[data].blue;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 1 bits/pixel data
+ with alpha
+*/
+static void
+rgb1a (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+ unsigned char *s;
+ register unsigned char data;
+ unsigned char *o;
+ unsigned char *srow = image->data, *orow = pixels;
+ unsigned int remap[2];
+
+ d (printf ("1 bits/pixel\n"));
+
+ /* convert upto 8 pixels/time */
+ /* its probably not worth trying to make this run very fast, who uses
+ 1 bit displays anymore? */
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (xx = 0; xx < 2; xx++) {
+#ifdef LITTLE
+ remap[xx] = 0xff000000
+ | colormap->colors[xx].blue << 16
+ | colormap->colors[xx].green << 8
+ | colormap->colors[xx].red;
+#else
+ remap[xx] = 0xff
+ | colormap->colors[xx].red << 24
+ | colormap->colors[xx].green << 16
+ | colormap->colors[xx].blue << 8;
+#endif
+ }
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+
+ for (xx = 0; xx < width; xx ++) {
+ data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;
+ *o++ = remap[data];
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 8 bits/pixel data
+ no alpha
+*/
+static void
+rgb8 (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+ unsigned int mask;
+ register unsigned int data;
+ unsigned char *srow = image->data, *orow = pixels;
+ register unsigned char *s;
+ register unsigned char *o;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ d (printf ("8 bit, no alpha output\n"));
+
+ mask = mask_table[image->depth];
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+ for (xx = 0; xx < width; xx++) {
+ data = *s++ & mask;
+ *o++ = colormap->colors[data].red;
+ *o++ = colormap->colors[data].green;
+ *o++ = colormap->colors[data].blue;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 8 bits/pixel data
+ with alpha
+*/
+static void
+rgb8a (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+ unsigned int mask;
+ register unsigned int data;
+ unsigned int remap[256];
+ register unsigned char *s; /* read 2 pixels at once */
+ register unsigned int *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ d (printf ("8 bit, with alpha output\n"));
+
+ mask = mask_table[image->depth];
+
+ for (xx = 0; xx < colormap->size; xx++) {
+#ifdef LITTLE
+ remap[xx] = 0xff000000
+ | colormap->colors[xx].blue << 16
+ | colormap->colors[xx].green << 8
+ | colormap->colors[xx].red;
+#else
+ remap[xx] = 0xff
+ | colormap->colors[xx].red << 24
+ | colormap->colors[xx].green << 16
+ | colormap->colors[xx].blue << 8;
+#endif
+ }
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = (unsigned int *) orow;
+ for (xx = 0; xx < width; xx ++) {
+ data = *s++ & mask;
+ *o++ = remap[data];
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 16 bits/pixel data
+ no alpha
+ data in lsb format
+*/
+static void
+rgb565lsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned int *s; /* read 2 pixels at once */
+#else
+ register unsigned char *s; /* read 2 pixels at once */
+#endif
+ register unsigned short *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned int *) srow;
+#else
+ s = srow;
+#endif
+ o = (unsigned short *) orow;
+ for (xx = 1; xx < width; xx += 2) {
+ register unsigned int data;
+#ifdef LITTLE
+ data = *s++;
+ *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
+ | (data & 0x7e0) << 5 | (data & 0x600) >> 1;
+ *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
+ | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;
+ *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25
+ | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
+#else
+ /* swap endianness first */
+ data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24;
+ s += 4;
+ *o++ = (data & 0xf800) | (data & 0xe000) >> 5
+ | (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
+ *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
+ *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
+ | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
+#endif
+ }
+ /* check for last remaining pixel */
+ if (width & 1) {
+ register unsigned short data;
+#ifdef LITTLE
+ data = *((short *) s);
+#else
+ data = *((short *) s);
+ data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
+#endif
+ ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
+ ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
+ ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 16 bits/pixel data
+ no alpha
+ data in msb format
+*/
+static void
+rgb565msb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned char *s; /* need to swap data order */
+#else
+ register unsigned int *s; /* read 2 pixels at once */
+#endif
+ register unsigned short *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = srow;
+#else
+ s = (unsigned int *) srow;
+#endif
+ o = (unsigned short *) orow;
+ for (xx = 1; xx < width; xx += 2) {
+ register unsigned int data;
+#ifdef LITTLE
+ /* swap endianness first */
+ data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24;
+ s += 4;
+ *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
+ | (data & 0x7e0) << 5 | (data & 0x600) >> 1;
+ *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
+ | (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;
+ *o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25
+ | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
+#else
+ data = *s++;
+ *o++ = (data & 0xf800) | (data & 0xe000) >> 5
+ | (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
+ *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
+ *o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
+ | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
+#endif
+ }
+ /* check for last remaining pixel */
+ if (width & 1) {
+ register unsigned short data;
+#ifdef LITTLE
+ data = *((short *) s);
+ data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
+#else
+ data = *((short *) s);
+#endif
+ ((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
+ ((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
+ ((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 16 bits/pixel data
+ with alpha
+ data in lsb format
+*/
+static void
+rgb565alsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned short *s; /* read 1 pixels at once */
+#else
+ register unsigned char *s;
+#endif
+ register unsigned int *o;
+
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned short *) srow;
+#else
+ s = (unsigned char *) srow;
+#endif
+ o = (unsigned int *) orow;
+ for (xx = 0; xx < width; xx ++) {
+ register unsigned int data;
+ /* rrrrrggg gggbbbbb -> rrrrrRRR ggggggGG bbbbbBBB aaaaaaaa */
+ /* little endian: aaaaaaaa bbbbbBBB ggggggGG rrrrrRRR */
+#ifdef LITTLE
+ data = *s++;
+ *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
+ | (data & 0x7e0) << 5 | (data & 0x600) >> 1
+ | (data & 0x1f) << 19 | (data & 0x1c) << 14
+ | 0xff000000;
+#else
+ /* swap endianness first */
+ data = s[0] | s[1] << 8;
+ s += 2;
+ *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11
+ | (data & 0x7e0) << 13 | (data & 0x600) << 7
+ | (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | 0xff;
+#endif
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 16 bits/pixel data
+ with alpha
+ data in msb format
+*/
+static void
+rgb565amsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned char *s;
+#else
+ register unsigned short *s; /* read 1 pixels at once */
+#endif
+ register unsigned int *o;
+
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = (unsigned int *) orow;
+ for (xx = 0; xx < width; xx ++) {
+ register unsigned int data;
+ /* rrrrrggg gggbbbbb -> rrrrrRRR gggggg00 bbbbbBBB aaaaaaaa */
+ /* little endian: aaaaaaaa bbbbbBBB gggggg00 rrrrrRRR */
+#ifdef LITTLE
+ /* swap endianness first */
+ data = s[0] | s[1] << 8;
+ s += 2;
+ *o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
+ | (data & 0x7e0) << 5 | (data & 0x600) >> 1
+ | (data & 0x1f) << 19 | (data & 0x1c) << 14
+ | 0xff000000;
+#else
+ data = *s++;
+ *o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11
+ | (data & 0x7e0) << 13 | (data & 0x600) << 7
+ | (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | 0xff;
+#endif
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 15 bits/pixel data
+ no alpha
+ data in lsb format
+*/
+static void
+rgb555lsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned int *s; /* read 2 pixels at once */
+#else
+ register unsigned char *s; /* read 2 pixels at once */
+#endif
+ register unsigned short *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned int *) srow;
+#else
+ s = srow;
+#endif
+ o = (unsigned short *) orow;
+ for (xx = 1; xx < width; xx += 2) {
+ register unsigned int data;
+#ifdef LITTLE
+ data = *s++;
+ *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
+ | (data & 0x3e0) << 6 | (data & 0x380) << 1;
+ *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
+ | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20;
+ *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23
+ | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
+#else
+ /* swap endianness first */
+ data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24;
+ s += 4;
+ *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4
+ | (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
+ *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28;
+ *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15
+ | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
+#endif
+ }
+ /* check for last remaining pixel */
+ if (width & 1) {
+ register unsigned short data;
+#ifdef LITTLE
+ data = *((short *) s);
+#else
+ data = *((short *) s);
+ data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
+#endif
+ ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
+ ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
+ ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 15 bits/pixel data
+ no alpha
+ data in msb format
+*/
+static void
+rgb555msb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned char *s; /* read 2 pixels at once */
+#else
+ register unsigned int *s; /* read 2 pixels at once */
+#endif
+ register unsigned short *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = (unsigned short *) orow;
+ for (xx = 1; xx < width; xx += 2) {
+ register unsigned int data;
+#ifdef LITTLE
+ /* swap endianness first */
+ data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24;
+ s += 4;
+ *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
+ | (data & 0x3e0) << 6 | (data & 0x380) << 1;
+ *o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
+ | (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20;
+ *o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23
+ | (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
+#else
+ data = *s++;
+ *o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4
+ | (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
+ *o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28;
+ *o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15
+ | (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
+#endif
+ }
+ /* check for last remaining pixel */
+ if (width & 1) {
+ register unsigned short data;
+#ifdef LITTLE
+ data = *((short *) s);
+ data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
+#else
+ data = *((short *) s);
+#endif
+ ((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
+ ((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
+ ((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 15 bits/pixel data
+ with alpha
+ data in lsb format
+*/
+static void
+rgb555alsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned short *s; /* read 1 pixels at once */
+#else
+ register unsigned char *s;
+#endif
+ register unsigned int *o;
+
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned short *) srow;
+#else
+ s = srow;
+#endif
+ o = (unsigned int *) orow;
+ for (xx = 0; xx < width; xx++) {
+ register unsigned int data;
+ /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */
+ /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */
+#ifdef LITTLE
+ data = *s++;
+ *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
+ | (data & 0x3e0) << 6 | (data & 0x380) << 1
+ | (data & 0x1f) << 19 | (data & 0x1c) << 14
+ | 0xff000000;
+#else
+ /* swap endianness first */
+ data = s[0] | s[1] << 8;
+ s += 2;
+ *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12
+ | (data & 0x3e0) << 14 | (data & 0x380) << 9
+ | (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | 0xff;
+#endif
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ convert 15 bits/pixel data
+ with alpha
+ data in msb format
+*/
+static void
+rgb555amsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+#ifdef LITTLE
+ register unsigned short *s; /* read 1 pixels at once */
+#else
+ register unsigned char *s;
+#endif
+ register unsigned int *o;
+
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned short *) srow;
+#else
+ s = srow;
+#endif
+ o = (unsigned int *) orow;
+ for (xx = 0; xx < width; xx++) {
+ register unsigned int data;
+ /* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */
+ /* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */
+#ifdef LITTLE
+ /* swap endianness first */
+ data = s[0] | s[1] << 8;
+ s += 2;
+ *o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
+ | (data & 0x3e0) << 6 | (data & 0x380) << 1
+ | (data & 0x1f) << 19 | (data & 0x1c) << 14
+ | 0xff000000;
+#else
+ data = *s++;
+ *o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12
+ | (data & 0x3e0) << 14 | (data & 0x380) << 9
+ | (data & 0x1f) << 11 | (data & 0x1c) << 6
+ | 0xff;
+#endif
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+
+static void
+rgb888alsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+ unsigned char *s; /* for byte order swapping */
+ unsigned char *o;
+ unsigned char *srow = image->data, *orow = pixels;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ d (printf ("32 bits/pixel with alpha\n"));
+
+ /* lsb data */
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+ for (xx = 0; xx < width; xx++) {
+ *o++ = s[2];
+ *o++ = s[1];
+ *o++ = s[0];
+ *o++ = 0xff;
+ s += 4;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+static void
+rgb888lsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+ unsigned char *srow = image->data, *orow = pixels;
+ unsigned char *o, *s;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ d (printf ("32 bit, lsb, no alpha\n"));
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+ for (xx = 0; xx < width; xx++) {
+ *o++ = s[2];
+ *o++ = s[1];
+ *o++ = s[0];
+ s += 4;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+static void
+rgb888amsb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+ unsigned char *srow = image->data, *orow = pixels;
+#ifdef LITTLE
+ unsigned int *o;
+ unsigned int *s;
+#else
+ unsigned char *s; /* for byte order swapping */
+ unsigned char *o;
+#endif
+
+ d (printf ("32 bit, msb, with alpha\n"));
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ /* msb data */
+ for (yy = 0; yy < height; yy++) {
+#ifdef LITTLE
+ s = (unsigned int *) srow;
+ o = (unsigned int *) orow;
+#else
+ s = srow;
+ o = orow;
+#endif
+ for (xx = 0; xx < width; xx++) {
+#ifdef LITTLE
+ *o++ = s[1];
+ *o++ = s[2];
+ *o++ = s[3];
+ *o++ = 0xff;
+ s += 4;
+#else
+ *o++ = (*s << 8) | 0xff; /* untested */
+ s++;
+#endif
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+static void
+rgb888msb (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *colormap)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+
+ unsigned char *srow = image->data, *orow = pixels;
+ unsigned char *s;
+ unsigned char *o;
+
+ d (printf ("32 bit, msb, no alpha\n"));
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+ for (xx = 0; xx < width; xx++) {
+ *o++ = s[1];
+ *o++ = s[2];
+ *o++ = s[3];
+ s += 4;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+/*
+ This should work correctly with any display/any endianness, but will probably
+ run quite slow
+*/
+static void
+convert_real_slow (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *cmap, int alpha)
+{
+ int xx, yy;
+ int width, height;
+ int bpl;
+ unsigned char *srow = image->data, *orow = pixels;
+ unsigned char *s;
+ unsigned char *o;
+ unsigned int pixel;
+ Visual *v;
+ unsigned char component;
+ int i;
+ int red_shift, red_prec, green_shift, green_prec, blue_shift, blue_prec;
+
+ width = image->width;
+ height = image->height;
+ bpl = image->bytes_per_line;
+ v = cmap->visual;
+
+ visual_decompose_mask (v->red_mask, &red_shift, &red_prec);
+ visual_decompose_mask (v->green_mask, &green_shift, &green_prec);
+ visual_decompose_mask (v->blue_mask, &blue_shift, &blue_prec);
+
+ d(printf("rgb mask/shift/prec = %x:%x:%x %d:%d:%d %d:%d:%d\n",
+ v->red_mask, v->green_mask, v->blue_mask,
+ red_shift, green_shift, blue_shift,
+ red_prec, green_prec, blue_prec));
+
+ for (yy = 0; yy < height; yy++) {
+ s = srow;
+ o = orow;
+ for (xx = 0; xx < width; xx++) {
+ pixel = XGetPixel (image, xx, yy);
+ switch (v->class) {
+ /* I assume this is right for static & greyscale's too? */
+ case StaticGray:
+ case GrayScale:
+ case StaticColor:
+ case PseudoColor:
+ *o++ = cmap->colors[pixel].red;
+ *o++ = cmap->colors[pixel].green;
+ *o++ = cmap->colors[pixel].blue;
+ break;
+ case TrueColor:
+ /* This is odd because it must sometimes shift left (otherwise
+ I'd just shift >> (*_shift - 8 + *_prec + <0-7>). This logic
+ should work for all bit sizes/shifts/etc. */
+ component = 0;
+ for (i = 24; i < 32; i += red_prec)
+ component |= ((pixel & v->red_mask) << (32 - red_shift - red_prec)) >> i;
+ *o++ = component;
+ component = 0;
+ for (i = 24; i < 32; i += green_prec)
+ component |= ((pixel & v->green_mask) << (32 - green_shift - green_prec)) >> i;
+ *o++ = component;
+ component = 0;
+ for (i = 24; i < 32; i += blue_prec)
+ component |= ((pixel & v->blue_mask) << (32 - blue_shift - blue_prec)) >> i;
+ *o++ = component;
+ break;
+ case DirectColor:
+ *o++ = cmap->colors[((pixel & v->red_mask) << (32 - red_shift - red_prec)) >> 24].red;
+ *o++ = cmap->colors[((pixel & v->green_mask) << (32 - green_shift - green_prec)) >> 24].green;
+ *o++ = cmap->colors[((pixel & v->blue_mask) << (32 - blue_shift - blue_prec)) >> 24].blue;
+ break;
+ }
+ if (alpha)
+ *o++ = 0xff;
+ }
+ srow += bpl;
+ orow += rowstride;
+ }
+}
+
+typedef void (* cfunc) (XImage *image, unsigned char *pixels, int rowstride, xlib_colormap *cmap);
+
+static cfunc convert_map[] = {
+ rgb1,rgb1,rgb1a,rgb1a,
+ rgb8,rgb8,rgb8a,rgb8a,
+ rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,
+ rgb565lsb,rgb565msb,rgb565alsb,rgb565amsb,
+ rgb888lsb,rgb888msb,rgb888alsb,rgb888amsb
+};
+
+/*
+ perform actual conversion
+
+ If we can, try and use the optimised code versions, but as a default
+ fallback, and always for direct colour, use the generic/slow but complete
+ conversion function.
+*/
+static void
+rgbconvert (XImage *image, unsigned char *pixels, int rowstride, int alpha, xlib_colormap *cmap)
+{
+ int index = (image->byte_order == MSBFirst) | (alpha != 0) << 1;
+ int bank=5; /* default fallback converter */
+ Visual *v = cmap->visual;
+
+ d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask));
+ d(printf("image depth = %d, bpp = %d\n", image->depth, image->bits_per_pixel));
+
+ switch (v->class) {
+ /* I assume this is right for static & greyscale's too? */
+ case StaticGray:
+ case GrayScale:
+ case StaticColor:
+ case PseudoColor:
+ switch (image->bits_per_pixel) {
+ case 1:
+ bank = 0;
+ break;
+ case 8:
+ bank = 1;
+ break;
+ }
+ break;
+ case TrueColor:
+ switch (image->depth) {
+ case 15:
+ if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f
+ && image->bits_per_pixel == 16)
+ bank = 2;
+ break;
+ case 16:
+ if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f
+ && image->bits_per_pixel == 16)
+ bank = 3;
+ break;
+ case 24:
+ case 32:
+ if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff
+ && image->bits_per_pixel == 32)
+ bank = 4;
+ break;
+ }
+ break;
+ case DirectColor:
+ /* always use the slow version */
+ break;
+ }
+
+ d(printf("converting using conversion function in bank %d\n", bank));
+
+ if (bank==5) {
+ convert_real_slow(image, pixels, rowstride, cmap, alpha);
+ } else {
+ index |= bank << 2;
+ (* convert_map[index]) (image, pixels, rowstride, cmap);
+ }
+}
+
+static int
+xlib_window_is_viewable (Window w)
+{
+ XWindowAttributes wa;
+
+ while (w != 0) {
+ Window parent, root, *children;
+ int nchildren;
+
+ XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
+ if (wa.map_state != IsViewable)
+ return 0;
+
+ if (!XQueryTree (gdk_pixbuf_dpy, w, &root,
+ &parent, &children, &nchildren))
+ return 0;
+
+ if (nchildren > 0)
+ XFree (children);
+
+ if (parent == root)
+ return 1;
+
+ w = parent;
+ }
+
+ return 0;
+}
+
+static int
+xlib_window_get_origin (Window w, int *x, int *y)
+{
+ Window child;
+ return XTranslateCoordinates (gdk_pixbuf_dpy, w,
+ RootWindow (gdk_pixbuf_dpy,
+ gdk_pixbuf_screen),
+ 0, 0, x, y, &child);
+}
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-private.h b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-private.h
new file mode 100644
index 00000000..f1113339
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-private.h
@@ -0,0 +1,30 @@
+/* GdkPixbuf library - Xlib header file
+ *
+ * Authors: John Harper <john@dcs.warwick.ac.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GDK_PIXBUF_XLIB_PRIVATE_H
+#define GDK_PIXBUF_XLIB_PRIVATE_H
+
+#include "gdk-pixbuf-xlib.h"
+#include <X11/Xlib.h>
+
+extern Display *gdk_pixbuf_dpy;
+extern int gdk_pixbuf_screen;
+
+#endif
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.c b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.c
new file mode 100644
index 00000000..8383246b
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.c
@@ -0,0 +1,46 @@
+/* GdkPixbuf library - Initialization functions
+ *
+ * Author: John Harper <john@dcs.warwick.ac.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <X11/Xlib.h>
+/*#include <gdk-pixbuf/gdk-pixbuf-private.h>*/
+#include "gdk-pixbuf-xlib-private.h"
+
+Display *gdk_pixbuf_dpy = NULL;
+int gdk_pixbuf_screen = -1;
+
+/**
+ * gdk_pixbuf_xlib_init_with_depth:
+ * @display: X display to use.
+ * @screen_num: Screen number.
+ * @prefDepth: Preferred depth for XlibRGB.
+ *
+ * Similar to gdk_pixbuf_xlib_init(), but also lets you specify the preferred
+ * depth for XlibRGB if you do not want it to use the default depth it picks.
+ **/
+void
+gdk_pixbuf_xlib_init_with_depth (Display *display,
+ int screen_num, int prefDepth)
+{
+ xlib_rgb_init_with_depth (display, ScreenOfDisplay (display, screen_num),
+ prefDepth);
+ gdk_pixbuf_dpy = display;
+ gdk_pixbuf_screen = screen_num;
+}
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h
new file mode 100644
index 00000000..aa94c7c6
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h
@@ -0,0 +1,78 @@
+/* GdkPixbuf library - Xlib header file
+ *
+ * Authors: John Harper <john@dcs.warwick.ac.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GDK_PIXBUF_XLIB_H
+#define GDK_PIXBUF_XLIB_H
+
+/* #include <gdk-pixbuf/gdk-pixbuf.h> */
+/* #include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h> */
+#include <X11/Xlib.h>
+
+
+
+/* init */
+
+void gdk_pixbuf_xlib_init_with_depth (Display *display, int screen_num,
+ int prefDepth);
+
+
+
+/* render */
+/*
+void gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ int alpha_threshold);
+
+void gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
+ Drawable drawable, GC gc,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ XlibRgbDither dither,
+ int x_dither, int y_dither);
+
+
+void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
+ Drawable drawable,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ GdkPixbufAlphaMode alpha_mode,
+ int alpha_threshold,
+ XlibRgbDither dither,
+ int x_dither, int y_dither);
+
+void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
+ Pixmap *pixmap_return,
+ Pixmap *mask_return,
+ int alpha_threshold);
+
+
+
+GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
+ Drawable src,
+ Colormap cmap, Visual *visual,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height);
+*/
+#endif /* GDK_PIXBUF_XLIB_H */
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c
new file mode 100644
index 00000000..eb7e4cdf
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c
@@ -0,0 +1,3425 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "MPL"); you may not use this file except in
+ * compliance with the MPL. You may obtain a copy of the MPL at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the MPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
+ * for the specific language governing rights and limitations under the
+ * MPL.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * terms of the GNU Library General Public License (the "LGPL"), in
+ * which case the provisions of the LGPL are applicable instead of
+ * those above. If you wish to allow use of your version of this file
+ * only under the terms of the LGPL and not to allow others to use
+ * your version of this file under the MPL, indicate your decision by
+ * deleting the provisions above and replace them with the notice and
+ * other provisions required by the LGPL. If you do not delete the
+ * provisions above, a recipient may use your version of this file
+ * under either the MPL or the LGPL.
+ */
+
+/*
+ * This code is derived from GdkRgb.
+ * For more information on GdkRgb, see http://www.levien.com/gdkrgb/
+ * Raph Levien <raph@acm.org>
+ */
+
+/* Ported by Christopher Blizzard to Xlib. With permission from the
+ * original authors and the copyright holders of this file, the
+ * contents of this file are also redistributable under the terms of
+ * the Mozilla Public license. For information about the Mozilla
+ * Public License, please see the license information at
+ * http://www.mozilla.org/MPL/ */
+
+/* This code is copyright the following authors:
+ * Raph Levien <raph@acm.org>
+ * Manish Singh <manish@gtk.org>
+ * Tim Janik <timj@gtk.org>
+ * Peter Mattis <petm@xcf.berkeley.edu>
+ * Spencer Kimball <spencer@xcf.berkeley.edu>
+ * Josh MacDonald <jmacd@xcf.berkeley.edu>
+ * Christopher Blizzard <blizzard@redhat.com>
+ * Owen Taylor <otaylor@redhat.com>
+ * Shawn T. Amundson <amundson@gtk.org>
+*/
+
+#include <math.h>
+
+#if HAVE_CONFIG_H
+# include <config.h>
+# if STDC_HEADERS
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+# endif
+#else
+# include <stdio.h>
+# include <stdlib.h>
+#endif
+
+#define ENABLE_GRAYSCALE
+
+/* include this before so that we can get endian definitions if
+ they are there... */
+
+#include "gdk-pixbuf-xlibrgb.h"
+#include "gdk-pixbuf-xlib-private.h"
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+
+typedef enum {
+ LSB_FIRST,
+ MSB_FIRST
+} ByteOrder;
+
+
+typedef struct _XlibRgbInfo XlibRgbInfo;
+
+typedef void (*XlibRgbConvFunc) (XImage *image,
+ int ax, int ay,
+ int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap);
+
+/* Some of these fields should go, as they're not being used at all.
+ Globals should generally migrate into here - it's very likely that
+ we'll want to run more than one GdkRgbInfo context at the same time
+ (i.e. some but not all windows have privately installed
+ colormaps). */
+
+struct _XlibRgbInfo
+{
+ Display *display;
+ Screen *screen;
+ int screen_num;
+ XVisualInfo *x_visual_info;
+ Colormap cmap;
+ XColor *cmap_colors;
+ Visual *default_visualid;
+ Colormap default_colormap;
+
+ unsigned long *color_pixels;
+ unsigned long *gray_pixels;
+ unsigned long *reserved_pixels;
+
+ unsigned long red_shift;
+ unsigned long red_prec;
+ unsigned long blue_shift;
+ unsigned long blue_prec;
+ unsigned long green_shift;
+ unsigned long green_prec;
+
+ unsigned int nred_shades;
+ unsigned int ngreen_shades;
+ unsigned int nblue_shades;
+ unsigned int ngray_shades;
+ unsigned int nreserved;
+
+ unsigned int bpp;
+ unsigned int cmap_alloced;
+ double gamma_val;
+
+ /* Generally, the stage buffer is used to convert 32bit RGB, gray,
+ and indexed images into 24 bit packed RGB. */
+ unsigned char *stage_buf;
+
+ XlibRgbCmap *gray_cmap;
+
+ Bool dith_default;
+
+ Bool bitmap; /* set true if in 1 bit per pixel mode */
+ GC own_gc;
+
+ /* Convert functions */
+ XlibRgbConvFunc conv;
+ XlibRgbConvFunc conv_d;
+
+ XlibRgbConvFunc conv_32;
+ XlibRgbConvFunc conv_32_d;
+
+ XlibRgbConvFunc conv_gray;
+ XlibRgbConvFunc conv_gray_d;
+
+ XlibRgbConvFunc conv_indexed;
+ XlibRgbConvFunc conv_indexed_d;
+};
+
+static Bool xlib_rgb_install_cmap = FALSE;
+static int xlib_rgb_min_colors = 5 * 5 * 5;
+static Bool xlib_rgb_verbose = FALSE;
+
+#define IMAGE_WIDTH 256
+#define STAGE_ROWSTRIDE (IMAGE_WIDTH * 3)
+#define IMAGE_HEIGHT 64
+#define N_IMAGES 6
+
+static XlibRgbInfo *image_info = NULL;
+static XImage *static_image[N_IMAGES];
+static int static_image_idx;
+
+static unsigned char *colorcube;
+static unsigned char *colorcube_d;
+
+static unsigned long
+xlib_get_prec_from_mask(unsigned long val)
+{
+ unsigned long retval = 0;
+ unsigned int cur_bit = 0;
+ /* walk through the number, incrementing the value if
+ the bit in question is set. */
+ while (cur_bit < (sizeof(unsigned long) * 8)) {
+ if ((val >> cur_bit) & 0x1) {
+ retval++;
+ }
+ cur_bit++;
+ }
+ return retval;
+}
+
+static unsigned long
+xlib_get_shift_from_mask(unsigned long val)
+{
+ unsigned long cur_bit = 0;
+ /* walk through the number, looking for the first 1 */
+ while (cur_bit < (sizeof(unsigned long) * 8)) {
+ if ((val >> cur_bit) & 0x1) {
+ return cur_bit;
+ }
+ cur_bit++;
+ }
+ return cur_bit;
+}
+
+
+static int
+xlib_rgb_cmap_fail (const char *msg, Colormap cmap, unsigned long *pixels)
+{
+ unsigned long free_pixels[256];
+ int n_free;
+ int i;
+
+#ifdef VERBOSE
+ printf ("%s", msg);
+#endif
+ n_free = 0;
+ for (i = 0; i < 256; i++)
+ if (pixels[i] < 256)
+ free_pixels[n_free++] = pixels[i];
+
+ if (n_free)
+ XFreeColors(image_info->display,
+ cmap,
+ free_pixels,
+ n_free,
+ 0);
+ return 0;
+}
+
+static void
+xlib_rgb_make_colorcube (unsigned long *pixels, int nr, int ng, int nb)
+{
+ unsigned char rt[16], gt[16], bt[16];
+ int i;
+
+ colorcube = malloc(sizeof(unsigned char) * 4096);
+ memset(colorcube, 0, (sizeof(unsigned char) * 4096));
+ for (i = 0; i < 16; i++)
+ {
+ rt[i] = ng * nb * ((i * 17 * (nr - 1) + 128) >> 8);
+ gt[i] = nb * ((i * 17 * (ng - 1) + 128) >> 8);
+ bt[i] = ((i * 17 * (nb - 1) + 128) >> 8);
+ }
+
+ for (i = 0; i < 4096; i++)
+ {
+ colorcube[i] = pixels[rt[i >> 8] + gt[(i >> 4) & 0x0f] + bt[i & 0x0f]];
+#ifdef VERBOSE
+ printf ("%03x %02x %x %x %x\n", i, colorcube[i], rt[i >> 8], gt[(i >> 4) & 0x0f], bt[i & 0x0f]);
+#endif
+ }
+}
+
+/* this is the colorcube suitable for dithering */
+static void
+xlib_rgb_make_colorcube_d (unsigned long *pixels, int nr, int ng, int nb)
+{
+ int r, g, b;
+ int i;
+
+ colorcube_d = malloc(sizeof(unsigned char) * 512);
+ memset(colorcube_d, 0, (sizeof(unsigned char) * 512));
+ for (i = 0; i < 512; i++)
+ {
+ r = MIN (nr - 1, i >> 6);
+ g = MIN (ng - 1, (i >> 3) & 7);
+ b = MIN (nb - 1, i & 7);
+ colorcube_d[i] = pixels[(r * ng + g) * nb + b];
+ }
+}
+
+/* Try installing a color cube of the specified size.
+ Make the colorcube and return TRUE on success */
+static int
+xlib_rgb_try_colormap (int nr, int ng, int nb)
+{
+ int r, g, b;
+ int ri, gi, bi;
+ int r0, g0, b0;
+ Colormap cmap;
+ XVisualInfo *visual;
+ XColor *colors = NULL;
+ XColor color;
+ unsigned long pixels[256];
+ unsigned long junk[256];
+ int i;
+ int d2;
+ unsigned int colors_needed;
+ int idx;
+ int best[256];
+
+ if (nr * ng * nb < xlib_rgb_min_colors)
+ return FALSE;
+
+ if (image_info->cmap_alloced) {
+ cmap = image_info->cmap;
+ visual = image_info->x_visual_info;
+ }
+ else {
+ cmap = image_info->default_colormap;
+ visual = image_info->x_visual_info;
+ }
+ colors_needed = nr * ng * nb;
+ for (i = 0; i < 256; i++)
+ {
+ best[i] = 192;
+ pixels[i] = 256;
+ }
+
+#ifndef GAMMA
+ if (!xlib_rgb_install_cmap) {
+ /* go out and get the colors for this colormap. */
+ colors = malloc(sizeof(XColor) * visual->colormap_size);
+ for (i=0; i < visual->colormap_size; i++){
+ colors[i].pixel = i;
+ }
+ XQueryColors (image_info->display,
+ cmap,
+ colors, visual->colormap_size);
+ /* find color cube colors that are already present */
+ for (i = 0; i < MIN (256, visual->colormap_size); i++)
+ {
+ r = colors[i].red >> 8;
+ g = colors[i].green >> 8;
+ b = colors[i].blue >> 8;
+ ri = (r * (nr - 1) + 128) >> 8;
+ gi = (g * (ng - 1) + 128) >> 8;
+ bi = (b * (nb - 1) + 128) >> 8;
+ r0 = ri * 255 / (nr - 1);
+ g0 = gi * 255 / (ng - 1);
+ b0 = bi * 255 / (nb - 1);
+ idx = ((ri * nr) + gi) * nb + bi;
+ d2 = (r - r0) * (r - r0) + (g - g0) * (g - g0) + (b - b0) * (b - b0);
+ if (d2 < best[idx]) {
+ if (pixels[idx] < 256)
+ XFreeColors(image_info->display,
+ cmap,
+ pixels + idx,
+ 1, 0);
+ else
+ colors_needed--;
+ color.pixel = colors[i].pixel;
+ color.red = colors[i].red;
+ color.green = colors[i].green;
+ color.blue = colors[i].blue;
+ color.flags = 0;
+ if (!XAllocColor(image_info->display, cmap, &color))
+ return xlib_rgb_cmap_fail ("error allocating system color\n",
+ cmap, pixels);
+ pixels[idx] = color.pixel; /* which is almost certainly i */
+ best[idx] = d2;
+ }
+ }
+ }
+
+#endif
+
+ if (colors_needed)
+ {
+ if (!XAllocColorCells(image_info->display, cmap, 0, NULL, 0, junk, colors_needed))
+ {
+ char tmp_str[80];
+
+ sprintf (tmp_str,
+ "%d %d %d colormap failed (in XAllocColorCells)\n",
+ nr, ng, nb);
+ return xlib_rgb_cmap_fail (tmp_str, cmap, pixels);
+ }
+ XFreeColors(image_info->display, cmap, junk, (int)colors_needed, 0);
+ }
+
+ for (r = 0, i = 0; r < nr; r++)
+ for (g = 0; g < ng; g++)
+ for (b = 0; b < nb; b++, i++)
+ {
+ if (pixels[i] == 256)
+ {
+ color.red = r * 65535 / (nr - 1);
+ color.green = g * 65535 / (ng - 1);
+ color.blue = b * 65535 / (nb - 1);
+
+#ifdef GAMMA
+ color.red = 65535 * pow (color.red / 65535.0, 0.5);
+ color.green = 65535 * pow (color.green / 65535.0, 0.5);
+ color.blue = 65535 * pow (color.blue / 65535.0, 0.5);
+#endif
+
+ /* This should be a raw XAllocColor call */
+ if (!XAllocColor(image_info->display, cmap, &color))
+ {
+ char tmp_str[80];
+
+ sprintf (tmp_str, "%d %d %d colormap failed\n",
+ nr, ng, nb);
+ return xlib_rgb_cmap_fail (tmp_str,
+ cmap, pixels);
+ }
+ pixels[i] = color.pixel;
+ }
+#ifdef VERBOSE
+ printf ("%d: %lx\n", i, pixels[i]);
+#endif
+ }
+
+ image_info->nred_shades = nr;
+ image_info->ngreen_shades = ng;
+ image_info->nblue_shades = nb;
+ xlib_rgb_make_colorcube (pixels, nr, ng, nb);
+ xlib_rgb_make_colorcube_d (pixels, nr, ng, nb);
+ if (colors)
+ free(colors);
+ return TRUE;
+}
+
+/* Return TRUE on success. */
+static Bool
+xlib_rgb_do_colormaps (void)
+{
+ static const int sizes[][3] = {
+ /* { 6, 7, 6 }, */
+ { 6, 6, 6 },
+ { 6, 6, 5 },
+ { 6, 6, 4 },
+ { 5, 5, 5 },
+ { 5, 5, 4 },
+ { 4, 4, 4 },
+ { 4, 4, 3 },
+ { 3, 3, 3 },
+ { 2, 2, 2 }
+ };
+ static const int n_sizes = sizeof(sizes) / (3 * sizeof(int));
+ int i;
+
+ for (i = 0; i < n_sizes; i++)
+ if (xlib_rgb_try_colormap (sizes[i][0], sizes[i][1], sizes[i][2]))
+ return TRUE;
+ return FALSE;
+}
+
+/* Make a 2 x 2 x 2 colorcube */
+static void
+xlib_rgb_colorcube_222 (void)
+{
+ int i;
+ XColor color;
+ Colormap cmap;
+
+ if (image_info->cmap_alloced)
+ cmap = image_info->cmap;
+ else
+ cmap = image_info->default_colormap;
+
+ colorcube_d = malloc(sizeof(unsigned char) * 512);
+
+ for (i = 0; i < 8; i++)
+ {
+ color.red = ((i & 4) >> 2) * 65535;
+ color.green = ((i & 2) >> 1) * 65535;
+ color.blue = (i & 1) * 65535;
+ XAllocColor (image_info->display, cmap, &color);
+ colorcube_d[((i & 4) << 4) | ((i & 2) << 2) | (i & 1)] = color.pixel;
+ }
+}
+
+/**
+ * xlib_rgb_set_verbose:
+ * @verbose: %True to be verbose
+ *
+ * Enables/disables debug spew.
+ **/
+void
+xlib_rgb_set_verbose (Bool verbose)
+{
+ xlib_rgb_verbose = verbose;
+}
+
+/**
+ * xlib_rgb_set_install:
+ * @install: %True to install a colormap
+ *
+ * Sets whether we install an RGB colormap.
+ **/
+void
+xlib_rgb_set_install (Bool install)
+{
+ xlib_rgb_install_cmap = install;
+}
+
+/**
+ * xlib_rgb_set_min_colors:
+ * @min_colors: minimum colors to use
+ *
+ * Sets the minimum number of colors in the color cube.
+ **/
+void
+xlib_rgb_set_min_colors (int min_colors)
+{
+ xlib_rgb_min_colors = min_colors;
+}
+
+/* Return a "score" based on the following criteria (in hex):
+
+ x000 is the quality - 1 is 1bpp, 2 is 4bpp,
+ 4 is 8bpp,
+ 7 is 15bpp truecolor, 8 is 16bpp truecolor,
+ 9 is 24bpp truecolor.
+ 0x00 is the speed - 1 is the normal case,
+ 2 means faster than normal
+ 00x0 gets a point for being the system visual
+ 000x gets a point for being pseudocolor
+
+ A caveat: in the 8bpp modes, being the system visual seems to be
+ quite important. Thus, all of the 8bpp modes should be ranked at
+ the same speed.
+*/
+
+static unsigned int
+xlib_rgb_score_visual (XVisualInfo *visual)
+{
+ unsigned int quality, speed, pseudo, sys;
+ static const char* visual_names[] =
+ {
+ "static gray",
+ "grayscale",
+ "static color",
+ "pseudo color",
+ "true color",
+ "direct color",
+ };
+
+
+ quality = 0;
+ speed = 1;
+ sys = 0;
+ if (visual->class == TrueColor ||
+ visual->class == DirectColor)
+ {
+ if (visual->depth == 24)
+ {
+ quality = 9;
+ /* Should test for MSB visual here, and set speed if so. */
+ }
+ else if (visual->depth == 16)
+ quality = 8;
+ else if (visual->depth == 15)
+ quality = 7;
+ else if (visual->depth == 8)
+ quality = 4;
+ }
+ else if (visual->class == PseudoColor ||
+ visual->class == StaticColor)
+ {
+ if (visual->depth == 8)
+ quality = 4;
+ else if (visual->depth == 4)
+ quality = 2;
+ else if (visual->depth == 1)
+ quality = 1;
+ }
+ else if (visual->class == StaticGray
+#ifdef ENABLE_GRAYSCALE
+ || visual->class == GrayScale
+#endif
+ )
+ {
+ if (visual->depth == 8)
+ quality = 4;
+ else if (visual->depth == 4)
+ quality = 2;
+ else if (visual->depth == 1)
+ quality = 1;
+ }
+
+ if (quality == 0)
+ return 0;
+
+ sys = (visual->visualid == image_info->default_visualid->visualid);
+
+ pseudo = (visual->class == PseudoColor || visual->class == TrueColor);
+
+ if (xlib_rgb_verbose)
+ printf ("Visual 0x%x, type = %s, depth = %d, %ld:%ld:%ld%s; score=%x\n",
+ (int)visual->visualid,
+ visual_names[visual->class],
+ visual->depth,
+ visual->red_mask,
+ visual->green_mask,
+ visual->blue_mask,
+ sys ? " (system)" : "",
+ (quality << 12) | (speed << 8) | (sys << 4) | pseudo);
+
+ return (quality << 12) | (speed << 8) | (sys << 4) | pseudo;
+}
+
+static void
+xlib_rgb_choose_visual (void)
+{
+ XVisualInfo *visuals;
+ XVisualInfo *visual;
+ XVisualInfo *best_visual;
+ XVisualInfo *final_visual;
+ XVisualInfo template;
+ int num_visuals;
+ unsigned int score, best_score;
+ int cur_visual = 1;
+ int i;
+
+ template.screen = image_info->screen_num;
+ visuals = XGetVisualInfo(image_info->display, VisualScreenMask,
+ &template, &num_visuals);
+
+ best_visual = visuals;
+ best_score = xlib_rgb_score_visual (best_visual);
+
+ for (i = cur_visual; i < num_visuals; i++)
+ {
+ visual = &visuals[i];
+ score = xlib_rgb_score_visual (visual);
+ if (score > best_score)
+ {
+ best_score = score;
+ best_visual = visual;
+ }
+ }
+ /* make a copy of the visual so that we can free
+ the allocated visual list above. */
+ final_visual = malloc(sizeof(XVisualInfo));
+ memcpy(final_visual, best_visual, sizeof(XVisualInfo));
+ image_info->x_visual_info = final_visual;
+ XFree(visuals);
+ /* set up the shift and the precision for the red, green and blue.
+ this only applies to cool visuals like true color and direct color. */
+ if (image_info->x_visual_info->class == TrueColor ||
+ image_info->x_visual_info->class == DirectColor) {
+ image_info->red_shift = xlib_get_shift_from_mask(image_info->x_visual_info->red_mask);
+ image_info->red_prec = xlib_get_prec_from_mask(image_info->x_visual_info->red_mask);
+ image_info->green_shift = xlib_get_shift_from_mask(image_info->x_visual_info->green_mask);
+ image_info->green_prec = xlib_get_prec_from_mask(image_info->x_visual_info->green_mask);
+ image_info->blue_shift = xlib_get_shift_from_mask(image_info->x_visual_info->blue_mask);
+ image_info->blue_prec = xlib_get_prec_from_mask(image_info->x_visual_info->blue_mask);
+ }
+}
+
+static void
+xlib_rgb_choose_visual_for_xprint (int aDepth)
+{
+ XVisualInfo *visuals;
+ XVisualInfo *visual;
+ XVisualInfo *best_visual;
+ XVisualInfo *final_visual;
+ XVisualInfo template;
+ int num_visuals;
+ int cur_visual = 1;
+ int i;
+
+ XWindowAttributes win_att;
+ Status ret_stat;
+ Visual *root_visual;
+
+ ret_stat = XGetWindowAttributes(image_info->display,
+ RootWindow(image_info->display, image_info->screen_num),
+ &win_att);
+ root_visual = win_att.visual;
+ template.screen = image_info->screen_num;
+ visuals = XGetVisualInfo(image_info->display, VisualScreenMask,
+ &template, &num_visuals);
+
+ best_visual = visuals;
+ if (best_visual->visual != root_visual) {
+ for (i = cur_visual; i < num_visuals; i++) {
+ visual = &visuals[i];
+ if (visual->visual == root_visual) {
+ best_visual = visual;
+ break;
+ }
+ }
+ }
+ /* make a copy of the visual so that we can free
+ the allocated visual list above. */
+ final_visual = malloc(sizeof(XVisualInfo));
+ memcpy(final_visual, best_visual, sizeof(XVisualInfo));
+ image_info->x_visual_info = final_visual;
+ XFree(visuals);
+ /* set up the shift and the precision for the red, green and blue.
+ this only applies to cool visuals like true color and direct color. */
+ if (image_info->x_visual_info->class == TrueColor ||
+ image_info->x_visual_info->class == DirectColor) {
+ image_info->red_shift = xlib_get_shift_from_mask(image_info->x_visual_info->red_mask);
+ image_info->red_prec = xlib_get_prec_from_mask(image_info->x_visual_info->red_mask);
+ image_info->green_shift = xlib_get_shift_from_mask(image_info->x_visual_info->green_mask);
+ image_info->green_prec = xlib_get_prec_from_mask(image_info->x_visual_info->green_mask);
+ image_info->blue_shift = xlib_get_shift_from_mask(image_info->x_visual_info->blue_mask);
+ image_info->blue_prec = xlib_get_prec_from_mask(image_info->x_visual_info->blue_mask);
+ }
+}
+
+static void xlib_rgb_select_conv (XImage *image, ByteOrder byte_order);
+
+static void
+xlib_rgb_set_gray_cmap (Colormap cmap)
+{
+ int i;
+ XColor color;
+ int status;
+ unsigned long pixels[256];
+ int r, g, b, gray;
+
+ for (i = 0; i < 256; i++)
+ {
+ color.pixel = i;
+ color.red = i * 257;
+ color.green = i * 257;
+ color.blue = i * 257;
+ status = XAllocColor(image_info->display, cmap, &color);
+ pixels[i] = color.pixel;
+#ifdef VERBOSE
+ printf ("allocating pixel %d, %x %x %x, result %d\n",
+ color.pixel, color.red, color.green, color.blue, status);
+#endif
+ }
+
+ /* Now, we make fake colorcubes - we ultimately just use the pseudocolor
+ methods. */
+
+ colorcube = malloc(sizeof(unsigned char) * 4096);
+
+ for (i = 0; i < 4096; i++)
+ {
+ r = (i >> 4) & 0xf0;
+ r = r | r >> 4;
+ g = i & 0xf0;
+ g = g | g >> 4;
+ b = (i << 4 & 0xf0);
+ b = b | b >> 4;
+ gray = (g + ((r + b) >> 1)) >> 1;
+ colorcube[i] = pixels[gray];
+ }
+}
+
+/**
+ * xlib_rgb_init_with_depth:
+ * @display: X display to use.
+ * @screen: Screen to use.
+ * @prefDepth: Visual depth to use for color substitution tables. This must
+ * be one of the supported visual depths in the specified @display.
+ *
+ * Initializes the XlibRGB machinery with a particular depth you specify,
+ * instead of automatically picking the best depth in the display. This
+ * function or xlib_rgb_init() must be called before using any of the other
+ * functions in XlibRGB.
+ **/
+void
+xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
+{
+ int i;
+ static const int byte_order[1] = { 1 };
+
+ static int initialized = 0;
+
+ if (initialized)
+ {
+ return;
+ }
+
+ initialized = 1;
+
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ if (((char *)byte_order)[0] == 1) {
+ printf ("xlib_rgb_init: compiled for big endian, but this is a little endian machine.\n\n");
+ exit(1);
+ }
+#else
+ if (((char *)byte_order)[0] != 1) {
+ printf ("xlib_rgb_init: compiled for little endian, but this is a big endian machine.\n\n");
+ exit(1);
+ }
+#endif
+
+ if (image_info == NULL)
+ {
+ image_info = malloc(sizeof(XlibRgbInfo));
+ memset(image_info, 0, sizeof(XlibRgbInfo));
+
+ image_info->display = display;
+ image_info->screen = screen;
+ image_info->screen_num = XScreenNumberOfScreen(screen);
+ image_info->x_visual_info = NULL;
+ image_info->cmap = 0;
+ image_info->default_visualid = DefaultVisual(display, image_info->screen_num);
+ image_info->default_colormap = DefaultColormap(display, image_info->screen_num);
+
+ image_info->color_pixels = NULL;
+ image_info->gray_pixels = NULL;
+ image_info->reserved_pixels = NULL;
+
+ image_info->nred_shades = 6;
+ image_info->ngreen_shades = 6;
+ image_info->nblue_shades = 4;
+ image_info->ngray_shades = 24;
+ image_info->nreserved = 0;
+
+ image_info->bpp = 0;
+ image_info->cmap_alloced = FALSE;
+ image_info->gamma_val = 1.0;
+
+ image_info->stage_buf = NULL;
+
+ image_info->own_gc = 0;
+
+ image_info->red_shift = 0;
+ image_info->red_prec = 0;
+ image_info->green_shift = 0;
+ image_info->green_prec = 0;
+ image_info->blue_shift = 0;
+ image_info->blue_prec = 0;
+
+ if (prefDepth != -1)
+ xlib_rgb_choose_visual_for_xprint (prefDepth);
+ else
+ xlib_rgb_choose_visual ();
+
+ if ((image_info->x_visual_info->class == PseudoColor ||
+ image_info->x_visual_info->class == StaticColor) &&
+ image_info->x_visual_info->depth < 8 &&
+ image_info->x_visual_info->depth >= 3)
+ {
+ image_info->cmap = image_info->default_colormap;
+ xlib_rgb_colorcube_222 ();
+ }
+ else if (image_info->x_visual_info->class == PseudoColor)
+ {
+ if (xlib_rgb_install_cmap ||
+ image_info->x_visual_info->visualid != image_info->default_visualid->visualid)
+ {
+ image_info->cmap = XCreateColormap(image_info->display,
+ RootWindow(image_info->display, image_info->screen_num),
+ image_info->x_visual_info->visual,
+ AllocNone);
+ image_info->cmap_alloced = TRUE;
+ }
+ if (!xlib_rgb_do_colormaps ())
+ {
+ image_info->cmap = XCreateColormap(image_info->display,
+ RootWindow(image_info->display, image_info->screen_num),
+ image_info->x_visual_info->visual,
+ AllocNone);
+ image_info->cmap_alloced = TRUE;
+ xlib_rgb_do_colormaps ();
+ }
+ if (xlib_rgb_verbose)
+ printf ("color cube: %d x %d x %d\n",
+ image_info->nred_shades,
+ image_info->ngreen_shades,
+ image_info->nblue_shades);
+
+ if (!image_info->cmap_alloced)
+ image_info->cmap = image_info->default_colormap;
+ }
+#ifdef ENABLE_GRAYSCALE
+ else if (image_info->x_visual_info->class == GrayScale)
+ {
+ image_info->cmap = XCreateColormap(image_info->display,
+ RootWindow(image_info->display, image_info->screen_num),
+ image_info->x_visual_info->visual,
+ AllocNone);
+ xlib_rgb_set_gray_cmap (image_info->cmap);
+ image_info->cmap_alloced = TRUE;
+ }
+#endif
+ else
+ {
+ /* Always install colormap in direct color. */
+ if (image_info->x_visual_info->class != DirectColor &&
+ image_info->x_visual_info->visualid == image_info->default_visualid->visualid)
+ image_info->cmap = image_info->default_colormap;
+ else
+ {
+ image_info->cmap = XCreateColormap(image_info->display,
+ RootWindow(image_info->display, image_info->screen_num),
+ image_info->x_visual_info->visual,
+ AllocNone);
+ image_info->cmap_alloced = TRUE;
+ }
+ }
+
+ image_info->bitmap = (image_info->x_visual_info->depth == 1);
+
+ for (i = 0; i < N_IMAGES; i++) {
+ if (image_info->bitmap) {
+ /* Use malloc() instead of g_malloc since X will free() this mem */
+ static_image[i] = XCreateImage(image_info->display,
+ image_info->x_visual_info->visual,
+ 1,
+ XYBitmap,
+ 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
+ 8,
+ 0);
+ static_image[i]->data = malloc(IMAGE_WIDTH * IMAGE_HEIGHT >> 3);
+ static_image[i]->bitmap_bit_order = MSBFirst;
+ static_image[i]->byte_order = MSBFirst;
+ }
+ else {
+ static_image[i] = XCreateImage(image_info->display,
+ image_info->x_visual_info->visual,
+ (unsigned int)image_info->x_visual_info->depth,
+ ZPixmap,
+ 0, 0,
+ IMAGE_WIDTH,
+ IMAGE_HEIGHT,
+ 32, 0);
+ /* remove this when we are using shared memory.. */
+ static_image[i]->data = malloc((size_t)IMAGE_WIDTH * IMAGE_HEIGHT * image_info->x_visual_info->depth);
+ static_image[i]->bitmap_bit_order = MSBFirst;
+ static_image[i]->byte_order = MSBFirst;
+ }
+ }
+ /* ok, so apparently, image_info->bpp is actually
+ BYTES per pixel. What fun! */
+ switch (static_image[0]->bits_per_pixel) {
+ case 1:
+ case 8:
+ image_info->bpp = 1;
+ break;
+ case 16:
+ image_info->bpp = 2;
+ break;
+ case 24:
+ image_info->bpp = 3;
+ break;
+ case 32:
+ image_info->bpp = 4;
+ break;
+ }
+ xlib_rgb_select_conv (static_image[0], MSB_FIRST);
+ }
+}
+
+
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+#define HAIRY_CONVERT_8
+#endif
+
+#ifdef HAIRY_CONVERT_8
+static void
+xlib_rgb_convert_8 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ if (((unsigned long)obuf | (unsigned long) bp2) & 3)
+ {
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ obptr[0] = colorcube[((r & 0xf0) << 4) |
+ (g & 0xf0) |
+ (b >> 4)];
+ obptr++;
+ }
+ }
+ else
+ {
+ for (x = 0; x < width - 3; x += 4)
+ {
+ unsigned int r1b0g0r0;
+ unsigned int g2r2b1g1;
+ unsigned int b3g3r3b2;
+
+ r1b0g0r0 = ((unsigned int *)bp2)[0];
+ g2r2b1g1 = ((unsigned int *)bp2)[1];
+ b3g3r3b2 = ((unsigned int *)bp2)[2];
+ ((unsigned int *)obptr)[0] =
+ colorcube[((r1b0g0r0 & 0xf0) << 4) |
+ ((r1b0g0r0 & 0xf000) >> 8) |
+ ((r1b0g0r0 & 0xf00000) >> 20)] |
+ (colorcube[((r1b0g0r0 & 0xf0000000) >> 20) |
+ (g2r2b1g1 & 0xf0) |
+ ((g2r2b1g1 & 0xf000) >> 12)] << 8) |
+ (colorcube[((g2r2b1g1 & 0xf00000) >> 12) |
+ ((g2r2b1g1 & 0xf0000000) >> 24) |
+ ((b3g3r3b2 & 0xf0) >> 4)] << 16) |
+ (colorcube[((b3g3r3b2 & 0xf000) >> 4) |
+ ((b3g3r3b2 & 0xf00000) >> 16) |
+ (b3g3r3b2 >> 28)] << 24);
+ bp2 += 12;
+ obptr += 4;
+ }
+ for (; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ obptr[0] = colorcube[((r & 0xf0) << 4) |
+ (g & 0xf0) |
+ (b >> 4)];
+ obptr++;
+ }
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#else
+static void
+xlib_rgb_convert_8 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ obptr[0] = colorcube[((r & 0xf0) << 4) |
+ (g & 0xf0) |
+ (b >> 4)];
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#endif
+
+#if 1
+
+/* This dither table was generated by Raph Levien using patented
+ technology (US Patent 5,276,535). The dither table itself is in the
+ public domain. */
+
+#define DM_WIDTH 128
+#define DM_WIDTH_SHIFT 7
+#define DM_HEIGHT 128
+static const unsigned char DM[128][128] =
+{
+ { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 },
+ { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 },
+ { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 },
+ { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 },
+ { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 },
+ { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 },
+ { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 },
+ { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 },
+ { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 },
+ { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 },
+ { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 },
+ { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 },
+ { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 },
+ { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 },
+ { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 },
+ { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 },
+ { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 },
+ { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 },
+ { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 },
+ { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 },
+ { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 },
+ { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 },
+ { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 },
+ { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 },
+ { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 },
+ { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 },
+ { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 },
+ { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 },
+ { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 },
+ { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 },
+ { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 },
+ { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 },
+ { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 },
+ { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 },
+ { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 },
+ { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 },
+ { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 },
+ { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 },
+ { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 },
+ { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 },
+ { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 },
+ { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 },
+ { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 },
+ { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 },
+ { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 },
+ { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 },
+ { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 },
+ { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 },
+ { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 },
+ { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 },
+ { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 },
+ { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 },
+ { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 },
+ { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 },
+ { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 },
+ { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 },
+ { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 },
+ { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 },
+ { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 },
+ { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 },
+ { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 },
+ { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 },
+ { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 },
+ { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 },
+ { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 },
+ { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 },
+ { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 },
+ { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 },
+ { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 },
+ { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 },
+ { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 },
+ { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 },
+ { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 },
+ { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 },
+ { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 },
+ { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 },
+ { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 },
+ { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 },
+ { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 },
+ { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 },
+ { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 },
+ { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 },
+ { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 },
+ { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 },
+ { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 },
+ { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 },
+ { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 },
+ { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 },
+ { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 },
+ { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 },
+ { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 },
+ { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 },
+ { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 },
+ { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 },
+ { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 },
+ { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 },
+ { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 },
+ { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 },
+ { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 },
+ { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 },
+ { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 },
+ { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 },
+ { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 },
+ { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 },
+ { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 },
+ { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 },
+ { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 },
+ { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 },
+ { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 },
+ { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 },
+ { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 },
+ { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 },
+ { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 },
+ { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 },
+ { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 },
+ { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 },
+ { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 },
+ { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 },
+ { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 },
+ { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 },
+ { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 },
+ { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 },
+ { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 },
+ { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 },
+ { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 },
+ { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 },
+ { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 },
+ { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 },
+};
+
+#else
+#define DM_WIDTH 8
+#define DM_WIDTH_SHIFT 3
+#define DM_HEIGHT 8
+static const unsigned char DM[8][8] =
+{
+ { 0, 32, 8, 40, 2, 34, 10, 42 },
+ { 48, 16, 56, 24, 50, 18, 58, 26 },
+ { 12, 44, 4, 36, 14, 46, 6, 38 },
+ { 60, 28, 52, 20, 62, 30, 54, 22 },
+ { 3, 35, 11, 43, 1, 33, 9, 41 },
+ { 51, 19, 59, 27, 49, 17, 57, 25 },
+ { 15, 47, 7, 39, 13, 45, 5, 37 },
+ { 63, 31, 55, 23, 61, 29, 53, 21 }
+};
+#endif
+
+static unsigned int *DM_565 = NULL;
+
+static void
+xlib_rgb_preprocess_dm_565 (void)
+{
+ int i;
+ unsigned int dith;
+
+ if (DM_565 == NULL)
+ {
+ DM_565 = malloc(sizeof(unsigned int) * DM_WIDTH * DM_HEIGHT);
+ for (i = 0; i < DM_WIDTH * DM_HEIGHT; i++)
+ {
+ dith = DM[0][i] >> 3;
+ DM_565[i] = (dith << 20) | dith | (((7 - dith) >> 1) << 10);
+#ifdef VERBOSE
+ printf ("%i %x %x\n", i, dith, DM_565[i]);
+#endif
+ }
+ }
+}
+
+static void
+xlib_rgb_convert_8_d666 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int dith;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ dith = (dmp[(x_align + x) & (DM_WIDTH - 1)] << 2) | 7;
+ r = ((r * 5) + dith) >> 8;
+ g = ((g * 5) + (262 - dith)) >> 8;
+ b = ((b * 5) + dith) >> 8;
+ obptr[0] = colorcube_d[(r << 6) | (g << 3) | b];
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_8_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int dith;
+ int rs, gs, bs;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ rs = image_info->nred_shades - 1;
+ gs = image_info->ngreen_shades - 1;
+ bs = image_info->nblue_shades - 1;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ dith = (dmp[(x_align + x) & (DM_WIDTH - 1)] << 2) | 7;
+ r = ((r * rs) + dith) >> 8;
+ g = ((g * gs) + (262 - dith)) >> 8;
+ b = ((b * bs) + dith) >> 8;
+ obptr[0] = colorcube_d[(r << 6) | (g << 3) | b];
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_8_indexed (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ unsigned char c;
+ unsigned char *lut;
+
+ lut = cmap->lut;
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ c = *bp2++;
+ obptr[0] = lut[c];
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_gray8 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ obptr[0] = (g + ((b + r) >> 1)) >> 1;
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_gray8_gray (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int y;
+ int bpl;
+ unsigned char *obuf;
+ unsigned char *bptr;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ memcpy (obuf, bptr, (unsigned int)width);
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+#define HAIRY_CONVERT_565
+#endif
+
+#ifdef HAIRY_CONVERT_565
+/* Render a 24-bit RGB image in buf into the GdkImage, without dithering.
+ This assumes native byte ordering - what should really be done is to
+ check whether static_image->byte_order is consistent with the _ENDIAN
+ config flag, and if not, use a different function.
+
+ This one is even faster than the one below - its inner loop loads 3
+ words (i.e. 4 24-bit pixels), does a lot of shifting and masking,
+ then writes 2 words. */
+static void
+xlib_rgb_convert_565 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ if (((unsigned long)obuf | (unsigned long) bp2) & 3)
+ {
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ ((unsigned short *)obptr)[0] = ((r & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (b >> 3);
+ obptr += 2;
+ }
+ }
+ else
+ {
+ for (x = 0; x < width - 3; x += 4)
+ {
+ unsigned int r1b0g0r0;
+ unsigned int g2r2b1g1;
+ unsigned int b3g3r3b2;
+
+ r1b0g0r0 = ((unsigned int *)bp2)[0];
+ g2r2b1g1 = ((unsigned int *)bp2)[1];
+ b3g3r3b2 = ((unsigned int *)bp2)[2];
+ ((unsigned int *)obptr)[0] =
+ ((r1b0g0r0 & 0xf8) << 8) |
+ ((r1b0g0r0 & 0xfc00) >> 5) |
+ ((r1b0g0r0 & 0xf80000) >> 19) |
+ (r1b0g0r0 & 0xf8000000) |
+ ((g2r2b1g1 & 0xfc) << 19) |
+ ((g2r2b1g1 & 0xf800) << 5);
+ ((unsigned int *)obptr)[1] =
+ ((g2r2b1g1 & 0xf80000) >> 8) |
+ ((g2r2b1g1 & 0xfc000000) >> 21) |
+ ((b3g3r3b2 & 0xf8) >> 3) |
+ ((b3g3r3b2 & 0xf800) << 16) |
+ ((b3g3r3b2 & 0xfc0000) << 3) |
+ ((b3g3r3b2 & 0xf8000000) >> 11);
+ bp2 += 12;
+ obptr += 8;
+ }
+ for (; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ ((unsigned short *)obptr)[0] = ((r & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (b >> 3);
+ obptr += 2;
+ }
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#else
+/* Render a 24-bit RGB image in buf into the GdkImage, without dithering.
+ This assumes native byte ordering - what should really be done is to
+ check whether static_image->byte_order is consistent with the _ENDIAN
+ config flag, and if not, use a different function.
+
+ This routine is faster than the one included with Gtk 1.0 for a number
+ of reasons:
+
+ 1. Shifting instead of lookup tables (less memory traffic).
+
+ 2. Much less register pressure, especially because shifts are
+ in the code.
+
+ 3. A memcpy is avoided (i.e. the transfer function).
+
+ 4. On big-endian architectures, byte swapping is avoided.
+
+ That said, it wouldn't be hard to make it even faster - just make an
+ inner loop that reads 3 words (i.e. 4 24-bit pixels), does a lot of
+ shifting and masking, then writes 2 words.
+*/
+static void
+xlib_rgb_convert_565 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ ((unsigned short *)obuf)[x] = ((r & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (b >> 3);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#endif
+
+#ifdef HAIRY_CONVERT_565
+static void
+xlib_rgb_convert_565_gray (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char g;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ if (((unsigned long)obuf | (unsigned long) bp2) & 3)
+ {
+ for (x = 0; x < width; x++)
+ {
+ g = *bp2++;
+ ((unsigned short *)obptr)[0] = ((g & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (g >> 3);
+ obptr += 2;
+ }
+ }
+ else
+ {
+ for (x = 0; x < width - 3; x += 4)
+ {
+ unsigned int g3g2g1g0;
+
+ g3g2g1g0 = ((unsigned int *)bp2)[0];
+ ((unsigned int *)obptr)[0] =
+ ((g3g2g1g0 & 0xf8) << 8) |
+ ((g3g2g1g0 & 0xfc) << 3) |
+ ((g3g2g1g0 & 0xf8) >> 3) |
+ (g3g2g1g0 & 0xf800) << 16 |
+ ((g3g2g1g0 & 0xfc00) << 11) |
+ ((g3g2g1g0 & 0xf800) << 5);
+ ((unsigned int *)obptr)[1] =
+ ((g3g2g1g0 & 0xf80000) >> 8) |
+ ((g3g2g1g0 & 0xfc0000) >> 13) |
+ ((g3g2g1g0 & 0xf80000) >> 19) |
+ (g3g2g1g0 & 0xf8000000) |
+ ((g3g2g1g0 & 0xfc000000) >> 5) |
+ ((g3g2g1g0 & 0xf8000000) >> 11);
+ bp2 += 4;
+ obptr += 8;
+ }
+ for (; x < width; x++)
+ {
+ g = *bp2++;
+ ((unsigned short *)obptr)[0] = ((g & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (g >> 3);
+ obptr += 2;
+ }
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#else
+static void
+xlib_rgb_convert_565_gray (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char g;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ g = *bp2++;
+ ((unsigned short *)obuf)[x] = ((g & 0xf8) << 8) |
+ ((g & 0xfc) << 3) |
+ (g >> 3);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#endif
+
+static void
+xlib_rgb_convert_565_br (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ /* final word is:
+ g4 g3 g2 b7 b6 b5 b4 b3 r7 r6 r5 r4 r3 g7 g6 g5
+ */
+ ((unsigned short *)obuf)[x] = (r & 0xf8) |
+ ((g & 0xe0) >> 5) |
+ ((g & 0x1c) << 11) |
+ ((b & 0xf8) << 5);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* Thanks to Ray Lehtiniemi for a patch that resulted in a ~25% speedup
+ in this mode. */
+#ifdef HAIRY_CONVERT_565
+static void
+xlib_rgb_convert_565_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ /* Now this is what I'd call some highly tuned code! */
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+
+ width += x_align;
+ height += y_align;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = y_align; y < height; y++)
+ {
+ unsigned int *dmp = DM_565 + ((y & (DM_HEIGHT - 1)) << DM_WIDTH_SHIFT);
+ bp2 = bptr;
+ obptr = obuf;
+ if (((unsigned long)obuf | (unsigned long) bp2) & 3)
+ {
+ for (x = x_align; x < width; x++)
+ {
+ int rgb = *bp2++ << 20;
+ rgb += *bp2++ << 10;
+ rgb += *bp2++;
+ rgb += dmp[x & (DM_WIDTH - 1)];
+ rgb += 0x10040100
+ - ((rgb & 0x1e0001e0) >> 5)
+ - ((rgb & 0x00070000) >> 6);
+
+ ((unsigned short *)obptr)[0] =
+ ((rgb & 0x0f800000) >> 12) |
+ ((rgb & 0x0003f000) >> 7) |
+ ((rgb & 0x000000f8) >> 3);
+ obptr += 2;
+ }
+ }
+ else
+ {
+ for (x = x_align; x < width - 3; x += 4)
+ {
+ unsigned int r1b0g0r0;
+ unsigned int g2r2b1g1;
+ unsigned int b3g3r3b2;
+ unsigned int rgb02, rgb13;
+
+ r1b0g0r0 = ((unsigned int *)bp2)[0];
+ g2r2b1g1 = ((unsigned int *)bp2)[1];
+ b3g3r3b2 = ((unsigned int *)bp2)[2];
+ rgb02 =
+ ((r1b0g0r0 & 0xff) << 20) +
+ ((r1b0g0r0 & 0xff00) << 2) +
+ ((r1b0g0r0 & 0xff0000) >> 16) +
+ dmp[x & (DM_WIDTH - 1)];
+ rgb02 += 0x10040100
+ - ((rgb02 & 0x1e0001e0) >> 5)
+ - ((rgb02 & 0x00070000) >> 6);
+ rgb13 =
+ ((r1b0g0r0 & 0xff000000) >> 4) +
+ ((g2r2b1g1 & 0xff) << 10) +
+ ((g2r2b1g1 & 0xff00) >> 8) +
+ dmp[(x + 1) & (DM_WIDTH - 1)];
+ rgb13 += 0x10040100
+ - ((rgb13 & 0x1e0001e0) >> 5)
+ - ((rgb13 & 0x00070000) >> 6);
+ ((unsigned int *)obptr)[0] =
+ ((rgb02 & 0x0f800000) >> 12) |
+ ((rgb02 & 0x0003f000) >> 7) |
+ ((rgb02 & 0x000000f8) >> 3) |
+ ((rgb13 & 0x0f800000) << 4) |
+ ((rgb13 & 0x0003f000) << 9) |
+ ((rgb13 & 0x000000f8) << 13);
+ rgb02 =
+ ((g2r2b1g1 & 0xff0000) << 4) +
+ ((g2r2b1g1 & 0xff000000) >> 14) +
+ (b3g3r3b2 & 0xff) +
+ dmp[(x + 2) & (DM_WIDTH - 1)];
+ rgb02 += 0x10040100
+ - ((rgb02 & 0x1e0001e0) >> 5)
+ - ((rgb02 & 0x00070000) >> 6);
+ rgb13 =
+ ((b3g3r3b2 & 0xff00) << 12) +
+ ((b3g3r3b2 & 0xff0000) >> 6) +
+ ((b3g3r3b2 & 0xff000000) >> 24) +
+ dmp[(x + 3) & (DM_WIDTH - 1)];
+ rgb13 += 0x10040100
+ - ((rgb13 & 0x1e0001e0) >> 5)
+ - ((rgb13 & 0x00070000) >> 6);
+ ((unsigned int *)obptr)[1] =
+ ((rgb02 & 0x0f800000) >> 12) |
+ ((rgb02 & 0x0003f000) >> 7) |
+ ((rgb02 & 0x000000f8) >> 3) |
+ ((rgb13 & 0x0f800000) << 4) |
+ ((rgb13 & 0x0003f000) << 9) |
+ ((rgb13 & 0x000000f8) << 13);
+ bp2 += 12;
+ obptr += 8;
+ }
+ for (; x < width; x++)
+ {
+ int rgb = *bp2++ << 20;
+ rgb += *bp2++ << 10;
+ rgb += *bp2++;
+ rgb += dmp[x & (DM_WIDTH - 1)];
+ rgb += 0x10040100
+ - ((rgb & 0x1e0001e0) >> 5)
+ - ((rgb & 0x00070000) >> 6);
+
+ ((unsigned short *)obptr)[0] =
+ ((rgb & 0x0f800000) >> 12) |
+ ((rgb & 0x0003f000) >> 7) |
+ ((rgb & 0x000000f8) >> 3);
+ obptr += 2;
+ }
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#else
+static void
+xlib_rgb_convert_565_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr;
+
+ width += x_align;
+ height += y_align;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + (ax - x_align) * 2;
+
+ for (y = y_align; y < height; y++)
+ {
+ unsigned int *dmp = DM_565 + ((y & (DM_HEIGHT - 1)) << DM_WIDTH_SHIFT);
+ unsigned char *bp2 = bptr;
+
+ for (x = x_align; x < width; x++)
+ {
+ int rgb = *bp2++ << 20;
+ rgb += *bp2++ << 10;
+ rgb += *bp2++;
+ rgb += dmp[x & (DM_WIDTH - 1)];
+ rgb += 0x10040100
+ - ((rgb & 0x1e0001e0) >> 5)
+ - ((rgb & 0x00070000) >> 6);
+
+ ((unsigned short *)obuf)[x] =
+ ((rgb & 0x0f800000) >> 12) |
+ ((rgb & 0x0003f000) >> 7) |
+ ((rgb & 0x000000f8) >> 3);
+ }
+
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#endif
+
+static void
+xlib_rgb_convert_555 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ ((unsigned short *)obuf)[x] = ((r & 0xf8) << 7) |
+ ((g & 0xf8) << 2) |
+ (b >> 3);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_555_br (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ unsigned char r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 2;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ /* final word is:
+ g5 g4 g3 b7 b6 b5 b4 b3 0 r7 r6 r5 r4 r3 g7 g6
+ */
+ ((unsigned short *)obuf)[x] = ((r & 0xf8) >> 1) |
+ ((g & 0xc0) >> 6) |
+ ((g & 0x18) << 10) |
+ ((b & 0xf8) << 5);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_888_msb (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 3;
+ for (y = 0; y < height; y++)
+ {
+ memcpy (obuf, bptr, (unsigned int)(width + width + width));
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* todo: optimize this */
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+#define HAIRY_CONVERT_888
+#endif
+
+#ifdef HAIRY_CONVERT_888
+static void
+xlib_rgb_convert_888_lsb (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 3;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ if (((unsigned long)obuf | (unsigned long) bp2) & 3)
+ {
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ *obptr++ = b;
+ *obptr++ = g;
+ *obptr++ = r;
+ bp2 += 3;
+ }
+ }
+ else
+ {
+ for (x = 0; x < width - 3; x += 4)
+ {
+ unsigned int r1b0g0r0;
+ unsigned int g2r2b1g1;
+ unsigned int b3g3r3b2;
+
+ r1b0g0r0 = ((unsigned int *)bp2)[0];
+ g2r2b1g1 = ((unsigned int *)bp2)[1];
+ b3g3r3b2 = ((unsigned int *)bp2)[2];
+ ((unsigned int *)obptr)[0] =
+ (r1b0g0r0 & 0xff00) |
+ ((r1b0g0r0 & 0xff0000) >> 16) |
+ (((g2r2b1g1 & 0xff00) | (r1b0g0r0 & 0xff)) << 16);
+ ((unsigned int *)obptr)[1] =
+ (g2r2b1g1 & 0xff0000ff) |
+ ((r1b0g0r0 & 0xff000000) >> 16) |
+ ((b3g3r3b2 & 0xff) << 16);
+ ((unsigned int *)obptr)[2] =
+ (((g2r2b1g1 & 0xff0000) | (b3g3r3b2 & 0xff000000)) >> 16) |
+ ((b3g3r3b2 & 0xff00) << 16) |
+ ((b3g3r3b2 & 0xff0000));
+ bp2 += 12;
+ obptr += 12;
+ }
+ for (; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ *obptr++ = b;
+ *obptr++ = g;
+ *obptr++ = r;
+ bp2 += 3;
+ }
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#else
+static void
+xlib_rgb_convert_888_lsb (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 3;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ obuf[x * 3] = b;
+ obuf[x * 3 + 1] = g;
+ obuf[x * 3 + 2] = r;
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+#endif
+
+/* convert 24-bit packed to 32-bit unpacked */
+/* todo: optimize this */
+static void
+xlib_rgb_convert_0888 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 4;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ ((unsigned int *)obuf)[x] = (r << 16) | (g << 8) | b;
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_0888_br (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 4;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ ((unsigned int *)obuf)[x] = (b << 24) | (g << 16) | (r << 8);
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_8880_br (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * 4;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ ((unsigned int *)obuf)[x] = (b << 16) | (g << 8) | r;
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* Generic truecolor/directcolor conversion function. Slow, but these
+ are oddball modes. */
+static void
+xlib_rgb_convert_truecolor_lsb (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int r_right, r_left;
+ int g_right, g_left;
+ int b_right, b_left;
+ int bpp;
+ unsigned int pixel;
+ int i;
+
+ r_right = 8 - image_info->red_prec;
+ r_left = image_info->red_shift;
+ g_right = 8 - image_info->green_prec;
+ g_left = image_info->green_shift;
+ b_right = 8 - image_info->blue_prec;
+ b_left = image_info->blue_shift;
+ bpp = image_info->bpp;
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * bpp;
+ for (y = 0; y < height; y++)
+ {
+ obptr = obuf;
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ pixel = ((r >> r_right) << r_left) |
+ ((g >> g_right) << g_left) |
+ ((b >> b_right) << b_left);
+ for (i = 0; i < bpp; i++)
+ {
+ *obptr++ = pixel & 0xff;
+ pixel >>= 8;
+ }
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_truecolor_lsb_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int r_right, r_left, r_prec;
+ int g_right, g_left, g_prec;
+ int b_right, b_left, b_prec;
+ int bpp;
+ unsigned int pixel;
+ int i;
+ int dith;
+ int r1, g1, b1;
+ const unsigned char *dmp;
+
+ r_right = 8 - image_info->red_prec;
+ r_left = image_info->red_shift;
+ r_prec = image_info->red_prec;
+ g_right = 8 - image_info->green_prec;
+ g_left = image_info->green_shift;
+ g_prec = image_info->green_prec;
+ b_right = 8 - image_info->blue_prec;
+ b_left = image_info->blue_shift;
+ b_prec = image_info->blue_prec;
+ bpp = image_info->bpp;
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * bpp;
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ obptr = obuf;
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ dith = dmp[(x_align + x) & (DM_WIDTH - 1)] << 2;
+ r1 = r + (dith >> r_prec);
+ g1 = g + ((252 - dith) >> g_prec);
+ b1 = b + (dith >> b_prec);
+ pixel = (((r1 - (r1 >> r_prec)) >> r_right) << r_left) |
+ (((g1 - (g1 >> g_prec)) >> g_right) << g_left) |
+ (((b1 - (b1 >> b_prec)) >> b_right) << b_left);
+ for (i = 0; i < bpp; i++)
+ {
+ *obptr++ = pixel & 0xff;
+ pixel >>= 8;
+ }
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_truecolor_msb (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int r_right, r_left;
+ int g_right, g_left;
+ int b_right, b_left;
+ int bpp;
+ unsigned int pixel;
+ int shift, shift_init;
+
+ r_right = 8 - image_info->red_prec;
+ r_left = image_info->red_shift;
+ g_right = 8 - image_info->green_prec;
+ g_left = image_info->green_shift;
+ b_right = 8 - image_info->blue_prec;
+ b_left = image_info->blue_shift;
+ bpp = image_info->bpp;
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * bpp;
+ shift_init = (bpp - 1) << 3;
+ for (y = 0; y < height; y++)
+ {
+ obptr = obuf;
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ pixel = ((r >> r_right) << r_left) |
+ ((g >> g_right) << g_left) |
+ ((b >> b_right) << b_left);
+ for (shift = shift_init; shift >= 0; shift -= 8)
+ {
+ *obptr++ = (pixel >> shift) & 0xff;
+ }
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_truecolor_msb_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *obuf, *obptr;
+ int bpl;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int r_right, r_left, r_prec;
+ int g_right, g_left, g_prec;
+ int b_right, b_left, b_prec;
+ int bpp;
+ unsigned int pixel;
+ int shift, shift_init;
+ int dith;
+ int r1, g1, b1;
+ const unsigned char *dmp;
+
+ r_right = 8 - image_info->red_prec;
+ r_left = image_info->red_shift;
+ r_prec = image_info->red_prec;
+ g_right = 8 - image_info->green_prec;
+ g_left = image_info->green_shift;
+ g_prec = image_info->green_prec;
+ b_right = 8 - image_info->blue_prec;
+ b_left = image_info->blue_shift;
+ b_prec = image_info->blue_prec;
+ bpp = image_info->bpp;
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax * bpp;
+ shift_init = (bpp - 1) << 3;
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ obptr = obuf;
+ bp2 = bptr;
+ for (x = 0; x < width; x++)
+ {
+ r = bp2[0];
+ g = bp2[1];
+ b = bp2[2];
+ dith = dmp[(x_align + x) & (DM_WIDTH - 1)] << 2;
+ r1 = r + (dith >> r_prec);
+ g1 = g + ((252 - dith) >> g_prec);
+ b1 = b + (dith >> b_prec);
+ pixel = (((r1 - (r1 >> r_prec)) >> r_right) << r_left) |
+ (((g1 - (g1 >> g_prec)) >> g_right) << g_left) |
+ (((b1 - (b1 >> b_prec)) >> b_right) << b_left);
+ for (shift = shift_init; shift >= 0; shift -= 8)
+ {
+ *obptr++ = (pixel >> shift) & 0xff;
+ }
+ bp2 += 3;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* This actually works for depths from 3 to 7 */
+static void
+xlib_rgb_convert_4 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int dith;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x += 1)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ dith = (dmp[(x_align + x) & (DM_WIDTH - 1)] << 2) | 3;
+ obptr[0] = colorcube_d[(((r + dith) & 0x100) >> 2) |
+ (((g + 258 - dith) & 0x100) >> 5) |
+ (((b + dith) & 0x100) >> 8)];
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* This actually works for depths from 3 to 7 */
+static void
+xlib_rgb_convert_gray4 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int shift;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ shift = 9 - image_info->x_visual_info->depth;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ obptr[0] = (g + ((b + r) >> 1)) >> shift;
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_gray4_pack (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ int shift;
+ unsigned char pix0, pix1;
+ /* todo: this is hardcoded to big-endian. Make endian-agile. */
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + (ax >> 1);
+ shift = 9 - image_info->x_visual_info->depth;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x += 2)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ pix0 = (g + ((b + r) >> 1)) >> shift;
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ pix1 = (g + ((b + r) >> 1)) >> shift;
+ obptr[0] = (pix0 << 4) | pix1;
+ obptr++;
+ }
+ if (width & 1)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ pix0 = (g + ((b + r) >> 1)) >> shift;
+ obptr[0] = (pix0 << 4);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* This actually works for depths from 3 to 7 */
+static void
+xlib_rgb_convert_gray4_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int prec, right;
+ int gray;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + ax;
+ prec = image_info->x_visual_info->depth;
+ right = 8 - prec;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ gray = (g + ((b + r) >> 1)) >> 1;
+ gray += (dmp[(x_align + x) & (DM_WIDTH - 1)] << 2) >> prec;
+ obptr[0] = (gray - (gray >> prec)) >> right;
+ obptr++;
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_gray4_d_pack (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int prec, right;
+ int gray;
+ unsigned char pix0, pix1;
+ /* todo: this is hardcoded to big-endian. Make endian-agile. */
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + (ax >> 1);
+ prec = image_info->x_visual_info->depth;
+ right = 8 - prec;
+ for (y = 0; y < height; y++)
+ {
+ bp2 = bptr;
+ obptr = obuf;
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ for (x = 0; x < width; x += 2)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ gray = (g + ((b + r) >> 1)) >> 1;
+ gray += (dmp[(x_align + x) & (DM_WIDTH - 1)] << 2) >> prec;
+ pix0 = (gray - (gray >> prec)) >> right;
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ gray = (g + ((b + r) >> 1)) >> 1;
+ gray += (dmp[(x_align + x + 1) & (DM_WIDTH - 1)] << 2) >> prec;
+ pix1 = (gray - (gray >> prec)) >> right;
+ obptr[0] = (pix0 << 4) | pix1;
+ obptr++;
+ }
+ if (width & 1)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ gray = (g + ((b + r) >> 1)) >> 1;
+ gray += (dmp[(x_align + x + 1) & (DM_WIDTH - 1)] << 2) >> prec;
+ pix0 = (gray - (gray >> prec)) >> right;
+ obptr[0] = (pix0 << 4);
+ }
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+static void
+xlib_rgb_convert_1 (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ int bpl;
+ unsigned char *obuf, *obptr;
+ unsigned char *bptr, *bp2;
+ int r, g, b;
+ const unsigned char *dmp;
+ int dith;
+ unsigned char byte;
+
+ bptr = buf;
+ bpl = image->bytes_per_line;
+ obuf = ((unsigned char *)image->data) + ay * bpl + (ax >> 3);
+ byte = 0; /* unnecessary, but it keeps gcc from complaining */
+ for (y = 0; y < height; y++)
+ {
+ dmp = DM[(y_align + y) & (DM_HEIGHT - 1)];
+ bp2 = bptr;
+ obptr = obuf;
+ for (x = 0; x < width; x++)
+ {
+ r = *bp2++;
+ g = *bp2++;
+ b = *bp2++;
+ dith = (dmp[(x_align + x) & (DM_WIDTH - 1)] << 4) | 4;
+ byte += byte + (r + g + g + b + dith > 1020);
+ if ((x & 7) == 7)
+ {
+ obptr[0] = byte;
+ obptr++;
+ }
+ }
+ if (x & 7)
+ obptr[0] = byte << (8 - (x & 7));
+ bptr += rowstride;
+ obuf += bpl;
+ }
+}
+
+/* Returns a pointer to the stage buffer. */
+static unsigned char *
+xlib_rgb_ensure_stage (void)
+{
+ if (image_info->stage_buf == NULL)
+ image_info->stage_buf = malloc (IMAGE_HEIGHT * STAGE_ROWSTRIDE);
+ return image_info->stage_buf;
+}
+
+/* This is slow. Speed me up, please. */
+static void
+xlib_rgb_32_to_stage (unsigned char *buf, int rowstride, int width, int height)
+{
+ int x, y;
+ unsigned char *pi_start, *po_start;
+ unsigned char *pi, *po;
+
+ pi_start = buf;
+ po_start = xlib_rgb_ensure_stage ();
+ for (y = 0; y < height; y++)
+ {
+ pi = pi_start;
+ po = po_start;
+ for (x = 0; x < width; x++)
+ {
+ *po++ = *pi++;
+ *po++ = *pi++;
+ *po++ = *pi++;
+ pi++;
+ }
+ pi_start += rowstride;
+ po_start += STAGE_ROWSTRIDE;
+ }
+}
+
+/* Generic 32bit RGB conversion function - convert to 24bit packed, then
+ go from there. */
+static void
+xlib_rgb_convert_32_generic (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ xlib_rgb_32_to_stage (buf, rowstride, width, height);
+
+ (*image_info->conv) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+/* Generic 32bit RGB conversion function - convert to 24bit packed, then
+ go from there. */
+static void
+xlib_rgb_convert_32_generic_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ xlib_rgb_32_to_stage (buf, rowstride, width, height);
+
+ (*image_info->conv_d) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+/* This is slow. Speed me up, please. */
+static void
+xlib_rgb_gray_to_stage (unsigned char *buf, int rowstride, int width, int height)
+{
+ int x, y;
+ unsigned char *pi_start, *po_start;
+ unsigned char *pi, *po;
+ unsigned char gray;
+
+ pi_start = buf;
+ po_start = xlib_rgb_ensure_stage ();
+ for (y = 0; y < height; y++)
+ {
+ pi = pi_start;
+ po = po_start;
+ for (x = 0; x < width; x++)
+ {
+ gray = *pi++;
+ *po++ = gray;
+ *po++ = gray;
+ *po++ = gray;
+ }
+ pi_start += rowstride;
+ po_start += STAGE_ROWSTRIDE;
+ }
+}
+
+/* Generic gray conversion function - convert to 24bit packed, then go
+ from there. */
+static void
+xlib_rgb_convert_gray_generic (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ xlib_rgb_gray_to_stage (buf, rowstride, width, height);
+
+ (*image_info->conv) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+static void
+xlib_rgb_convert_gray_generic_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ xlib_rgb_gray_to_stage (buf, rowstride, width, height);
+
+ (*image_info->conv_d) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+/* Render grayscale using indexed method. */
+static void
+xlib_rgb_convert_gray_cmap (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ (*image_info->conv_indexed) (image, ax, ay, width, height,
+ buf, rowstride,
+ x_align, y_align, image_info->gray_cmap);
+}
+
+#if 0
+static void
+xlib_rgb_convert_gray_cmap_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ (*image_info->conv_indexed_d) (image, ax, ay, width, height,
+ buf, rowstride,
+ x_align, y_align, image_info->gray_cmap);
+}
+#endif
+
+/* This is slow. Speed me up, please. */
+static void
+xlib_rgb_indexed_to_stage (unsigned char *buf, int rowstride, int width, int height,
+ XlibRgbCmap *cmap)
+{
+ int x, y;
+ unsigned char *pi_start, *po_start;
+ unsigned char *pi, *po;
+ int rgb;
+
+ pi_start = buf;
+ po_start = xlib_rgb_ensure_stage ();
+ for (y = 0; y < height; y++)
+ {
+ pi = pi_start;
+ po = po_start;
+ for (x = 0; x < width; x++)
+ {
+ rgb = cmap->colors[*pi++];
+ *po++ = rgb >> 16;
+ *po++ = (rgb >> 8) & 0xff;
+ *po++ = rgb & 0xff;
+ }
+ pi_start += rowstride;
+ po_start += STAGE_ROWSTRIDE;
+ }
+}
+
+/* Generic gray conversion function - convert to 24bit packed, then go
+ from there. */
+static void
+xlib_rgb_convert_indexed_generic (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align, XlibRgbCmap *cmap)
+{
+ xlib_rgb_indexed_to_stage (buf, rowstride, width, height, cmap);
+
+ (*image_info->conv) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+static void
+xlib_rgb_convert_indexed_generic_d (XImage *image,
+ int ax, int ay, int width, int height,
+ unsigned char *buf, int rowstride,
+ int x_align, int y_align,
+ XlibRgbCmap *cmap)
+{
+ xlib_rgb_indexed_to_stage (buf, rowstride, width, height, cmap);
+
+ (*image_info->conv_d) (image, ax, ay, width, height,
+ image_info->stage_buf, STAGE_ROWSTRIDE,
+ x_align, y_align, cmap);
+}
+
+/* Select a conversion function based on the visual and a
+ representative image. */
+static void
+xlib_rgb_select_conv (XImage *image, ByteOrder byte_order)
+{
+ int depth, byterev;
+ int vtype; /* visual type */
+ int bpp; /* bits per pixel - from the visual */
+ unsigned int red_mask, green_mask, blue_mask;
+ XlibRgbConvFunc conv, conv_d;
+ XlibRgbConvFunc conv_32, conv_32_d;
+ XlibRgbConvFunc conv_gray, conv_gray_d;
+ XlibRgbConvFunc conv_indexed, conv_indexed_d;
+ Bool mask_rgb, mask_bgr;
+
+ depth = image_info->x_visual_info->depth;
+ bpp = image->bits_per_pixel;
+ if (xlib_rgb_verbose)
+ printf ("Chose visual 0x%x, image bpp=%d, %s first\n",
+ (int)image_info->x_visual_info->visual->visualid,
+ bpp, byte_order == LSB_FIRST ? "lsb" : "msb");
+
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ byterev = (byte_order == LSB_FIRST);
+#else
+ byterev = (byte_order == MSB_FIRST);
+#endif
+
+ vtype = image_info->x_visual_info->class;
+ if (vtype == DirectColor)
+ vtype = TrueColor;
+
+ red_mask = image_info->x_visual_info->red_mask;
+ green_mask = image_info->x_visual_info->green_mask;
+ blue_mask = image_info->x_visual_info->blue_mask;
+
+ mask_rgb = red_mask == 0xff0000 && green_mask == 0xff00 && blue_mask == 0xff;
+ mask_bgr = red_mask == 0xff && green_mask == 0xff00 && blue_mask == 0xff0000;
+
+ conv = NULL;
+ conv_d = NULL;
+
+ conv_32 = xlib_rgb_convert_32_generic;
+ conv_32_d = xlib_rgb_convert_32_generic_d;
+
+ conv_gray = xlib_rgb_convert_gray_generic;
+ conv_gray_d = xlib_rgb_convert_gray_generic_d;
+
+ conv_indexed = xlib_rgb_convert_indexed_generic;
+ conv_indexed_d = xlib_rgb_convert_indexed_generic_d;
+
+ image_info->dith_default = FALSE;
+
+ if (image_info->bitmap)
+ conv = xlib_rgb_convert_1;
+ else if (bpp == 16 && depth == 16 && !byterev &&
+ red_mask == 0xf800 && green_mask == 0x7e0 && blue_mask == 0x1f)
+ {
+ conv = xlib_rgb_convert_565;
+ conv_d = xlib_rgb_convert_565_d;
+ conv_gray = xlib_rgb_convert_565_gray;
+ xlib_rgb_preprocess_dm_565 ();
+ }
+ else if (bpp == 16 && depth == 16 &&
+ vtype == TrueColor&& byterev &&
+ red_mask == 0xf800 && green_mask == 0x7e0 && blue_mask == 0x1f)
+ conv = xlib_rgb_convert_565_br;
+
+ else if (bpp == 16 && depth == 15 &&
+ vtype == TrueColor && !byterev &&
+ red_mask == 0x7c00 && green_mask == 0x3e0 && blue_mask == 0x1f)
+ conv = xlib_rgb_convert_555;
+
+ else if (bpp == 16 && depth == 15 &&
+ vtype == TrueColor && byterev &&
+ red_mask == 0x7c00 && green_mask == 0x3e0 && blue_mask == 0x1f)
+ conv = xlib_rgb_convert_555_br;
+
+ /* I'm not 100% sure about the 24bpp tests - but testing will show*/
+ else if (bpp == 24 && depth == 24 && vtype == TrueColor &&
+ ((mask_rgb && byte_order == LSB_FIRST) ||
+ (mask_bgr && byte_order == MSB_FIRST)))
+ conv = xlib_rgb_convert_888_lsb;
+ else if (bpp == 24 && depth == 24 && vtype == TrueColor &&
+ ((mask_rgb && byte_order == MSB_FIRST) ||
+ (mask_bgr && byte_order == LSB_FIRST)))
+ conv = xlib_rgb_convert_888_msb;
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ else if (bpp == 32 && depth == 24 && vtype == TrueColor &&
+ (mask_rgb && byte_order == LSB_FIRST))
+ conv = xlib_rgb_convert_0888_br;
+ else if (bpp == 32 && depth == 24 && vtype == TrueColor &&
+ (mask_rgb && byte_order == MSB_FIRST))
+ conv = xlib_rgb_convert_0888;
+ else if (bpp == 32 && depth == 24 && vtype == TrueColor &&
+ (mask_bgr && byte_order == MSB_FIRST))
+ conv = xlib_rgb_convert_8880_br;
+#else
+ else if (bpp == 32 && depth == 24 && vtype == TrueColor &&
+ (mask_rgb && byte_order == MSB_FIRST))
+ conv = xlib_rgb_convert_0888_br;
+ else if (bpp == 32 && (depth == 32 || depth == 24) && vtype == TrueColor &&
+ (mask_rgb && byte_order == LSB_FIRST))
+ conv = xlib_rgb_convert_0888;
+ else if (bpp == 32 && depth == 24 && vtype == TrueColor &&
+ (mask_bgr && byte_order == LSB_FIRST))
+ conv = xlib_rgb_convert_8880_br;
+#endif
+
+ else if (vtype == TrueColor && byte_order == LSB_FIRST)
+ {
+ conv = xlib_rgb_convert_truecolor_lsb;
+ conv_d = xlib_rgb_convert_truecolor_lsb_d;
+ }
+ else if (vtype == TrueColor && byte_order == MSB_FIRST)
+ {
+ conv = xlib_rgb_convert_truecolor_msb;
+ conv_d = xlib_rgb_convert_truecolor_msb_d;
+ }
+ else if (bpp == 8 && depth == 8 && (vtype == PseudoColor
+#ifdef ENABLE_GRAYSCALE
+ || vtype == GrayScale
+#endif
+ ))
+ {
+ image_info->dith_default = TRUE;
+ conv = xlib_rgb_convert_8;
+ if (vtype != GrayScale)
+ {
+ if (image_info->nred_shades == 6 &&
+ image_info->ngreen_shades == 6 &&
+ image_info->nblue_shades == 6)
+ conv_d = xlib_rgb_convert_8_d666;
+ else
+ conv_d = xlib_rgb_convert_8_d;
+ }
+ conv_indexed = xlib_rgb_convert_8_indexed;
+ conv_gray = xlib_rgb_convert_gray_cmap;
+ }
+ else if (bpp == 8 && depth == 8 && (vtype == StaticGray
+#ifdef not_ENABLE_GRAYSCALE
+ || vtype == GrayScale
+#endif
+ ))
+ {
+ conv = xlib_rgb_convert_gray8;
+ conv_gray = xlib_rgb_convert_gray8_gray;
+ }
+ else if (bpp == 8 && depth < 8 && depth >= 2 &&
+ (vtype == StaticGray
+ || vtype == GrayScale))
+ {
+ conv = xlib_rgb_convert_gray4;
+ conv_d = xlib_rgb_convert_gray4_d;
+ }
+ else if (bpp == 8 && depth < 8 && depth >= 3)
+ {
+ conv = xlib_rgb_convert_4;
+ }
+ else if (bpp == 4 && depth <= 4 && depth >= 2 &&
+ (vtype == StaticGray
+ || vtype == GrayScale))
+ {
+ conv = xlib_rgb_convert_gray4_pack;
+ conv_d = xlib_rgb_convert_gray4_d_pack;
+ }
+
+ if (conv_d == NULL)
+ conv_d = conv;
+
+ image_info->conv = conv;
+ image_info->conv_d = conv_d;
+
+ image_info->conv_32 = conv_32;
+ image_info->conv_32_d = conv_32_d;
+
+ image_info->conv_gray = conv_gray;
+ image_info->conv_gray_d = conv_gray_d;
+
+ image_info->conv_indexed = conv_indexed;
+ image_info->conv_indexed_d = conv_indexed_d;
+}
+
+static int horiz_idx;
+static int horiz_y = IMAGE_HEIGHT;
+static int vert_idx;
+static int vert_x = IMAGE_WIDTH;
+static int tile_idx;
+static int tile_x = IMAGE_WIDTH;
+static int tile_y1 = IMAGE_HEIGHT;
+static int tile_y2 = IMAGE_HEIGHT;
+
+#ifdef VERBOSE
+static int sincelast;
+#endif
+
+/* Defining NO_FLUSH can cause inconsistent screen updates, but is useful
+ for performance evaluation. */
+
+#undef NO_FLUSH
+
+static int
+xlib_rgb_alloc_scratch_image (void)
+{
+ if (static_image_idx == N_IMAGES)
+ {
+#ifndef NO_FLUSH
+ XFlush(image_info->display);
+#endif
+#ifdef VERBOSE
+ printf ("flush, %d puts since last flush\n", sincelast);
+ sincelast = 0;
+#endif
+ static_image_idx = 0;
+ horiz_y = IMAGE_HEIGHT;
+ vert_x = IMAGE_WIDTH;
+ tile_x = IMAGE_WIDTH;
+ tile_y1 = tile_y2 = IMAGE_HEIGHT;
+ }
+ return static_image_idx++;
+}
+
+static XImage *
+xlib_rgb_alloc_scratch (int width, int height, int *ax, int *ay)
+{
+ XImage *image;
+ int idx;
+
+ if (width >= (IMAGE_WIDTH >> 1))
+ {
+ if (height >= (IMAGE_HEIGHT >> 1))
+ {
+ idx = xlib_rgb_alloc_scratch_image ();
+ *ax = 0;
+ *ay = 0;
+ }
+ else
+ {
+ if (height + horiz_y > IMAGE_HEIGHT)
+ {
+ horiz_idx = xlib_rgb_alloc_scratch_image ();
+ horiz_y = 0;
+ }
+ idx = horiz_idx;
+ *ax = 0;
+ *ay = horiz_y;
+ horiz_y += height;
+ }
+ }
+ else
+ {
+ if (height >= (IMAGE_HEIGHT >> 1))
+ {
+ if (width + vert_x > IMAGE_WIDTH)
+ {
+ vert_idx = xlib_rgb_alloc_scratch_image ();
+ vert_x = 0;
+ }
+ idx = vert_idx;
+ *ax = vert_x;
+ *ay = 0;
+ /* using 3 and -4 would be slightly more efficient on 32-bit machines
+ with > 1bpp displays */
+ vert_x += (width + 7) & -8;
+ }
+ else
+ {
+ if (width + tile_x > IMAGE_WIDTH)
+ {
+ tile_y1 = tile_y2;
+ tile_x = 0;
+ }
+ if (height + tile_y1 > IMAGE_HEIGHT)
+ {
+ tile_idx = xlib_rgb_alloc_scratch_image ();
+ tile_x = 0;
+ tile_y1 = 0;
+ tile_y2 = 0;
+ }
+ if (height + tile_y1 > tile_y2)
+ tile_y2 = height + tile_y1;
+ idx = tile_idx;
+ *ax = tile_x;
+ *ay = tile_y1;
+ tile_x += (width + 7) & -8;
+ }
+ }
+ image = static_image[idx];
+#ifdef VERBOSE
+ printf ("index %d, x %d, y %d (%d x %d)\n", idx, *ax, *ay, width, height);
+ sincelast++;
+#endif
+ return image;
+}
+
+static void
+xlib_draw_rgb_image_core (Drawable drawable,
+ GC gc,
+ int x,
+ int y,
+ int width,
+ int height,
+ unsigned char *buf,
+ int pixstride,
+ int rowstride,
+ XlibRgbConvFunc conv,
+ XlibRgbCmap *cmap,
+ int xdith,
+ int ydith)
+{
+ int ay, ax;
+ int xs0, ys0;
+ XImage *image;
+ int width1, height1;
+ unsigned char *buf_ptr;
+
+ if (image_info->bitmap)
+ {
+ if (image_info->own_gc == 0)
+ {
+ XColor color;
+
+ image_info->own_gc = XCreateGC(image_info->display,
+ drawable,
+ 0, NULL);
+ color.pixel = WhitePixel(image_info->display,
+ image_info->screen_num);
+ XSetForeground(image_info->display, image_info->own_gc, color.pixel);
+ color.pixel = BlackPixel(image_info->display,
+ image_info->screen_num);
+ XSetBackground(image_info->display, image_info->own_gc, color.pixel);
+ }
+ gc = image_info->own_gc;
+ }
+ for (ay = 0; ay < height; ay += IMAGE_HEIGHT)
+ {
+ height1 = MIN (height - ay, IMAGE_HEIGHT);
+ for (ax = 0; ax < width; ax += IMAGE_WIDTH)
+ {
+ width1 = MIN (width - ax, IMAGE_WIDTH);
+ buf_ptr = buf + ay * rowstride + ax * pixstride;
+
+ image = xlib_rgb_alloc_scratch (width1, height1, &xs0, &ys0);
+
+ conv (image, xs0, ys0, width1, height1, buf_ptr, rowstride,
+ x + ax + xdith, y + ay + ydith, cmap);
+
+#ifndef DONT_ACTUALLY_DRAW
+ XPutImage(image_info->display, drawable, gc, image,
+ xs0, ys0, x + ax, y + ay, (unsigned int)width1, (unsigned int)height1);
+#endif
+ }
+ }
+}
+
+
+/**
+ * xlib_draw_rgb_image:
+ * @drawable: Destination drawable.
+ * @gc: A graphic context.
+ * @x: Leftmost coordinate of the destination rectangle.
+ * @y: Upper coordinate of the destination rectangle.
+ * @width: Width of the destination rectangle, in pixels.
+ * @height: Height of the destination rectangle, in pixels.
+ * @dith: Dithering method to use.
+ * @rgb_buf: Pointer to the pixel in the RGB buffer that corresponds to the
+ * upper-left corner of the rectangular region to render.
+ * @rowstride: Offset between pixel rows in the RGB buffer, in bytes.
+ *
+ * Renders an RGB buffer to a drawable. Pixels are specified as RGB triplets
+ * with 8 bits per channel. An image will thus look like an RGBRGBRGBRGB
+ * sequence of 8-bit values. This function does not let you specify dither
+ * offsets; applications that need to render partial regions of a buffer to
+ * build the final image should use xlib_draw_rgb_image_dithalign() instead.
+ **/
+void
+xlib_draw_rgb_image (Drawable drawable,
+ GC gc,
+ int x,
+ int y,
+ int width,
+ int height,
+ XlibRgbDither dith,
+ unsigned char *rgb_buf,
+ int rowstride)
+{
+ if (dith == XLIB_RGB_DITHER_NONE || (dith == XLIB_RGB_DITHER_NORMAL &&
+ !image_info->dith_default))
+ xlib_draw_rgb_image_core (drawable, gc, x, y, width, height,
+ rgb_buf, 3, rowstride, image_info->conv, NULL,
+ 0, 0);
+ else
+ xlib_draw_rgb_image_core (drawable, gc, x, y, width, height,
+ rgb_buf, 3, rowstride, image_info->conv_d, NULL,
+ 0, 0);
+}
+
+
+
+/**
+ * xlib_rgb_cmap_free:
+ * @cmap: An XlibRGB colormap.
+ *
+ * Frees an XlibRGB colormap.
+ **/
+void
+xlib_rgb_cmap_free (XlibRgbCmap *cmap)
+{
+ free (cmap);
+}
+
+/**
+ * xlib_draw_indexed_image:
+ * @drawable: FIXME
+ * @gc: FIXME
+ * @x: FIXME
+ * @y: FIXME
+ * @width: FIXME
+ * @height: FIXME
+ * @dith: FIXME
+ * @buf: FIXME
+ * @rowstride: FIXME
+ * @cmap: FIXME
+ *
+ * FIXME
+ **/
+void
+xlib_draw_indexed_image (Drawable drawable,
+ GC gc,
+ int x,
+ int y,
+ int width,
+ int height,
+ XlibRgbDither dith,
+ unsigned char *buf,
+ int rowstride,
+ XlibRgbCmap *cmap)
+{
+ if (dith == XLIB_RGB_DITHER_NONE || (dith == XLIB_RGB_DITHER_NORMAL &&
+ !image_info->dith_default))
+ xlib_draw_rgb_image_core (drawable, gc, x, y, width, height,
+ buf, 1, rowstride,
+ image_info->conv_indexed, cmap, 0, 0);
+ else
+ xlib_draw_rgb_image_core (drawable, gc, x, y, width, height,
+ buf, 1, rowstride,
+ image_info->conv_indexed_d, cmap, 0, 0);
+}
+
+/**
+ * xlib_rgb_ditherable:
+ *
+ * Queries whether XlibRGB supports dithering for its chosen visual.
+ *
+ * Return value: TRUE if dithering can be performed for the visual that XlibRGB
+ * is using, FALSE otherwise.
+ **/
+Bool
+xlib_rgb_ditherable (void)
+{
+ return (image_info->conv != image_info->conv_d);
+}
+
+/**
+ * xlib_rgb_get_cmap:
+ *
+ * Queries the X colormap that XlibRGB is using.
+ *
+ * Return value: An X colormap.
+ **/
+Colormap
+xlib_rgb_get_cmap (void)
+{
+ /* xlib_rgb_init (); */
+ if (image_info)
+ return image_info->cmap;
+ else
+ return 0;
+}
+
+/**
+ * xlib_rgb_get_visual:
+ *
+ * Queries the visual that XlibRGB is using.
+ *
+ * Return value: An X visual.
+ **/
+Visual *
+xlib_rgb_get_visual (void)
+{
+ /* xlib_rgb_init (); */
+ if (image_info)
+ return image_info->x_visual_info->visual;
+ else
+ return 0;
+}
+
+/**
+ * xlib_rgb_get_visual_info:
+ *
+ * Queries the visual info structure for the visual that XlibRGB is using.
+ *
+ * Return value: An XVisualInfo structure.
+ **/
+XVisualInfo *
+xlib_rgb_get_visual_info (void)
+{
+ /* xlib_rgb_init (); */
+ if (image_info)
+ return image_info->x_visual_info;
+ else
+ return 0;
+}
+
+/**
+ * xlib_rgb_get_depth:
+ *
+ * Queries the depth of the visual that XlibRGB is using.
+ *
+ * Return value: Bit depth.
+ **/
+int
+xlib_rgb_get_depth (void)
+{
+ XVisualInfo * v = xlib_rgb_get_visual_info();
+
+ if (v)
+ {
+ return v->depth;
+ }
+
+ return 0;
+}
+
+/**
+ * xlib_rgb_get_display:
+ *
+ * Queries the X display that XlibRGB is using.
+ *
+ * Return value: An X display.
+ **/
+Display *
+xlib_rgb_get_display (void)
+{
+ if (image_info)
+ return image_info->display;
+
+ return NULL;
+}
+
+/**
+ * xlib_rgb_get_screen:
+ *
+ * Queries the screen that XlibRGB is using.
+ *
+ * Return value: An X screen.
+ **/
+Screen *
+xlib_rgb_get_screen (void)
+{
+ if (image_info)
+ return image_info->screen;
+
+ return NULL;
+}
diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.h b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.h
new file mode 100644
index 00000000..afde174e
--- /dev/null
+++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.h
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "MPL"); you may not use this file except in
+ * compliance with the MPL. You may obtain a copy of the MPL at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the MPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
+ * for the specific language governing rights and limitations under the
+ * MPL.
+ *
+ * Alternatively, the contents of this file may be used under the
+ * terms of the GNU Library General Public License (the "LGPL"), in
+ * which case the provisions of the LGPL are applicable instead of
+ * those above. If you wish to allow use of your version of this file
+ * only under the terms of the LGPL and not to allow others to use
+ * your version of this file under the MPL, indicate your decision by
+ * deleting the provisions above and replace them with the notice and
+ * other provisions required by the LGPL. If you do not delete the
+ * provisions above, a recipient may use your version of this file
+ * under either the MPL or the LGPL.
+ */
+
+/*
+ * This code is derived from GdkRgb.
+ * For more information on GdkRgb, see http://www.levien.com/gdkrgb/
+ * Raph Levien <raph@acm.org>
+ */
+
+/* Ported by Christopher Blizzard to Xlib. With permission from the
+ * original authors of this file, the contents of this file are also
+ * redistributable under the terms of the Mozilla Public license. For
+ * information about the Mozilla Public License, please see the
+ * license information at http://www.mozilla.org/MPL/
+ */
+
+/* This code is copyright the following authors:
+ * Raph Levien <raph@acm.org>
+ * Manish Singh <manish@gtk.org>
+ * Tim Janik <timj@gtk.org>
+ * Peter Mattis <petm@xcf.berkeley.edu>
+ * Spencer Kimball <spencer@xcf.berkeley.edu>
+ * Josh MacDonald <jmacd@xcf.berkeley.edu>
+ * Christopher Blizzard <blizzard@redhat.com>
+ * Owen Taylor <otaylor@redhat.com>
+ * Shawn T. Amundson <amundson@gtk.org>
+*/
+
+
+#ifndef __XLIB_RGB_H__
+#define __XLIB_RGB_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xos.h>
+#include <X11/Intrinsic.h>
+
+
+typedef struct _XlibRgbCmap XlibRgbCmap;
+
+struct _XlibRgbCmap {
+ unsigned int colors[256];
+ unsigned char lut[256]; /* for 8-bit modes */
+};
+
+void
+xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth);
+
+typedef enum
+{
+ XLIB_RGB_DITHER_NONE,
+ XLIB_RGB_DITHER_NORMAL,
+ XLIB_RGB_DITHER_MAX
+} XlibRgbDither;
+
+void
+xlib_draw_rgb_image (Drawable drawable,
+ GC gc,
+ int x,
+ int y,
+ int width,
+ int height,
+ XlibRgbDither dith,
+ unsigned char *rgb_buf,
+ int rowstride);
+
+void
+xlib_rgb_cmap_free (XlibRgbCmap *cmap);
+
+void
+xlib_draw_indexed_image (Drawable drawable,
+ GC gc,
+ int x,
+ int y,
+ int width,
+ int height,
+ XlibRgbDither dith,
+ unsigned char *buf,
+ int rowstride,
+ XlibRgbCmap *cmap);
+
+/* Below are some functions which are primarily useful for debugging
+ and experimentation. */
+Bool
+xlib_rgb_ditherable (void);
+
+void
+xlib_rgb_set_verbose (Bool verbose);
+
+/* experimental colormap stuff */
+void
+xlib_rgb_set_install (Bool install);
+
+void
+xlib_rgb_set_min_colors (int min_colors);
+
+Colormap
+xlib_rgb_get_cmap (void);
+
+Visual *
+xlib_rgb_get_visual (void);
+
+XVisualInfo *
+xlib_rgb_get_visual_info (void);
+
+int
+xlib_rgb_get_depth (void);
+
+Display *
+xlib_rgb_get_display (void);
+
+Screen *
+xlib_rgb_get_screen (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /* __XLIB_RGB_H__ */
diff --git a/ksvg/impl/svgpathparser.cc b/ksvg/impl/svgpathparser.cc
new file mode 100644
index 00000000..0f7521e0
--- /dev/null
+++ b/ksvg/impl/svgpathparser.cc
@@ -0,0 +1,564 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002, 2003 The Karbon Developers
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "svgpathparser.h"
+#include <qstring.h>
+#include <math.h>
+
+// parses the number into parameter number
+const char *
+KSVG::getNumber( const char *ptr, double &number )
+{
+ int integer, exponent;
+ double decimal, frac;
+ int sign, expsign;
+
+ exponent = 0;
+ integer = 0;
+ frac = 1.0;
+ decimal = 0;
+ sign = 1;
+ expsign = 1;
+
+ // read the sign
+ if(*ptr == '+')
+ ptr++;
+ else if(*ptr == '-')
+ {
+ ptr++;
+ sign = -1;
+ }
+
+ // read the integer part
+ while(*ptr != '\0' && *ptr >= '0' && *ptr <= '9')
+ integer = (integer * 10) + *(ptr++) - '0';
+ if(*ptr == '.') // read the decimals
+ {
+ ptr++;
+ while(*ptr != '\0' && *ptr >= '0' && *ptr <= '9')
+ decimal += (*(ptr++) - '0') * (frac *= 0.1);
+ }
+
+ if(*ptr == 'e' || *ptr == 'E') // read the exponent part
+ {
+ ptr++;
+
+ // read the sign of the exponent
+ if(*ptr == '+')
+ ptr++;
+ else if(*ptr == '-')
+ {
+ ptr++;
+ expsign = -1;
+ }
+
+ exponent = 0;
+ while(*ptr != '\0' && *ptr >= '0' && *ptr <= '9')
+ {
+ exponent *= 10;
+ exponent += *ptr - '0';
+ ptr++;
+ }
+ }
+ number = integer + decimal;
+ number *= sign * pow( (double)10, double( expsign * exponent ) );
+
+ return ptr;
+}
+
+// parses the coord into parameter number and forwards to the next coord in the path data
+const char *
+SVGPathParser::getCoord( const char *ptr, double &number )
+{
+ ptr = KSVG::getNumber( ptr, number );
+ // skip the following space
+ if(*ptr == ' ')
+ ptr++;
+
+ return ptr;
+}
+
+void
+SVGPathParser::parseSVG( const QString &s, bool process )
+{
+ if(!s.isEmpty())
+ {
+ QString d = s;
+ d = d.replace(',', ' ');
+ d = d.simplifyWhiteSpace();
+ const char *ptr = d.latin1();
+ const char *end = d.latin1() + d.length() + 1;
+
+ double contrlx, contrly, curx, cury, subpathx, subpathy, tox, toy, x1, y1, x2, y2, xc, yc;
+ double px1, py1, px2, py2, px3, py3;
+ bool relative, closed = true;
+ char command = *(ptr++), lastCommand = ' ';
+
+ subpathx = subpathy = curx = cury = contrlx = contrly = 0.0;
+ while( ptr < end )
+ {
+ if( *ptr == ' ' )
+ ptr++;
+
+ relative = false;
+
+ //std::cout << "Command : " << command << std::endl;
+ switch( command )
+ {
+ case 'm':
+ relative = true;
+ case 'M':
+ {
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ if( process )
+ {
+ subpathx = curx = relative ? curx + tox : tox;
+ subpathy = cury = relative ? cury + toy : toy;
+
+ svgMoveTo( curx, cury, closed );
+ }
+ else
+ svgMoveTo( tox, toy, closed, !relative );
+ closed = false;
+ break;
+ }
+ case 'l':
+ relative = true;
+ case 'L':
+ {
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ if( process )
+ {
+ curx = relative ? curx + tox : tox;
+ cury = relative ? cury + toy : toy;
+
+ svgLineTo( curx, cury );
+ }
+ else
+ svgLineTo( tox, toy, !relative );
+ break;
+ }
+ case 'h':
+ {
+ ptr = getCoord( ptr, tox );
+ if( process )
+ {
+ curx = curx + tox;
+ svgLineTo( curx, cury );
+ }
+ else
+ svgLineToHorizontal( tox, false );
+ break;
+ }
+ case 'H':
+ {
+ ptr = getCoord( ptr, tox );
+ if( process )
+ {
+ curx = tox;
+ svgLineTo( curx, cury );
+ }
+ else
+ svgLineToHorizontal( tox );
+ break;
+ }
+ case 'v':
+ {
+ ptr = getCoord( ptr, toy );
+ if( process )
+ {
+ cury = cury + toy;
+ svgLineTo( curx, cury );
+ }
+ else
+ svgLineToVertical( toy, false );
+ break;
+ }
+ case 'V':
+ {
+ ptr = getCoord( ptr, toy );
+ if( process )
+ {
+ cury = toy;
+ svgLineTo( curx, cury );
+ }
+ else
+ svgLineToVertical( toy );
+ break;
+ }
+ case 'z':
+ case 'Z':
+ {
+ // reset curx, cury for next path
+ if( process )
+ {
+ curx = subpathx;
+ cury = subpathy;
+ }
+ closed = true;
+ svgClosePath();
+ break;
+ }
+ case 'c':
+ relative = true;
+ case 'C':
+ {
+ ptr = getCoord( ptr, x1 );
+ ptr = getCoord( ptr, y1 );
+ ptr = getCoord( ptr, x2 );
+ ptr = getCoord( ptr, y2 );
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ if( process )
+ {
+ px1 = relative ? curx + x1 : x1;
+ py1 = relative ? cury + y1 : y1;
+ px2 = relative ? curx + x2 : x2;
+ py2 = relative ? cury + y2 : y2;
+ px3 = relative ? curx + tox : tox;
+ py3 = relative ? cury + toy : toy;
+
+ svgCurveToCubic( px1, py1, px2, py2, px3, py3 );
+
+ contrlx = relative ? curx + x2 : x2;
+ contrly = relative ? cury + y2 : y2;
+ curx = relative ? curx + tox : tox;
+ cury = relative ? cury + toy : toy;
+ }
+ else
+ svgCurveToCubic( x1, y1, x2, y2, tox, toy, !relative );
+
+ break;
+ }
+ case 's':
+ relative = true;
+ case 'S':
+ {
+ ptr = getCoord( ptr, x2 );
+ ptr = getCoord( ptr, y2 );
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ if( process )
+ {
+ px1 = 2 * curx - contrlx;
+ py1 = 2 * cury - contrly;
+ px2 = relative ? curx + x2 : x2;
+ py2 = relative ? cury + y2 : y2;
+ px3 = relative ? curx + tox : tox;
+ py3 = relative ? cury + toy : toy;
+
+ svgCurveToCubic( px1, py1, px2, py2, px3, py3 );
+
+ contrlx = relative ? curx + x2 : x2;
+ contrly = relative ? cury + y2 : y2;
+ curx = relative ? curx + tox : tox;
+ cury = relative ? cury + toy : toy;
+ }
+ else
+ svgCurveToCubicSmooth( x2, y2, tox, toy, !relative );
+ break;
+ }
+ case 'q':
+ relative = true;
+ case 'Q':
+ {
+ ptr = getCoord( ptr, x1 );
+ ptr = getCoord( ptr, y1 );
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ if( process )
+ {
+ px1 = relative ? (curx + 2 * (x1 + curx)) * (1.0 / 3.0) : (curx + 2 * x1) * (1.0 / 3.0);
+ py1 = relative ? (cury + 2 * (y1 + cury)) * (1.0 / 3.0) : (cury + 2 * y1) * (1.0 / 3.0);
+ px2 = relative ? ((curx + tox) + 2 * (x1 + curx)) * (1.0 / 3.0) : (tox + 2 * x1) * (1.0 / 3.0);
+ py2 = relative ? ((cury + toy) + 2 * (y1 + cury)) * (1.0 / 3.0) : (toy + 2 * y1) * (1.0 / 3.0);
+ px3 = relative ? curx + tox : tox;
+ py3 = relative ? cury + toy : toy;
+
+ svgCurveToCubic( px1, py1, px2, py2, px3, py3 );
+
+ contrlx = relative ? curx + x1 : (tox + 2 * x1) * (1.0 / 3.0);
+ contrly = relative ? cury + y1 : (toy + 2 * y1) * (1.0 / 3.0);
+ curx = relative ? curx + tox : tox;
+ cury = relative ? cury + toy : toy;
+ }
+ else
+ svgCurveToQuadratic( x1, y1, tox, toy, !relative );
+ break;
+ }
+ case 't':
+ relative = true;
+ case 'T':
+ {
+ ptr = getCoord(ptr, tox);
+ ptr = getCoord(ptr, toy);
+
+ if( process )
+ {
+ xc = 2 * curx - contrlx;
+ yc = 2 * cury - contrly;
+
+ px1 = (curx + 2 * xc) * (1.0 / 3.0);
+ py1 = (cury + 2 * yc) * (1.0 / 3.0);
+ px2 = relative ? ((curx + tox) + 2 * xc) * (1.0 / 3.0) : (tox + 2 * xc) * (1.0 / 3.0);
+ py2 = relative ? ((cury + toy) + 2 * yc) * (1.0 / 3.0) : (toy + 2 * yc) * (1.0 / 3.0);
+ px3 = relative ? curx + tox : tox;
+ py3 = relative ? cury + toy : toy;
+
+ svgCurveToCubic( px1, py1, px2, py2, px3, py3 );
+
+ contrlx = xc;
+ contrly = yc;
+ curx = relative ? curx + tox : tox;
+ cury = relative ? cury + toy : toy;
+ }
+ else
+ svgCurveToQuadraticSmooth( tox, toy, !relative );
+ break;
+ }
+ case 'a':
+ relative = true;
+ case 'A':
+ {
+ bool largeArc, sweep;
+ double angle, rx, ry;
+ ptr = getCoord( ptr, rx );
+ ptr = getCoord( ptr, ry );
+ ptr = getCoord( ptr, angle );
+ ptr = getCoord( ptr, tox );
+ largeArc = tox == 1;
+ ptr = getCoord( ptr, tox );
+ sweep = tox == 1;
+ ptr = getCoord( ptr, tox );
+ ptr = getCoord( ptr, toy );
+
+ // Spec: radii are nonnegative numbers
+ rx = fabs(rx);
+ ry = fabs(ry);
+
+ if( process )
+ calculateArc( relative, curx, cury, angle, tox, toy, rx, ry, largeArc, sweep );
+ else
+ svgArcTo( tox, toy, rx, ry, angle, largeArc, sweep, !relative );
+ }
+ }
+
+ lastCommand = command;
+
+ if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9'))
+ {
+ // there are still coords in this command
+ if(command == 'M')
+ command = 'L';
+ else if(command == 'm')
+ command = 'l';
+ }
+ else
+ command = *(ptr++);
+
+ if( lastCommand != 'C' && lastCommand != 'c' &&
+ lastCommand != 'S' && lastCommand != 's' &&
+ lastCommand != 'Q' && lastCommand != 'q' &&
+ lastCommand != 'T' && lastCommand != 't')
+ {
+ contrlx = curx;
+ contrly = cury;
+ }
+ }
+ }
+}
+
+// This works by converting the SVG arc to "simple" beziers.
+// For each bezier found a svgToCurve call is done.
+// Adapted from Niko's code in kdelibs/kdecore/svgicons.
+// Maybe this can serve in some shared lib? (Rob)
+void
+SVGPathParser::calculateArc(bool relative, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
+{
+ double sin_th, cos_th;
+ double a00, a01, a10, a11;
+ double x0, y0, x1, y1, xc, yc;
+ double d, sfactor, sfactor_sq;
+ double th0, th1, th_arc;
+ int i, n_segs;
+
+ sin_th = sin(angle * (M_PI / 180.0));
+ cos_th = cos(angle * (M_PI / 180.0));
+
+ double dx;
+
+ if(!relative)
+ dx = (curx - x) / 2.0;
+ else
+ dx = -x / 2.0;
+
+ double dy;
+
+ if(!relative)
+ dy = (cury - y) / 2.0;
+ else
+ dy = -y / 2.0;
+
+ double _x1 = cos_th * dx + sin_th * dy;
+ double _y1 = -sin_th * dx + cos_th * dy;
+ double Pr1 = r1 * r1;
+ double Pr2 = r2 * r2;
+ double Px = _x1 * _x1;
+ double Py = _y1 * _y1;
+
+ // Spec : check if radii are large enough
+ double check = Px / Pr1 + Py / Pr2;
+ if(check > 1)
+ {
+ r1 = r1 * sqrt(check);
+ r2 = r2 * sqrt(check);
+ }
+
+ a00 = cos_th / r1;
+ a01 = sin_th / r1;
+ a10 = -sin_th / r2;
+ a11 = cos_th / r2;
+
+ x0 = a00 * curx + a01 * cury;
+ y0 = a10 * curx + a11 * cury;
+
+ if(!relative)
+ x1 = a00 * x + a01 * y;
+ else
+ x1 = a00 * (curx + x) + a01 * (cury + y);
+
+ if(!relative)
+ y1 = a10 * x + a11 * y;
+ else
+ y1 = a10 * (curx + x) + a11 * (cury + y);
+
+ /* (x0, y0) is current point in transformed coordinate space.
+ (x1, y1) is new point in transformed coordinate space.
+
+ The arc fits a unit-radius circle in this space.
+ */
+
+ d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
+
+ sfactor_sq = 1.0 / d - 0.25;
+
+ if(sfactor_sq < 0)
+ sfactor_sq = 0;
+
+ sfactor = sqrt(sfactor_sq);
+
+ if(sweepFlag == largeArcFlag)
+ sfactor = -sfactor;
+
+ xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
+ yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
+
+ /* (xc, yc) is center of the circle. */
+ th0 = atan2(y0 - yc, x0 - xc);
+ th1 = atan2(y1 - yc, x1 - xc);
+
+ th_arc = th1 - th0;
+ if(th_arc < 0 && sweepFlag)
+ th_arc += 2 * M_PI;
+ else if(th_arc > 0 && !sweepFlag)
+ th_arc -= 2 * M_PI;
+
+ n_segs = (int) (int) ceil(fabs(th_arc / (M_PI * 0.5 + 0.001)));
+
+ for(i = 0; i < n_segs; i++)
+ {
+ {
+ double sin_th, cos_th;
+ double a00, a01, a10, a11;
+ double x1, y1, x2, y2, x3, y3;
+ double t;
+ double th_half;
+
+ double _th0 = th0 + i * th_arc / n_segs;
+ double _th1 = th0 + (i + 1) * th_arc / n_segs;
+
+ sin_th = sin(angle * (M_PI / 180.0));
+ cos_th = cos(angle * (M_PI / 180.0));
+
+ /* inverse transform compared with rsvg_path_arc */
+ a00 = cos_th * r1;
+ a01 = -sin_th * r2;
+ a10 = sin_th * r1;
+ a11 = cos_th * r2;
+
+ th_half = 0.5 * (_th1 - _th0);
+ t = (8.0 / 3.0) * sin(th_half * 0.5) * sin(th_half * 0.5) / sin(th_half);
+ x1 = xc + cos(_th0) - t * sin(_th0);
+ y1 = yc + sin(_th0) + t * cos(_th0);
+ x3 = xc + cos(_th1);
+ y3 = yc + sin(_th1);
+ x2 = x3 + t * sin(_th1);
+ y2 = y3 - t * cos(_th1);
+
+ svgCurveToCubic( a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3 );
+ }
+ }
+
+ if(!relative)
+ curx = x;
+ else
+ curx += x;
+
+ if(!relative)
+ cury = y;
+ else
+ cury += y;
+}
+
+void
+SVGPathParser::svgLineToHorizontal( double, bool )
+{
+}
+
+void
+SVGPathParser::svgLineToVertical( double, bool )
+{
+}
+
+void
+SVGPathParser::svgCurveToCubicSmooth( double, double, double, double, bool )
+{
+}
+
+void
+SVGPathParser::svgCurveToQuadratic( double, double, double, double, bool )
+{
+}
+
+void
+SVGPathParser::svgCurveToQuadraticSmooth( double, double, bool )
+{
+}
+
+void
+SVGPathParser::svgArcTo( double, double, double, double, double, bool, bool, bool )
+{
+}
diff --git a/ksvg/impl/svgpathparser.h b/ksvg/impl/svgpathparser.h
new file mode 100644
index 00000000..3a9495d0
--- /dev/null
+++ b/ksvg/impl/svgpathparser.h
@@ -0,0 +1,63 @@
+/* This file is part of the KDE project
+ Copyright (C) 2002, 2003 The Karbon Developers
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef __SVGPATHPARSER_H__
+#define __SVGPATHPARSER_H__
+
+class QString;
+
+namespace KSVG
+{
+ const char *getNumber( const char *, double & );
+}
+
+/**
+ * Parser for svg path data, contained in the d attribute.
+ *
+ * The parser delivers encountered commands and parameters by calling
+ * methods that correspond to those commands. Clients have to derive
+ * from this class and implement the abstract command methods.
+ *
+ * There are two operating modes. By default the parser just delivers unaltered
+ * svg path data commands and parameters. In the second mode, it will convert all
+ * relative coordinates to absolute ones, and convert all curves to cubic beziers.
+ */
+class SVGPathParser
+{
+public:
+ void parseSVG( const QString &d, bool process = false );
+
+ static const char *getCoord( const char *, double & );
+
+protected:
+ virtual void svgMoveTo( double x1, double y1, bool closed, bool abs = true ) = 0;
+ virtual void svgLineTo( double x1, double y1, bool abs = true ) = 0;
+ virtual void svgLineToHorizontal( double x, bool abs = true );
+ virtual void svgLineToVertical( double y, bool abs = true );
+ virtual void svgCurveToCubic( double x1, double y1, double x2, double y2, double x, double y, bool abs = true ) = 0;
+ virtual void svgCurveToCubicSmooth( double x, double y, double x2, double y2, bool abs = true );
+ virtual void svgCurveToQuadratic( double x, double y, double x1, double y1, bool abs = true );
+ virtual void svgCurveToQuadraticSmooth( double x, double y, bool abs = true );
+ virtual void svgArcTo( double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs = true );
+ virtual void svgClosePath() = 0;
+private:
+ void calculateArc( bool relative, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag );
+};
+
+#endif
diff --git a/ksvg/plugin/Makefile.am b/ksvg/plugin/Makefile.am
new file mode 100644
index 00000000..73202df4
--- /dev/null
+++ b/ksvg/plugin/Makefile.am
@@ -0,0 +1,29 @@
+SUBDIRS = backends .
+
+INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+METASOURCES = AUTO
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+
+kde_module_LTLIBRARIES = libksvgplugin.la svgthumbnail.la
+
+libksvgplugin_la_SOURCES = ksvg_plugin.cpp ksvg_factory.cpp ksvg_widget.cpp
+libksvgplugin_la_LIBADD = ../libksvg.la
+libksvgplugin_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+
+ksvginclude_HEADERS = ksvg_plugin.h
+ksvgincludedir = $(includedir)/ksvg
+
+kde_services_DATA = ksvgplugin.desktop
+
+svgthumbnail_la_SOURCES = svgcreator.cpp
+svgthumbnail_la_LIBADD = ../libksvg.la
+svgthumbnail_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+
+services_DATA = svgthumbnail.desktop
+servicesdir = $(kde_servicesdir)
+
+partdir = $(kde_datadir)/ksvg
+part_DATA = ksvgplugin.rc
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/ksvgplugin.pot
diff --git a/ksvg/plugin/backends/Makefile.am b/ksvg/plugin/backends/Makefile.am
new file mode 100644
index 00000000..eb3c3089
--- /dev/null
+++ b/ksvg/plugin/backends/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = libart #agg
diff --git a/ksvg/plugin/backends/agg/AggCanvas.cpp b/ksvg/plugin/backends/agg/AggCanvas.cpp
new file mode 100644
index 00000000..245d36e1
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvas.cpp
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "AggCanvas.h"
+#include "SVGShapeImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGPaint.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGLinearGradientElementImpl.h"
+#include "SVGRadialGradientElementImpl.h"
+#include "SVGPatternElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include <kdebug.h>
+
+#include "AggCanvasItems.h"
+#include "GlyphTracerAgg.h"
+
+#include "agg_vertex_iterator.h"
+#include "agg_bounding_rect.h"
+
+using namespace KSVG;
+
+AggCanvas::AggCanvas(unsigned int width, unsigned int height) : KSVGCanvas(width, height)
+{
+ m_fontContext = new T2P::Converter(new T2P::GlyphTracerAgg());
+}
+
+void AggCanvas::setRenderBufferSize(int w, int h)
+{
+ KSVGCanvas::setRenderBufferSize(w, h);
+ m_buf.attach(m_buffer, m_width, m_height, m_width * m_nrChannels);
+}
+
+void AggCanvas::setBuffer(unsigned char *buffer)
+{
+ KSVGCanvas::setBuffer(buffer);
+ m_buf.attach(m_buffer, m_width, m_height, m_width * m_nrChannels);
+}
+
+T2P::BezierPath *AggCanvas::toBezierPath(CanvasItem *item) const
+{
+ // Only handle AggPath items
+ return dynamic_cast<AggPath *>(item);
+}
+
+// drawing primitives
+CanvasItem *AggCanvas::createRectangle(SVGRectElementImpl *rect)
+{
+ return new AggRectangle(this, rect);
+}
+
+CanvasItem *AggCanvas::createEllipse(SVGEllipseElementImpl *ellipse)
+{
+ return new AggEllipse(this, ellipse);
+}
+
+CanvasItem *AggCanvas::createCircle(SVGCircleElementImpl *circle)
+{
+ return new AggCircle(this, circle);
+}
+
+CanvasItem *AggCanvas::createLine(SVGLineElementImpl *line)
+{
+ return new AggLine(this, line);
+}
+
+CanvasItem *AggCanvas::createPolyline(SVGPolylineElementImpl *poly)
+{
+ return new AggPolyline(this, poly);
+}
+
+CanvasItem *AggCanvas::createPolygon(SVGPolygonElementImpl *poly)
+{
+ return new AggPolygon(this, poly);
+}
+
+CanvasItem *AggCanvas::createPath(SVGPathElementImpl *path)
+{
+ return new AggPath(this, path);
+}
+
+CanvasItem *AggCanvas::createClipPath(SVGClipPathElementImpl *)
+{
+ return 0;
+}
+
+CanvasItem *AggCanvas::createImage(SVGImageElementImpl *image)
+{
+ return new AggImage(this, image);
+}
+
+CanvasItem *AggCanvas::createCanvasMarker(SVGMarkerElementImpl *marker)
+{
+ return new AggMarker(this, marker);
+}
+
+CanvasItem *AggCanvas::createText(SVGTextElementImpl *text)
+{
+ return new AggText(this, text);
+}
+
+CanvasPaintServer *AggCanvas::createPaintServer(SVGElementImpl *pserver)
+{
+ AggPaintServer *result = 0;
+ if(dynamic_cast<SVGLinearGradientElementImpl *>(pserver))
+ result = new AggLinearGradient(dynamic_cast<SVGLinearGradientElementImpl *>(pserver));
+ else if(dynamic_cast<SVGRadialGradientElementImpl *>(pserver))
+ result = new AggRadialGradient(dynamic_cast<SVGRadialGradientElementImpl *>(pserver));
+ else if(dynamic_cast<SVGPatternElementImpl *>(pserver))
+ result = new AggPattern(dynamic_cast<SVGPatternElementImpl *>(pserver));
+ return result;
+}
+
diff --git a/ksvg/plugin/backends/agg/AggCanvas.h b/ksvg/plugin/backends/agg/AggCanvas.h
new file mode 100644
index 00000000..9df7a826
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvas.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef AGGCANVAS_H
+#define AGGCANVAS_H
+
+#include "KSVGCanvas.h"
+
+#include "agg_basics.h"
+#include "agg_rendering_buffer.h"
+#include "agg_path_storage.h"
+#include "agg_rasterizer_scanline_aa.h"
+#include "agg_scanline_u.h"
+#include "agg_renderer_scanline.h"
+#include "agg_pixfmt_rgb24.h"
+
+namespace KSVG
+{
+
+class AggPaintServer;
+class SVGElementImpl;
+class AggCanvas : public KSVGCanvas
+{
+public:
+ AggCanvas(unsigned int width, unsigned int height);
+
+ virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const;
+
+ // creating canvas items
+ virtual CanvasItem *createRectangle(SVGRectElementImpl *rect);
+ virtual CanvasItem *createEllipse(SVGEllipseElementImpl *ellipse);
+ virtual CanvasItem *createCircle(SVGCircleElementImpl *circle);
+ virtual CanvasItem *createLine(SVGLineElementImpl *line);
+ virtual CanvasItem *createPolyline(SVGPolylineElementImpl *poly);
+ virtual CanvasItem *createPolygon(SVGPolygonElementImpl *poly);
+ virtual CanvasItem *createPath(SVGPathElementImpl *path);
+ virtual CanvasItem *createClipPath(SVGClipPathElementImpl *clippath);
+ virtual CanvasItem *createImage(SVGImageElementImpl *image);
+ virtual CanvasItem *createCanvasMarker(SVGMarkerElementImpl *marker);
+ virtual CanvasItem *createText(SVGTextElementImpl *text);
+ virtual CanvasPaintServer *createPaintServer(SVGElementImpl *pserver);
+
+ virtual void setRenderBufferSize(int w, int h);
+
+ agg::rendering_buffer &buf() { return m_buf; }
+
+ float zoom() const { return m_zoom; }
+
+ agg::rasterizer_scanline_aa<> m_ras;
+
+protected:
+ virtual void setBuffer(unsigned char *buffer);
+
+protected:
+ agg::rendering_buffer m_buf;
+};
+
+};
+
+#endif
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.cpp b/ksvg/plugin/backends/agg/AggCanvasFactory.cpp
new file mode 100644
index 00000000..439623ad
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvasFactory.cpp
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "AggCanvas.h"
+#include "AggCanvasFactory.h"
+
+using namespace KSVG;
+
+K_EXPORT_COMPONENT_FACTORY(libksvgrendereragg, AggCanvasFactory)
+
+AggCanvasFactory::AggCanvasFactory()
+{
+}
+
+AggCanvasFactory::~AggCanvasFactory()
+{
+}
+
+QObject *AggCanvasFactory::createObject(QObject *, const char *, const char *, const QStringList &args)
+{
+ unsigned int width = (*args.at(1)).toUInt();
+ unsigned int height = (*args.at(0)).toUInt();
+ return new AggCanvas(width, height);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.h b/ksvg/plugin/backends/agg/AggCanvasFactory.h
new file mode 100644
index 00000000..9fb3ffbf
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvasFactory.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef AGGCANVASFACTORY_H
+#define AGGCANVASFACTORY_H
+
+#include <klibloader.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+namespace KSVG
+{
+
+class AggCanvasFactory : public KLibFactory
+{
+public:
+ AggCanvasFactory();
+ virtual ~AggCanvasFactory();
+
+ virtual QObject *createObject(QObject *parent = 0, const char *pname = 0, const char *name = "QObject", const QStringList &args = QStringList());
+};
+
+};
+
+#endif
+
+/// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.cpp b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
new file mode 100644
index 00000000..4ceb6109
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
@@ -0,0 +1,1747 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <qimage.h>
+
+#include "SVGPaint.h"
+#include "SVGRectImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGMatrixImpl.h"
+#include "SVGUnitTypes.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGPointListImpl.h"
+#include "SVGMarkerElement.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPathSegListImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGAnimatedAngleImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGPolygonElementImpl.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGPolylineElementImpl.h"
+#include "SVGStopElementImpl.h"
+#include "SVGGradientElement.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGLinearGradientElementImpl.h"
+#include "SVGRadialGradientElementImpl.h"
+#include "SVGPatternElementImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGUnitConverter.h"
+
+#include "Glyph.h"
+#include "Converter.h"
+#include "KSVGTextChunk.h"
+
+#include "agg_rasterizer_scanline_aa.h"
+#include "agg_scanline_u.h"
+#include "agg_scanline_p.h"
+#include "agg_bounding_rect.h"
+#include "agg_ellipse.h"
+#include "agg_span_image_filter_rgba32.h"
+#include "agg_color_rgba8.h"
+#include "agg_gray8.h"
+#include "agg_span_gradient.h"
+#include "agg_span_interpolator_linear.h"
+#include "agg_span_pattern_rgba32.h"
+#include "agg_renderer_scanline.h"
+
+#include "AggCanvas.h"
+#include "AggCanvasItems.h"
+
+extern "C"
+{
+/* These are in KSVGHelper.cpp */
+int linearRGBFromsRGB(int sRGB8bit);
+int sRGBFromLinearRGB(int linearRGB8bit);
+}
+
+struct color_function_profile
+{
+ color_function_profile() {}
+ color_function_profile(const agg::rgba8 *colors) :
+ m_colors(colors) {}
+
+ const agg::rgba8& operator [] (unsigned v) const
+ {
+ return m_colors[v];
+ }
+
+ const agg::rgba8 *m_colors;
+};
+
+using namespace KSVG;
+
+// agg2 helpers
+
+agg::vcgen_stroke::line_cap_e toAggLineCap(PathStrokeCapType cap)
+{
+ if(cap == PATH_STROKE_CAP_BUTT)
+ return agg::vcgen_stroke::butt_cap;
+ else if(cap == PATH_STROKE_CAP_ROUND)
+ return agg::vcgen_stroke::round_cap;
+ else
+ return agg::vcgen_stroke::square_cap;
+}
+
+template<class Source>
+stroke<Source>::stroke(Source& src, KSVG::SVGStylableImpl *style) : m_s(src)
+{
+ m_s.width(style->getStrokeWidth()->baseVal()->value());
+ m_s.line_join((agg::vcgen_stroke::line_join_e)style->getJoinStyle());
+ m_s.miter_limit(style->getStrokeMiterlimit());
+ m_s.line_cap(toAggLineCap(style->getCapStyle()));
+}
+
+template<class Source>
+dash_stroke<Source>::dash_stroke(Source& src, KSVG::SVGStylableImpl *style) : m_d(src), m_ds(m_d)
+{
+ unsigned int dashLength = style->getDashArray() ? style->getDashArray()->baseVal()->numberOfItems() : 0;
+ // there are dashes to be rendered
+ unsigned int count = (dashLength % 2) == 0 ? dashLength : dashLength * 2;
+ for(unsigned int i = 0; i < count; i += 2)
+ m_d.add_dash(style->getDashArray()->baseVal()->getItem(i % dashLength)->value(),
+ style->getDashArray()->baseVal()->getItem((i + 1) % dashLength)->value());
+ m_d.dash_start(style->getDashOffset()->baseVal()->value());
+ m_ds.width(style->getStrokeWidth()->baseVal()->value());
+ m_ds.line_join((agg::vcgen_stroke::line_join_e)style->getJoinStyle());
+ m_ds.miter_limit(style->getStrokeMiterlimit());
+ m_ds.line_cap(toAggLineCap(style->getCapStyle()));
+}
+
+template<class Source>
+dash_stroke_simple<Source>::dash_stroke_simple(Source& src, KSVG::SVGStylableImpl *style)
+{
+ //if(style->isStroked() && style->getStrokeWidth()->baseVal()->value() > 0)
+ //{
+ unsigned int dashLength = style->getDashArray() ? style->getDashArray()->baseVal()->numberOfItems() : 0;
+ if(dashLength > 0)
+ impl = new dash_stroke<Source>(src, style);
+ else
+ impl = new stroke<Source>(src, style);
+ //}
+ //else
+ //impl = 0;
+}
+
+void renderPathSolid(AggCanvas *canvas, const agg::rgba8 &color)
+{
+ agg::scanline_p8 sl;
+ if(canvas->nrChannels() == 3)
+ {
+ typedef agg::pixfmt_rgb24 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_p_solid<renderer_base> renderer_solid;
+
+ pixfmt pixf(canvas->buf());
+ renderer_base rb(pixf);
+ renderer_solid ren(rb);
+
+ ren.color(color);
+ canvas->m_ras.render(sl, ren);
+ }
+ else
+ {
+ typedef agg::pixfmt_rgba32 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_p_solid<renderer_base> renderer_solid;
+
+ pixfmt pixf(canvas->buf());
+ renderer_base rb(pixf);
+ renderer_solid ren(rb);
+
+ ren.color(color);
+ canvas->m_ras.render(sl, ren);
+ }
+}
+
+// #####
+
+BezierPathAggStroked::BezierPathAggStroked(SVGStylableImpl *style)
+: T2P::BezierPathAgg(), m_curved_trans_clipped(m_curved_trans), m_curved_stroked(m_curved, style), m_curved_stroked_trans(m_curved_stroked, m_transform), m_curved_stroked_trans_clipped(m_curved_stroked_trans), m_style(style)
+{
+}
+
+BezierPathAggStroked::BezierPathAggStroked(const T2P::BezierPathAgg &other, SVGStylableImpl *style)
+: T2P::BezierPathAgg(other), m_curved_trans_clipped(m_curved_trans), m_curved_stroked(m_curved, style), m_curved_stroked_trans(m_curved_stroked, m_transform), m_curved_stroked_trans_clipped(m_curved_stroked_trans), m_style(style)
+{
+}
+
+AggShape::AggShape(AggCanvas *c, SVGStylableImpl *style) : CanvasItem(), BezierPathAggStroked(style), m_canvas(c)
+{
+ m_context = NORMAL;
+ m_fillPainter = 0;
+ m_strokePainter = 0;
+}
+
+AggShape::~AggShape()
+{
+ freeSVPs();
+ delete m_fillPainter;
+ delete m_strokePainter;
+}
+
+QRect AggShape::bbox() const
+{
+ return m_bbox;
+}
+
+bool AggShape::fillContains(const QPoint &p)
+{
+ agg::rasterizer_scanline_aa<> ras;
+ ras.filling_rule(m_style->getFillRule() == RULE_EVENODD ? agg::fill_even_odd : agg::fill_non_zero);
+ ras.add_path(m_curved_trans);
+ bool b = ras.hit_test(p.x(), p.y());
+ return b;
+}
+
+bool AggShape::strokeContains(const QPoint &p)
+{
+ agg::rasterizer_scanline_aa<> ras;
+ ras.add_path(m_curved_stroked_trans);
+ bool b = ras.hit_test(p.x(), p.y());
+ return b;
+}
+
+void AggShape::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(reason == UPDATE_STYLE)
+ {
+ if(!m_fillPainter || !m_strokePainter)
+ AggShape::init();
+ if(m_fillPainter)
+ m_fillPainter->update(m_style);
+ if(m_strokePainter)
+ m_strokePainter->update(m_style);
+ m_canvas->invalidate(this, false);
+ }
+ else if(reason == UPDATE_TRANSFORM)
+ {
+ freeSVPs();
+ init();
+ m_canvas->invalidate(this, true);
+ }
+ else if(reason == UPDATE_ZOOM)
+ init();
+ else if(reason == UPDATE_PAN)
+ {
+ agg::trans_affine mtx(1, 0, 0, 1, param1, param2);
+ m_transform *= mtx;
+ }
+ else if(reason == UPDATE_LINEWIDTH)
+ {
+ init();
+ m_canvas->invalidate(this, true);
+ }
+}
+
+void AggShape::draw(SVGShapeImpl *shape)
+{
+ if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
+ return;
+
+ //if(!m_strokeSVP && (!m_fillSVP || !m_style->isFilled()))
+ // init();
+ agg::rect cb;
+ if(m_canvas->nrChannels() == 3)
+ {
+ agg::pixfmt_rgb24 pixf(m_canvas->buf());
+ agg::renderer_base<agg::pixfmt_rgb24> rb(pixf);
+ cb = rb.clip_box();
+ }
+ else
+ {
+ agg::pixfmt_rgba32 pixf(m_canvas->buf());
+ agg::renderer_base<agg::pixfmt_rgba32> rb(pixf);
+ cb = rb.clip_box();
+ }
+
+ m_curved_trans_clipped.clip_box(cb.x1, cb.y1, cb.x2 + 1, cb.y2 + 1);
+ m_curved_stroked_trans_clipped.clip_box(cb.x1, cb.y1, cb.x2 + 1, cb.y2 + 1);
+
+ double x1, y1, x2, y2;
+ agg::bounding_rect(m_curved_trans, *this, 0, 1, &x1, &y1, &x2, &y2);
+ m_bbox = QRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
+
+ m_curved.approximation_scale(pow(m_transform.scale(), 0.75));
+
+ if(m_fillPainter)
+ m_fillPainter->draw(m_canvas, m_curved_trans, m_style, shape);
+ if(m_strokePainter)
+ m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, shape);
+}
+
+bool AggShape::isVisible(SVGShapeImpl *shape)
+{
+ return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
+}
+
+void AggShape::calcSVPs(const SVGMatrixImpl *matrix)
+{
+ // transform
+ m_transform = agg::trans_affine(matrix->a(), matrix->b(), matrix->c(), matrix->d(), matrix->e(), matrix->f());
+
+ double x1, y1, x2, y2;
+ agg::bounding_rect(m_curved_trans, *this, 0, 1, &x1, &y1, &x2, &y2);
+ m_bbox = QRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
+}
+
+void AggShape::init(const SVGMatrixImpl *)
+{
+}
+
+void AggShape::init()
+{
+ if(m_style->isFilled())
+ {
+ if(m_fillPainter == 0)
+ m_fillPainter = new AggFillPaintServer(m_style);
+ }
+ else
+ {
+ delete m_fillPainter;
+ m_fillPainter = 0;
+ }
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(m_style->isStroked() && m_style->getStrokeWidth()->baseVal()->value() > 0)
+ {
+ if(m_strokePainter == 0)
+ m_strokePainter = new AggStrokePaintServer(m_style);
+ }
+ else
+ {
+ delete m_strokePainter;
+ m_strokePainter = 0;
+ }
+}
+
+void AggShape::freeSVPs()
+{
+ m_storage.remove_all();
+}
+
+// #####
+
+AggStrokePaintServer::AggStrokePaintServer(SVGStylableImpl *style)
+{
+ update(style);
+}
+
+void AggStrokePaintServer::update(SVGStylableImpl *style)
+{
+ if(style->getStrokeColor()->paintType() != SVG_PAINTTYPE_URI)
+ {
+ QColor qcolor;
+ if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
+ qcolor = style->getColor()->rgbColor().color();
+ else
+ qcolor = style->getStrokeColor()->rgbColor().color();
+
+ short opacity = static_cast<short>(style->getStrokeOpacity() * style->getOpacity() * 255);
+
+ // Spec: clamping
+ opacity = opacity < 0 ? 0 : opacity;
+ opacity = opacity > 255 ? 255 : opacity;
+
+ m_color = agg::rgba8(qcolor.red(), qcolor.green(), qcolor.blue());
+ m_color.opacity(style->getStrokeOpacity() * style->getOpacity());
+ }
+}
+
+template<class VertexSource>
+void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
+{
+ canvas->m_ras.reset();
+ if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI)
+ {
+ AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getStrokeColor()->uri().string()));
+ if(!pserver) return;
+ pserver->setBBoxTarget(shape);
+
+ // TODO : Clipping
+ if(!pserver->finalized())
+ pserver->finalizePaintServer();
+ canvas->m_ras.add_path(vs);
+ pserver->render(canvas);
+ }
+ else
+ {
+ canvas->m_ras.add_path(vs);
+ renderPathSolid(canvas, m_color);
+ }
+}
+
+AggFillPaintServer::AggFillPaintServer(SVGStylableImpl *style)
+{
+ update(style);
+}
+
+void AggFillPaintServer::update(SVGStylableImpl *style)
+{
+ if(style->getFillColor()->paintType() != SVG_PAINTTYPE_URI)
+ {
+ QColor qcolor;
+ if(style->getFillColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
+ qcolor = style->getColor()->rgbColor().color();
+ else
+ qcolor = style->getFillColor()->rgbColor().color();
+
+ short opacity = static_cast<short>(style->getFillOpacity() * style->getOpacity() * 255);
+
+ // Spec: clamping
+ opacity = opacity < 0 ? 0 : opacity;
+ opacity = opacity > 255 ? 255 : opacity;
+
+ m_color = agg::rgba8(qcolor.red(), qcolor.green(), qcolor.blue());
+ m_color.opacity(style->getFillOpacity() * style->getOpacity());
+ }
+}
+
+template<class VertexSource>
+void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
+{
+ canvas->m_ras.reset();
+ if(style->getFillColor()->paintType() == SVG_PAINTTYPE_URI)
+ {
+ AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getFillColor()->uri().string()));
+ if(!pserver) return;
+ pserver->setBBoxTarget(shape);
+
+ // TODO : Clipping
+ if(!pserver->finalized())
+ pserver->finalizePaintServer();
+ canvas->m_ras.add_path(vs);
+ pserver->render(canvas);
+ }
+ else
+ {
+ canvas->m_ras.filling_rule(style->getFillRule() == RULE_EVENODD ? agg::fill_even_odd : agg::fill_non_zero);
+ canvas->m_ras.add_path(vs);
+ renderPathSolid(canvas, m_color);
+ }
+}
+
+// #####
+
+AggRectangle::AggRectangle(AggCanvas *c, SVGRectElementImpl *rect)
+: AggShape(c, rect), m_rect(rect)
+{
+ init();
+}
+
+void AggRectangle::draw()
+{
+ if(isVisible())
+ AggShape::draw(m_rect);
+}
+
+bool AggRectangle::isVisible()
+{
+ // Spec: a value of zero disables rendering
+ return AggShape::isVisible(m_rect) && m_rect->width()->baseVal()->value() > 0 && m_rect->height()->baseVal()->value() > 0;
+}
+
+void AggRectangle::init()
+{
+ init(m_rect->screenCTM());
+}
+
+void AggRectangle::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ double x = m_rect->x()->baseVal()->value();
+ double y = m_rect->y()->baseVal()->value();
+ double width = m_rect->width()->baseVal()->value();
+ double height = m_rect->height()->baseVal()->value();
+ double rx = m_rect->rx()->baseVal()->value();
+ double ry = m_rect->ry()->baseVal()->value();
+
+ // Spec: If there is no rx or ry specified, draw a normal rect
+ if(rx == -1 && ry == -1)
+ {
+ m_storage.move_to(x, y);
+ m_storage.line_to(x + width, y);
+ m_storage.line_to(x + width, y + height);
+ m_storage.line_to(x, y + height);
+ }
+ else
+ {
+ int i = 0;
+
+ // Spec: If rx isn't specified, but ry, set rx to ry
+ if(rx == -1)
+ rx = ry;
+
+ // Spec: If ry isn't specified, but rx, set ry to rx
+ if(ry == -1)
+ ry = rx;
+
+ // Spec: If rx is greater than half of the width of the rectangle
+ // then set rx to half of the width
+ if(rx > width / 2)
+ rx = width / 2;
+
+ // Spec: If ry is greater than half of the height of the rectangle
+ // then set ry to half of the height
+ if(ry > height / 2)
+ ry = height / 2;
+
+ m_storage.move_to(x + rx, y);
+
+ i++;
+ m_storage.curve4(x + rx * (1 - 0.552), y, x, y + ry * (1 - 0.552), x, y + ry);
+ i++;
+ if(ry < height / 2)
+ {
+ m_storage.line_to(x, y + height - ry);
+ i++;
+ }
+ m_storage.curve4(x, y + height - ry * (1 - 0.552), x + rx * (1 - 0.552), y + height, x + rx, y + height);
+ i++;
+ if(rx < width / 2)
+ {
+ m_storage.line_to(x + width - rx, y + height);
+ i++;
+ }
+ m_storage.curve4(x + width - rx * (1 - 0.552), y + height, x + width, y + height - ry * (1 - 0.552), x + width, y + height - ry);
+ i++;
+ if(ry < height / 2)
+ {
+ m_storage.line_to(x + width, y + ry);
+ i++;
+ }
+ m_storage.curve4(x + width, y + ry * (1 - 0.552), x + width - rx * (1 - 0.552), y, x + width - rx, y);
+ i++;
+ if(rx < width / 2)
+ {
+ m_storage.line_to(x + rx, y);
+ i++;
+ }
+ }
+ m_storage.close_polygon();
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(vec, m_rect, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+AggEllipse::AggEllipse(AggCanvas *c, SVGEllipseElementImpl *ellipse)
+: AggShape(c, ellipse), m_ellipse(ellipse)
+{
+ init();
+}
+
+void AggEllipse::draw()
+{
+ if(isVisible())
+ AggShape::draw(m_ellipse);
+}
+
+bool AggEllipse::isVisible()
+{
+ // Spec: dont render when rx and/or ry is zero
+ return AggShape::isVisible(m_ellipse) && m_ellipse->rx()->baseVal()->value() > 0 && m_ellipse->ry()->baseVal()->value() > 0;
+}
+
+void AggEllipse::init()
+{
+ init(m_ellipse->screenCTM());
+}
+
+void AggEllipse::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ double rx = m_ellipse->rx()->baseVal()->value();
+ double ry = m_ellipse->ry()->baseVal()->value();
+ double cx = m_ellipse->cx()->baseVal()->value();
+ double cy = m_ellipse->cy()->baseVal()->value();
+
+ agg::ellipse ell(cx, cy, rx, ry, 100);
+ ell.rewind(0);
+ double x, y;
+ unsigned int cmd;
+ while((cmd = ell.vertex(&x, &y)) != agg::path_cmd_stop)
+ m_storage.add_vertex(x, y, cmd);
+ m_storage.close_polygon();
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(vec2, m_ellipse, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+AggCircle::AggCircle(AggCanvas *c, SVGCircleElementImpl *circle)
+: AggShape(c, circle), m_circle(circle)
+{
+ init();
+}
+
+void AggCircle::draw()
+{
+ if(isVisible())
+ AggShape::draw(m_circle);
+}
+
+bool AggCircle::isVisible()
+{
+ // Spec: a value of zero disables rendering
+ return AggShape::isVisible(m_circle) && m_circle->r()->baseVal()->value() > 0;
+}
+
+void AggCircle::init()
+{
+ init(m_circle->screenCTM());
+}
+
+void AggCircle::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ double r = m_circle->r()->baseVal()->value();
+ double cx = m_circle->cx()->baseVal()->value();
+ double cy = m_circle->cy()->baseVal()->value();
+
+ agg::ellipse ell(cx, cy, r, r, 100);
+ ell.rewind(0);
+ double x, y;
+ unsigned int cmd;
+ while((cmd = ell.vertex(&x, &y)) != agg::path_cmd_stop)
+ m_storage.add_vertex(x, y, cmd);
+ m_storage.close_polygon();
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(vec2, m_ellipse, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+AggLine::AggLine(AggCanvas *c, SVGLineElementImpl *line)
+: AggShape(c, line), MarkerHelper(), m_line(line)
+{
+ init();
+}
+
+AggLine::~AggLine()
+{
+}
+
+void AggLine::draw()
+{
+ if(isVisible())
+ {
+ // transform ( zoom?)
+ //agg::trans_affine transform = m_transform;
+ //agg::trans_affine mtx(m_canvas->zoom(), 0, 0, m_canvas->zoom(), m_canvas->pan().x(), m_canvas->pan().y());
+ //m_transform *= mtx;
+ //m_curved.approximation_scale(pow(m_transform.scale(), 0.75));
+
+ if(m_style->isStroked())
+ {
+ m_canvas->m_ras.reset();
+ m_canvas->m_ras.add_path(m_curved_stroked_trans);
+ QColor qcolor;
+ if(m_style->getStrokeColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
+ qcolor = m_style->getColor()->rgbColor().color();
+ else
+ qcolor = m_style->getStrokeColor()->rgbColor().color();
+ agg::rgba8 color(qcolor.red(), qcolor.green(), qcolor.blue());
+ color.opacity(m_style->getStrokeOpacity() * m_style->getOpacity());
+ renderPathSolid(m_canvas, color);
+ }
+ //m_transform = transform;
+
+ if(m_line->hasMarkers())
+ {
+ double x1 = m_line->x1()->baseVal()->value();
+ double y1 = m_line->y1()->baseVal()->value();
+ double x2 = m_line->x2()->baseVal()->value();
+ double y2 = m_line->y2()->baseVal()->value();
+ double slope = SVGAngleImpl::todeg(atan2(y2 - y1, x2 - x1));
+
+ if(m_line->hasStartMarker())
+ doStartMarker(m_line, m_line, x1, y1, slope);
+ if(m_line->hasEndMarker())
+ doEndMarker(m_line, m_line, x2, y2, slope);
+ }
+ }
+}
+
+bool AggLine::isVisible()
+{
+ return AggShape::isVisible(m_line);
+}
+
+void AggLine::init()
+{
+ init(m_line->screenCTM());
+}
+
+void AggLine::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ m_storage.move_to(m_line->x1()->baseVal()->value(), m_line->y1()->baseVal()->value());
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ double x2 = m_line->x2()->baseVal()->value();
+ double y2 = m_line->y2()->baseVal()->value();
+ if(x2 == m_line->x1()->baseVal()->value() && y2 == m_line->y1()->baseVal()->value() && m_line->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ m_storage.line_to(x2 + .5, y2);
+ else
+ m_storage.line_to(x2, y2);
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(polyline, m_poly, screenCTM, &m_fillSVP);
+}
+
+// #####
+AggPoly::AggPoly(AggCanvas *c, SVGPolyElementImpl *poly)
+: AggShape(c, poly), MarkerHelper(), m_poly(poly)
+{
+}
+
+AggPoly::~AggPoly()
+{
+}
+
+void AggPoly::init()
+{
+ init(m_poly->screenCTM());
+}
+
+void AggPoly::draw()
+{
+ if(isVisible())
+ {
+ AggShape::draw(m_poly);
+
+ if(m_poly->hasMarkers())
+ m_poly->drawMarkers();
+ }
+}
+
+bool AggPoly::isVisible()
+{
+ return AggShape::isVisible(m_poly);
+}
+
+// #####
+AggPolyline::AggPolyline(AggCanvas *c, SVGPolylineElementImpl *poly)
+: AggPoly(c, poly)
+{
+ AggPoly::init();
+}
+
+AggPolyline::~AggPolyline()
+{
+}
+
+void AggPolyline::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ unsigned int numberOfPoints = m_poly->points()->numberOfItems();
+
+ if(numberOfPoints < 1)
+ return;
+
+ m_storage.move_to(m_poly->points()->getItem(0)->x(), m_poly->points()->getItem(0)->y());
+
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ if(numberOfPoints == 2)
+ {
+ double x1 = m_poly->points()->getItem(1)->x();
+ double y1 = m_poly->points()->getItem(1)->y();
+ if(x1 == m_poly->points()->getItem(0)->x() && y1 == m_poly->points()->getItem(0)->y() && m_poly->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ m_storage.line_to(m_poly->points()->getItem(1)->x() + .5, m_poly->points()->getItem(1)->y());
+ else
+ m_storage.line_to(m_poly->points()->getItem(1)->x(), m_poly->points()->getItem(1)->y());
+ }
+ else
+ {
+ unsigned int index;
+ for(index = 1; index < numberOfPoints; index++)
+ m_storage.line_to(m_poly->points()->getItem(index)->x(), m_poly->points()->getItem(index)->y());
+ }
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(polyline, m_poly, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+AggPolygon::AggPolygon(AggCanvas *c, SVGPolygonElementImpl *poly)
+: AggPoly(c, poly)
+{
+ AggPoly::init();
+}
+
+AggPolygon::~AggPolygon()
+{
+}
+
+void AggPolygon::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ int numberOfPoints = m_poly->points()->numberOfItems();
+
+ if(numberOfPoints < 1)
+ return;
+
+ m_storage.move_to(m_poly->points()->getItem(0)->x(), m_poly->points()->getItem(0)->y());
+
+ int index;
+ for(index = 1; index < numberOfPoints; index++)
+ m_storage.line_to(m_poly->points()->getItem(index)->x(), m_poly->points()->getItem(index)->y());
+
+ m_storage.line_to(m_poly->points()->getItem(0)->x(), m_poly->points()->getItem(0)->y());
+ m_storage.close_polygon();
+ }
+ //if(m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(polygon, m_poly, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+AggPath::AggPath(AggCanvas *c, SVGPathElementImpl *path)
+: AggShape(c, path), SVGPathParser(), MarkerHelper(), m_path(path)
+{
+ init();
+}
+
+AggPath::~AggPath()
+{
+}
+
+void AggPath::draw()
+{
+ AggShape::draw(m_path);
+
+ if(m_path->hasMarkers())
+ {
+ SVGPathElementImpl::MarkerData markers = m_path->markerData();
+ int numMarkers = markers.numMarkers();
+
+ if(m_path->hasStartMarker())
+ doStartMarker(m_path, m_path, markers.marker(0).x, markers.marker(0).y, markers.marker(0).angle);
+
+ for(int i = 1; i < numMarkers - 1; i++)
+ {
+ if(m_path->hasMidMarker())
+ doMidMarker(m_path, m_path, markers.marker(i).x, markers.marker(i).y, markers.marker(i).angle);
+ }
+
+ if(m_path->hasEndMarker())
+ doEndMarker(m_path, m_path, markers.marker(numMarkers - 1).x, markers.marker(numMarkers - 1).y, markers.marker(numMarkers - 1).angle);
+ }
+}
+
+bool AggPath::isVisible()
+{
+ return AggShape::isVisible(m_path);
+}
+
+void AggPath::init()
+{
+ init(m_path->screenCTM());
+}
+
+void AggPath::init(const SVGMatrixImpl *screenCTM)
+{
+ AggShape::init();
+ if(m_storage.total_vertices() == 0)
+ {
+ if(!m_path->getAttribute("d").string().isEmpty())
+ {
+ m_storage.start_new_path();
+ parseSVG(m_path->getAttribute("d").string(), true);
+
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ if(m_storage.total_vertices() == 2 && agg::is_line_to(m_storage.command(1)))
+ {
+ double x1, y1;
+ double x2, y2;
+ m_storage.vertex(0, &x1, &y1);
+ m_storage.vertex(1, &x2, &y2);
+ if(x1 == x2 && y1 == y2 && m_path->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ m_storage.modify_vertex(1, x2 + .5, y2);
+ }
+ // TODO : handle filled paths that are not closed explicitly
+ }
+ }
+
+ // There are pure-moveto paths which reference paint servers *bah*
+ // Do NOT render them
+ bool dontrender = m_storage.total_vertices() == 1 && agg::is_move_to((*m_storage.begin()).cmd);
+ if(!dontrender && m_context == NORMAL)
+ calcSVPs(screenCTM);
+ //else
+ // calcClipSVP(ksvg_art_bez_path_to_vec(m_array.data(), 0.25), m_path, screenCTM, &m_fillSVP);
+}
+
+void AggPath::svgMoveTo(double x1, double y1, bool, bool)
+{
+ m_storage.move_to(x1, y1);
+}
+
+void AggPath::svgLineTo(double x1, double y1, bool)
+{
+ m_storage.line_to(x1, y1);
+}
+
+void AggPath::svgCurveToCubic(double x1, double y1, double x2, double y2, double x3, double y3, bool)
+{
+ m_storage.curve4(x1, y1, x2, y2, x3, y3);
+}
+
+void AggPath::svgClosePath()
+{
+ m_storage.close_polygon();
+}
+
+// #####
+
+AggMarker::AggMarker(AggCanvas *c, SVGMarkerElementImpl *marker)
+: CanvasMarker(marker), m_canvas(c)//, m_clippingRectangle(0)
+{
+}
+
+AggMarker::~AggMarker()
+{
+ //if(m_clippingRectangle)
+ // art_svp_free(m_clippingRectangle);
+}
+
+void AggMarker::init()
+{
+}
+
+void AggMarker::draw()
+{
+}
+
+void AggMarker::draw(SVGShapeImpl * /*obj*/, int /*x*/, int /*y*/, float /*lwidth*/, double /*angle*/)
+{
+}
+
+// #####
+
+AggImage::AggImage(AggCanvas *c, SVGImageElementImpl *image)
+: m_canvas(c), m_image(image)
+{
+}
+
+AggImage::~AggImage()
+{
+}
+
+void AggImage::draw()
+{
+ if(isVisible())
+ {
+ //KSVGPolygon clippingPolygon = m_image->clippingShape();
+
+ QImage *img = m_image->image();
+ if(!img) return;
+ QImage image = m_image->scaledImage();
+ agg::rendering_buffer source_buffer;
+ source_buffer.attach(image.bits(), image.width(), image.height(), image.width() * 4);
+
+ typedef agg::pixfmt_rgb24 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+
+ pixfmt pixf(m_canvas->buf());
+ renderer_base rb(pixf);
+
+ typedef agg::span_interpolator_linear<> interpolator_type;
+ typedef agg::span_image_filter_rgba32_bilinear<agg::order_bgra32, interpolator_type> span_gen_type;
+ typedef agg::renderer_scanline_u<renderer_base, span_gen_type> renderer_type;
+ SVGMatrixImpl *ctm = m_image->scaledImageMatrix();
+ agg::trans_affine img_mtx(ctm->a(), ctm->b(), ctm->c(), ctm->d(), ctm->e(), ctm->f());
+ kdDebug() << "ctm->e() : " << ctm->e() << endl;
+ kdDebug() << "ctm->f() : " << ctm->f() << endl;
+ double x1 = 0;
+ double y1 = 0;
+ double x2 = image.width();
+ double y2 = image.height();
+ img_mtx.transform(&x1, &y1);
+ img_mtx.transform(&x2, &y2);
+ img_mtx.invert();
+
+ interpolator_type interpolator(img_mtx);
+ agg::span_allocator<agg::rgba8> sa;
+ span_gen_type sg(sa, source_buffer, agg::rgba(1, 1, 1, 0), interpolator);
+ renderer_type ri(rb, sg);
+
+ agg::scanline_u8 sl;
+
+ //rb.reset_clipping(true);
+ // Clip image against buffer
+ agg::path_storage viewp;
+ viewp.move_to(x1, y1);
+ viewp.line_to(x1, y2);
+ viewp.line_to(x2, y2);
+ viewp.line_to(x2, y1);
+ viewp.close_polygon();
+ m_canvas->m_ras.add_path(viewp);
+ m_canvas->m_ras.render(sl, ri);
+
+ ctm->deref();
+ }
+}
+
+bool AggImage::isVisible()
+{
+ return (m_referenced || (m_image->getVisible() && m_image->getDisplay() && m_image->directRender())) && m_image->image();
+}
+
+void AggImage::init()
+{
+}
+
+QRect AggImage::bbox() const
+{
+ QRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
+ static_cast<int>(m_image->y()->baseVal()->value()),
+ static_cast<int>(m_image->width()->baseVal()->value()),
+ static_cast<int>(m_image->height()->baseVal()->value()));
+
+
+ return SVGHelperImpl::fromUserspace(m_image, bbox);
+}
+
+// #####
+
+AggText::AggText(AggCanvas *c, SVGTextElementImpl *text)
+: CanvasText(text), m_canvas(c)
+{
+ init();
+ m_drawItems.setAutoDelete(true);
+}
+
+AggText::~AggText()
+{
+}
+
+bool AggText::fillContains(const QPoint &p)
+{
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *fill = it.current();
+ while(fill)
+ {
+ if(fill->svp)
+ {
+ agg::rasterizer_scanline_aa<> ras;
+ ras.filling_rule(fill->element->getFillRule() == RULE_EVENODD ? agg::fill_even_odd : agg::fill_non_zero);
+ ras.add_path(fill->svp->m_curved_trans);
+ if(ras.hit_test(p.x(), p.y()))
+ return true;
+ }
+
+ fill = ++it;
+ }
+
+ return false;
+}
+
+bool AggText::strokeContains(const QPoint &p)
+{
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *stroke = it.current();
+ while(stroke)
+ {
+ if(stroke->svp)
+ {
+ agg::rasterizer_scanline_aa<> ras;
+ ras.filling_rule(stroke->element->getFillRule() == RULE_EVENODD ? agg::fill_even_odd : agg::fill_non_zero);
+ ras.add_path(stroke->svp->m_curved_stroked_trans);
+ if(ras.hit_test(p.x(), p.y()))
+ return true;
+ }
+
+ stroke = ++it;
+ }
+
+ return false;
+}
+
+QRect AggText::bbox() const
+{
+ QRect result, rect;
+
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *elem = it.current();
+ while(elem)
+ {
+ double x1, y1, x2, y2;
+ if(elem && elem->svp)
+ {
+ if(agg::bounding_rect(elem->svp->m_curved_trans, *this, 0, 1, &x1, &y1, &x2, &y2))
+ {
+ rect.setX(int(x1));
+ rect.setY(int(y1));
+ rect.setWidth(int(x2 - x1));
+ rect.setHeight(int(y2 - y1));
+
+ result = result.unite(rect);
+ }
+ }
+ elem = ++it;
+ }
+ return result;
+}
+
+void AggText::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(reason == UPDATE_STYLE)
+ {
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *svpelement = it.current();
+ SVGTextContentElementImpl *text;
+ while(svpelement)
+ {
+ text = svpelement->element;
+ if(svpelement->fillPainter)
+ svpelement->fillPainter->update(text);
+ if(svpelement->strokePainter)
+ svpelement->strokePainter->update(text);
+
+ svpelement = ++it;
+ }
+ m_canvas->invalidate(this, false);
+ }
+ else if(reason == UPDATE_TRANSFORM)
+ {
+ clearCurved();
+ init();
+ m_canvas->invalidate(this, true);
+ }
+ else if(reason == UPDATE_ZOOM)
+ {
+ clearCurved();
+ init();
+ }
+ else if(reason == UPDATE_PAN)
+ {
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *svpelement = it.current();
+ T2P::BezierPathAgg *bpath;
+ while(svpelement)
+ {
+ bpath = svpelement->svp;
+ agg::trans_affine mtx(1, 0, 0, 1, param1, param2);
+ bpath->m_transform *= mtx;
+
+ svpelement = ++it;
+ }
+ }
+ /*
+ else if(reason == UPDATE_LINEWIDTH)
+ {
+ }*/
+}
+
+void AggText::draw()
+{
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *svpelement = it.current();
+ BezierPathAggStroked *bpath;
+ SVGTextContentElementImpl *text;
+
+ while(svpelement)
+ {
+ bpath = svpelement->svp;
+ text = svpelement->element;
+ if(!text->getVisible() || !text->getDisplay() || !text->directRender())
+ return;
+
+ bpath->m_curved.approximation_scale(pow(bpath->m_transform.scale(), 1.25));
+
+ if(svpelement->fillPainter)
+ svpelement->fillPainter->draw(m_canvas, bpath->m_curved_trans, text, text);
+ if(svpelement->strokePainter)
+ svpelement->strokePainter->draw(m_canvas, bpath->m_curved_stroked_trans, text, text);
+
+ svpelement = ++it;
+ }
+}
+
+bool AggText::isVisible()
+{
+ bool foundVisible = false;
+ QPtrListIterator<SVPElement> it(m_drawItems);
+
+ SVPElement *svpelement = it.current();
+ SVGTextContentElementImpl *text;
+
+ while(svpelement)
+ {
+ text = svpelement->element;
+ if(text->getVisible() && text->getDisplay() && text->directRender())
+ {
+ foundVisible = true;
+ break;
+ }
+
+ svpelement = ++it;
+ }
+
+ return foundVisible;
+}
+
+void AggText::init()
+{
+ init(m_text->screenCTM());
+}
+
+void AggText::renderCallback(SVGTextContentElementImpl *element, const SVGMatrixImpl *screenCTM, T2P::GlyphSet *glyph, T2P::GlyphLayoutParams *params, double anchor) const
+{
+ for(unsigned int i = 0; i < glyph->glyphCount(); i++)
+ {
+ T2P::GlyphAffinePair *glyphAffine = glyph->set().at(i);
+ T2P::BezierPathAgg *bpath = const_cast<T2P::BezierPathAgg *>(static_cast<const T2P::BezierPathAgg *>(glyphAffine->transformatedPath()));
+
+ // text-anchor/baseline-shift support
+ if(!params->tb())
+ bpath->m_transform = agg::trans_affine(screenCTM->a(), screenCTM->b(), screenCTM->c(), screenCTM->d(), screenCTM->e() - anchor * screenCTM->a(), screenCTM->f());
+ else
+ bpath->m_transform = agg::trans_affine(screenCTM->a(), screenCTM->b(), screenCTM->c(), screenCTM->d(), screenCTM->e(), screenCTM->f() - anchor * screenCTM->d());
+
+ SVPElement *svpelement = new SVPElement();
+ svpelement->svp = new BezierPathAggStroked(*bpath, element);
+ svpelement->element = element;
+
+ if(element->isFilled())
+ svpelement->fillPainter = new AggFillPaintServer(element);
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ svpelement->strokePainter = new AggStrokePaintServer(element);
+ m_drawItems.append(svpelement);
+ }
+}
+
+void AggText::init(const SVGMatrixImpl *screenCTM)
+{
+ int curx = 0, cury = 0, endx = 0, endy = 0;
+ KSVGTextChunk *textChunk = CanvasText::createTextChunk(m_canvas, screenCTM, curx, cury, endx, endy);
+
+ if(textChunk->count() > 0)
+ CanvasText::createGlyphs(textChunk, m_canvas, screenCTM, curx, cury, endx, endy);
+
+ delete textChunk;
+}
+
+void AggText::clearCurved()
+{
+ m_drawItems.clear();
+ // TODO: Huh - nobody does anything with the *trans* objects?:
+}
+
+void AggText::addTextDecoration(SVGTextContentElementImpl *element, double x, double y, double width, double height) const
+{
+ if(element->isFilled() || element->isStroked())
+ {
+ // compute rect
+ BezierPathAggStroked *bpath = new BezierPathAggStroked(element);
+ bpath->m_storage.move_to(x, y);
+ bpath->m_storage.line_to(x + width, y);
+ bpath->m_storage.line_to(x + width, y + height);
+ bpath->m_storage.line_to(x, y + height);
+
+ const SVGMatrixImpl *mat = m_text->screenCTM();
+ bpath->m_transform = agg::trans_affine(mat->a(), mat->b(), mat->c(), mat->d(), mat->e(), mat->f());
+
+ SVPElement *svpelement = new SVPElement();
+ svpelement->svp = bpath;
+ svpelement->element = element;
+
+ if(element->isFilled())
+ svpelement->fillPainter = new AggFillPaintServer(element);
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ svpelement->strokePainter = new AggStrokePaintServer(element);
+
+ m_drawItems.append(svpelement);
+ }
+}
+
+AggText::SVPElement::~SVPElement()
+{
+ delete svp;
+ delete fillPainter;
+ delete strokePainter;
+}
+
+// ###
+
+AggGradient::AggGradient(SVGGradientElementImpl *gradient) : m_gradient(gradient)
+{
+}
+
+void AggGradient::parseGradientStops(SVGGradientElementImpl *gradient)
+{
+ bool srgb = m_gradient->getColorInterpolation() == CI_SRGB;
+ int r = 0, g = 0, b = 0, a = 255, r1 = 0, g1 = 0, b1 = 0, a1 = 255;
+ unsigned int end = 255;
+ float oldOffset = -1, newOffset = -1;
+ for(DOM::Node node = gradient->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGStopElementImpl *elem = dynamic_cast<SVGStopElementImpl *>(gradient->ownerDoc()->getElementFromHandle(node.handle()));
+ if(node.nodeName() == "stop" && elem)
+ {
+ oldOffset = newOffset;
+ newOffset = elem->offset()->baseVal();
+
+ // Spec: skip double offset specifications
+ if(oldOffset == newOffset)
+ continue;
+
+ //offsets++;
+
+ // Get color
+ QColor qStopColor;
+
+ if(elem->getStopColor()->colorType() == SVG_COLORTYPE_CURRENTCOLOR)
+ qStopColor = elem->getColor()->rgbColor().color();
+ else
+ qStopColor = elem->getStopColor()->rgbColor().color();
+
+ // Convert in an agg suitable form
+ QString tempName = qStopColor.name();
+ const char *str = tempName.latin1();
+
+ // We need to take into account fill/stroke opacity, if available (Rob)
+ float opacity = 1.0;
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(getBBoxTarget());
+ if(style)
+ opacity = style->getFillOpacity() * style->getOpacity();
+ int stopColor = 0;
+
+ for(int i = 1; str[i]; i++)
+ {
+ int hexval;
+ if(str[i] >= '0' && str[i] <= '9')
+ hexval = str[i] - '0';
+ else if (str[i] >= 'A' && str[i] <= 'F')
+ hexval = str[i] - 'A' + 10;
+ else if (str[i] >= 'a' && str[i] <= 'f')
+ hexval = str[i] - 'a' + 10;
+ else
+ break;
+
+ stopColor = (stopColor << 4) + hexval;
+ }
+
+ // Apply stop-opacity
+ opacity *= elem->stopOpacity();
+
+ // Get rgba color including stop-opacity
+ Q_UINT32 rgba = (stopColor << 8) | int(floor(int(opacity * 255.0) + 0.5));
+
+ // Convert from separated to premultiplied alpha
+ a = rgba & 0xff;
+ r = !srgb ? linearRGBFromsRGB((rgba >> 24)) : (rgba >> 24);
+ g = !srgb ? linearRGBFromsRGB(((rgba >> 16) & 0xff)) : (rgba >> 16) & 0xff;
+ b = !srgb ? linearRGBFromsRGB(((rgba >> 8) & 0xff)) : (rgba >> 8) & 0xff;
+
+ end = int(newOffset * 255);
+ // interpolate
+ unsigned int start = (oldOffset == -1) ? 0 : int(oldOffset * 255);
+ if(oldOffset == -1)
+ {
+ r1 = r;
+ g1 = g;
+ b1 = b;
+ a1 = a;
+ }
+ int diffr = r - r1;
+ int diffg = g - g1;
+ int diffb = b - b1;
+ int diffa = a - a1;
+ unsigned int nsteps = end - start;
+ for(unsigned int i = 0;i <= nsteps;i++)
+ {
+ double diff = double(i) / double(nsteps);
+ m_colorprofile[start + i].r = !srgb ? sRGBFromLinearRGB(int(r1 + diff * diffr)) : int(r1 + diff * diffr);
+ m_colorprofile[start + i].g = !srgb ? sRGBFromLinearRGB(int(g1 + diff * diffg)) : int(g1 + diff * diffg);
+ m_colorprofile[start + i].b = !srgb ? sRGBFromLinearRGB(int(b1 + diff * diffb)) : int(b1 + diff * diffb);
+ m_colorprofile[start + i].a = !srgb ? sRGBFromLinearRGB(int(a1 + diff * diffa)) : int(a1 + diff * diffa);
+ }
+ r1 = r;
+ g1 = g;
+ b1 = b;
+ a1 = a;
+ }
+ }
+ // last section
+ for(unsigned int i = end;i <= 255;i++)
+ {
+ m_colorprofile[i].r = r;
+ m_colorprofile[i].g = g;
+ m_colorprofile[i].b = b;
+ m_colorprofile[i].a = a;
+ }
+}
+
+void AggGradient::finalizePaintServer()
+{
+ parseGradientStops(m_gradient->stopsSource());
+
+ QString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
+ if(!_href.isEmpty())
+ reference(_href);
+
+ setFinalized();
+}
+
+void AggGradient::reference(const QString &/*href*/)
+{
+}
+
+void AggLinearGradient::render(AggCanvas *c)
+{
+ SVGLinearGradientElementImpl *linear = dynamic_cast<SVGLinearGradientElementImpl *>(m_gradient);
+
+ linear->converter()->finalize(getBBoxTarget(), linear->ownerSVGElement(), linear->gradientUnits()->baseVal());
+
+ double _x1 = linear->x1()->baseVal()->value();
+ double _y1 = linear->y1()->baseVal()->value();
+ double _x2 = linear->x2()->baseVal()->value();
+ double _y2 = linear->y2()->baseVal()->value();
+
+ // Adjust to gradient transform
+ SVGMatrixImpl *gradTrans = linear->gradientTransform()->baseVal()->concatenate();
+ if(gradTrans)
+ {
+ QWMatrix m = gradTrans->qmatrix();
+ m.map(_x1, _y1, &_x1, &_y1);
+ m.map(_x2, _y2, &_x2, &_y2);
+ gradTrans->deref();
+ }
+
+ // Get the basic bbox that will be the rendering area
+ SVGRectImpl *userBBox = getBBoxTarget()->getBBox();
+
+ // Compute x1, y1, x2 and y2
+ bool objectbbox = (linear->gradientUnits()->baseVal() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+
+ // Respect current transformation matrix (so gradients zoom with...)
+ SVGTransformableImpl *transformable = dynamic_cast<SVGTransformableImpl *>(getBBoxTarget());
+ const SVGMatrixImpl *matrix = 0;
+ if(transformable)
+ matrix = transformable->screenCTM();
+
+ if(objectbbox)
+ {
+ _x1 += userBBox->x();
+ _y1 += userBBox->y();
+ _x2 += userBBox->x();
+ _y2 += userBBox->y();
+ }
+
+ userBBox->deref();
+
+ gradient_polymorphic_wrapper_base* gr_ptr = &m_linPad;
+ if(linear->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REPEAT)
+ gr_ptr = &m_linRepeat;
+ else if(linear->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REFLECT)
+ gr_ptr = &m_linReflect;
+
+ agg::trans_affine mtx_g1;
+ double dx = _x2 - _x1;
+ double dy = _y2 - _y1;
+ double angle = (atan2(dy, dx));
+ mtx_g1 *= agg::trans_affine_rotation(angle);
+ mtx_g1 *= agg::trans_affine_translation(_x1, _y1);
+ mtx_g1 *= agg::trans_affine(matrix->a(), matrix->b(), matrix->c(), matrix->d(), matrix->e(), matrix->f());
+ mtx_g1.invert();
+
+ double len = sqrt(dx * dx + dy * dy);
+ if(len > 0)
+ {
+ typedef agg::span_interpolator_linear<> interpolator_type;
+ typedef agg::span_gradient<agg::rgba8,
+ interpolator_type,
+ gradient_polymorphic_wrapper_base,
+ color_function_profile> gradient_span_gen;
+ typedef agg::span_allocator<gradient_span_gen::color_type> gradient_span_alloc;
+ color_function_profile colors(m_colorprofile);
+ gradient_span_alloc span_alloc;
+ interpolator_type inter(mtx_g1);
+ gradient_span_gen span_gen(span_alloc, inter, *gr_ptr, colors, 0, len);
+
+ agg::scanline_u8 sl;
+
+ if(c->nrChannels() == 3)
+ {
+ typedef agg::pixfmt_rgb24 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_u<renderer_base, gradient_span_gen> renderer_gradient;
+
+ pixfmt pixf(c->buf());
+ renderer_base rb(pixf);
+
+ renderer_gradient r1(rb, span_gen);
+ c->m_ras.render(sl, r1);
+ }
+ else
+ {
+ typedef agg::pixfmt_rgba32 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_u<renderer_base, gradient_span_gen> renderer_gradient;
+
+ pixfmt pixf(c->buf());
+ renderer_base rb(pixf);
+
+ renderer_gradient r1(rb, span_gen);
+ c->m_ras.render(sl, r1);
+ }
+ }
+}
+
+void AggRadialGradient::render(AggCanvas *c)
+{
+ SVGRadialGradientElementImpl *radial = dynamic_cast<SVGRadialGradientElementImpl *>(m_gradient);
+
+ radial->converter()->finalize(getBBoxTarget(), radial->ownerSVGElement(), radial->gradientUnits()->baseVal());
+
+ double _cx = radial->cx()->baseVal()->value();
+ double _cy = radial->cy()->baseVal()->value();
+ double _fx = radial->fx()->baseVal()->value();
+ double _fy = radial->fy()->baseVal()->value();
+ double _r = radial->r()->baseVal()->value();
+
+ // Get the basic bbox that will be the rendering area
+ SVGRectImpl *screenBBox = getBBoxTarget()->getBBoxInternal();
+
+ if(screenBBox->width() == 0 || screenBBox->height() == 0)
+ {
+ screenBBox->deref();
+ return;
+ }
+
+ screenBBox->deref();
+
+ // Compute x1, y1, x2 and y2
+ bool objectbbox = (radial->gradientUnits()->baseVal() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
+
+ SVGRectImpl *userBBox = getBBoxTarget()->getBBox();
+ float width = userBBox->width();
+ float height = userBBox->height();
+
+ if(objectbbox)
+ {
+ _cx += userBBox->x();
+ _cy += userBBox->y();
+ _fx += userBBox->x();
+ _fy += userBBox->y();
+ }
+
+ gradient_polymorphic_wrapper_base* gr_ptr = &m_radialPad;
+ if(radial->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REPEAT)
+ gr_ptr = &m_radialRepeat;
+ else if(radial->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REFLECT)
+ gr_ptr = &m_radialReflect;
+
+ agg::trans_affine mtx_g1;
+
+
+ // Adjust to gradient transform
+ SVGMatrixImpl *gradTrans = radial->gradientTransform()->baseVal()->concatenate();
+ if(gradTrans)
+ {
+ agg::trans_affine mtx;
+ QWMatrix m = gradTrans->qmatrix();
+ mtx = agg::trans_affine(m.m11(), m.m12(), m.m21(), m.m22(), m.dx(), m.dy());
+ gradTrans->deref();
+ mtx_g1 *= mtx;
+ }
+
+ userBBox->deref();
+
+ int diff = int(width - height); // allow slight tolerance
+ if(objectbbox && !(diff > -2 && diff < 2))
+ {
+ // make elliptical or circular depending on bbox aspect ratio
+ float ratioX = (width / height) * sqrt(2);
+ float ratioY = (height / width) * sqrt(2);
+ mtx_g1 *= agg::trans_affine_scaling((width > height) ? sqrt(2) : ratioX, (width > height) ? ratioY :sqrt(2));
+ }
+
+ mtx_g1 *= agg::trans_affine_translation(_cx, _cy);
+
+ // Respect current transformation matrix (so gradients zoom with...)
+ SVGTransformableImpl *transformable = dynamic_cast<SVGTransformableImpl *>(getBBoxTarget());
+ const SVGMatrixImpl *matrix = 0;
+ if(transformable)
+ matrix = transformable->screenCTM();
+
+ if(!matrix)
+ return;
+
+ mtx_g1 *= agg::trans_affine(matrix->a(), matrix->b(), matrix->c(), matrix->d(), matrix->e(), matrix->f());
+
+ mtx_g1.invert();
+
+ typedef agg::span_interpolator_linear<> interpolator_type;
+ typedef agg::span_gradient<agg::rgba8,
+ interpolator_type,
+ gradient_polymorphic_wrapper_base,
+ color_function_profile> gradient_span_gen;
+ typedef agg::span_allocator<gradient_span_gen::color_type> gradient_span_alloc;
+ color_function_profile colors(m_colorprofile);
+ gradient_span_alloc span_alloc;
+ interpolator_type inter(mtx_g1);
+ gradient_span_gen span_gen(span_alloc, inter, *gr_ptr, colors, 0, _r);
+
+ agg::scanline_u8 sl;
+ if(c->nrChannels() == 3)
+ {
+ typedef agg::pixfmt_rgb24 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_u<renderer_base, gradient_span_gen> renderer_gradient;
+
+ pixfmt pixf(c->buf());
+ renderer_base rb(pixf);
+
+ renderer_gradient r1(rb, span_gen);
+ c->m_ras.render(sl, r1);
+ }
+ else
+ {
+ typedef agg::pixfmt_rgba32 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_u<renderer_base, gradient_span_gen> renderer_gradient;
+
+ pixfmt pixf(c->buf());
+ renderer_base rb(pixf);
+
+ renderer_gradient r1(rb, span_gen);
+ c->m_ras.render(sl, r1);
+ }
+}
+
+AggPattern::AggPattern(SVGPatternElementImpl *pattern) : AggPaintServer(), m_pattern(pattern)
+{
+}
+
+void AggPattern::finalizePaintServer()
+{
+ m_pattern->finalizePaintServer();
+ setFinalized();
+}
+
+void AggPattern::reference(const QString &href)
+{
+ m_pattern->reference(href);
+}
+
+void AggPattern::render(AggCanvas *c)
+{
+ SVGPatternElementImpl::Tile tile = m_pattern->createTile(getBBoxTarget());
+
+ if(!tile.image().isNull())
+ {
+ QWMatrix m = tile.screenToTile();
+ double affine[6];
+
+ affine[0] = m.m11();
+ affine[1] = m.m12();
+ affine[2] = m.m21();
+ affine[3] = m.m22();
+ affine[4] = m.dx();
+ affine[5] = m.dy();
+
+ typedef agg::pixfmt_rgb24 pixfmt;
+ typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::renderer_scanline_p_solid<renderer_base> renderer_solid;
+
+ pixfmt pixf(c->buf());
+ renderer_base rb(pixf);
+ renderer_solid rs(rb);
+ //double width = c->buf().width();
+ //double height = c->buf().height();
+
+ typedef agg::span_pattern_rgba32<agg::order_rgba32> span_gen_type;
+ typedef agg::renderer_scanline_u<renderer_base, span_gen_type> renderer_type;
+
+ SVGRectImpl *screenBBox = getBBoxTarget()->getBBoxInternal();
+ double offset_x = affine[4];
+ double offset_y = affine[5];
+ screenBBox->deref();
+ agg::rendering_buffer m_pattern_rbuf;
+ m_pattern_rbuf.attach(tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4);
+ agg::span_allocator<agg::rgba8> sa;
+ span_gen_type sg(sa, m_pattern_rbuf, unsigned(offset_x), unsigned(offset_y));
+
+ renderer_type rp(rb, sg);
+
+ agg::scanline_u8 sl;
+ rs.color(agg::rgba(0,0,0));
+ c->m_ras.render(sl, rp);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.h b/ksvg/plugin/backends/agg/AggCanvasItems.h
new file mode 100644
index 00000000..a8c242ec
--- /dev/null
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.h
@@ -0,0 +1,500 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef AGGCANVASITEMS_H
+#define AGGCANVASITEMS_H
+
+#include "CanvasItem.h"
+#include "CanvasItems.h"
+#include "BezierPathAgg.h"
+
+#include "SVGPathElementImpl.h"
+#include "SVGPolyElementImpl.h"
+#include "SVGLineElementImpl.h"
+#include "SVGRectElementImpl.h"
+#include "SVGTextElementImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGCircleElementImpl.h"
+#include "SVGEllipseElementImpl.h"
+
+#include "agg_basics.h"
+#include "agg_conv_transform.h"
+#include "agg_conv_curve.h"
+#include "agg_conv_dash.h"
+#include "agg_conv_stroke.h"
+#include "agg_conv_clip_polygon.h"
+#include "agg_span_gradient.h"
+
+#include "SVGBBoxTarget.h"
+
+// gradient helpers
+
+//------------------------------------------------------------------------
+class gradient_polymorphic_wrapper_base
+{
+public:
+ virtual int calculate(int x, int y, int) const = 0;
+};
+
+template<class GradientF>
+class gradient_polymorphic_wrapper : public gradient_polymorphic_wrapper_base
+{
+public:
+ virtual int calculate(int x, int y, int d) const
+ {
+ return m_gradient.calculate(x, y, d);
+ }
+private:
+ GradientF m_gradient;
+};
+
+class gradient_radial_repeat
+{
+public:
+ int calculate(int x, int y, int d) const
+ {
+ return int(sqrt(pow(x, 2) + pow(y, 2))) % d;
+ }
+};
+
+class gradient_radial_reflect
+{
+public:
+ int calculate(int x, int y, int d) const
+ {
+ int dist = int(sqrt(pow(x, 2) + pow(y, 2)));
+ if((dist / d) % 2 == 0)
+ return dist % d;
+ else
+ return d - (dist % d);
+ }
+};
+
+class gradient_linear_repeat
+{
+public:
+ int calculate(int x, int y, int d) const
+ {
+ return (x < 0) ? (d - (-x % d)) : (x % d);
+ }
+};
+
+class gradient_linear_reflect
+{
+public:
+ int calculate(int x, int y, int d) const
+ {
+ if((abs(x) / d) % 2 == 0)
+ return (x < 0) ? (-x % d) : (x % d);
+ else
+ return (x > 0) ? (d - (x % d)) : (d - (-x % d));
+ }
+};
+
+
+#define AGG_CLASS(Class, Type, Member) \
+class Agg##Class : public AggShape \
+{ \
+public: \
+ Agg##Class(AggCanvas *c, Type *Member); \
+ virtual ~Agg##Class() { } \
+ virtual void draw(); \
+ virtual bool isVisible(); \
+ virtual void init(); \
+ virtual void init(const SVGMatrixImpl *screenCTM); \
+ virtual SVGElementImpl *element() const { return m_##Member; } \
+protected: \
+ Type *m_##Member; \
+};
+
+class stroke_dash_base
+{
+public:
+ virtual ~stroke_dash_base() {}
+
+ virtual void rewind(unsigned) = 0;
+ virtual unsigned vertex(double*, double*) = 0;
+};
+
+template<class Source>
+class stroke : public stroke_dash_base
+{
+public:
+ typedef agg::conv_stroke<Source> stroke_type;
+
+ stroke(Source& src, KSVG::SVGStylableImpl *style);
+
+ void rewind(unsigned id) { m_s.rewind(id); }
+ unsigned vertex(double* x, double* y) { return m_s.vertex(x, y); }
+
+private:
+ stroke_type m_s;
+};
+
+template<class Source>
+class dash_stroke : public stroke_dash_base
+{
+public:
+ typedef agg::conv_dash<Source> dash_type;
+ typedef agg::conv_stroke<dash_type> dash_stroke_type;
+
+ dash_stroke(Source& src, KSVG::SVGStylableImpl *style);
+
+ void rewind(unsigned id) { m_ds.rewind(id); }
+ unsigned vertex(double* x, double* y) { return m_ds.vertex(x, y); }
+
+private:
+ dash_type m_d;
+ dash_stroke_type m_ds;
+};
+
+template<class Source>
+class dash_stroke_simple
+{
+public:
+ dash_stroke_simple(Source& src, KSVG::SVGStylableImpl *style);
+ ~dash_stroke_simple() { delete impl; }
+
+ void rewind(unsigned id) { impl->rewind(id); }
+ unsigned vertex(double* x, double* y) { return impl->vertex(x, y); }
+
+private:
+ stroke_dash_base *impl;
+};
+
+typedef dash_stroke_simple<curved> curved_stroked;
+typedef agg::conv_transform<curved_stroked> curved_stroked_trans;
+typedef agg::conv_clip_polygon<curved_stroked_trans> curved_stroked_trans_clipped;
+typedef agg::conv_clip_polygon<curved_trans> curved_trans_clipped;
+//typedef agg::conv_contour<curved_trans> curved_trans_contour;
+//typedef agg::conv_clip_polygon<curved_trans_contour> curved_trans_contour_clipped;
+
+namespace KSVG
+{
+ class SVGGradientElementImpl;
+ class SVGRadialGradientElementImpl;
+ class SVGLinearGradientElementImpl;
+ class SVGPatternElementImpl;
+
+ class AggPaintServer : public CanvasPaintServer
+ {
+ public:
+ AggPaintServer() : CanvasPaintServer() {}
+ virtual ~AggPaintServer() {}
+
+ virtual void finalizePaintServer() = 0;
+ virtual void reference(const QString &href) = 0;
+
+ virtual void render(AggCanvas *c) = 0;
+ };
+
+ class AggGradient : public AggPaintServer
+ {
+ public:
+ AggGradient(SVGGradientElementImpl *gradient);
+ virtual ~AggGradient() {}
+
+ void parseGradientStops(SVGGradientElementImpl *gradient);
+
+ virtual void finalizePaintServer();
+ virtual void reference(const QString &href);
+
+ protected:
+ SVGGradientElementImpl *m_gradient;
+ agg::rgba8 m_colorprofile[256];
+ };
+
+ class AggLinearGradient : public AggGradient
+ {
+ public:
+ AggLinearGradient(SVGLinearGradientElementImpl *linear) : AggGradient(linear) {}
+
+ virtual void render(AggCanvas *c);
+
+ protected:
+ gradient_polymorphic_wrapper<agg::gradient_x> m_linPad;
+ gradient_polymorphic_wrapper<gradient_linear_repeat> m_linRepeat;
+ gradient_polymorphic_wrapper<gradient_linear_reflect> m_linReflect;
+ };
+
+ class AggRadialGradient : public AggGradient
+ {
+ public:
+ AggRadialGradient(SVGRadialGradientElementImpl *radial) : AggGradient(radial) {}
+
+ virtual void render(AggCanvas *c);
+
+ protected:
+ gradient_polymorphic_wrapper<agg::gradient_circle> m_radialPad;
+ gradient_polymorphic_wrapper<gradient_radial_repeat> m_radialRepeat;
+ gradient_polymorphic_wrapper<gradient_radial_reflect> m_radialReflect;
+ };
+
+ class AggPattern : public AggPaintServer
+ {
+ public:
+ AggPattern(SVGPatternElementImpl *pattern);
+ virtual ~AggPattern() {}
+
+ virtual void finalizePaintServer();
+ virtual void reference(const QString &);
+
+ virtual void render(AggCanvas *c);
+
+ protected:
+ SVGPatternElementImpl *m_pattern;
+ };
+
+ class AggCanvas;
+
+ class AggFillPaintServer
+ {
+ public:
+ AggFillPaintServer(SVGStylableImpl *style);
+ void update(SVGStylableImpl *style);
+ template<class VertexSource>
+ void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
+
+ private:
+ agg::rgba8 m_color;
+ };
+
+ class AggStrokePaintServer
+ {
+ public:
+ AggStrokePaintServer(SVGStylableImpl *style);
+ void update(SVGStylableImpl *style);
+ template<class VertexSource>
+ void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
+
+ private:
+ agg::rgba8 m_color;
+ };
+
+ class BezierPathAggStroked : public T2P::BezierPathAgg
+ {
+ public:
+ BezierPathAggStroked(SVGStylableImpl *style);
+ BezierPathAggStroked(const T2P::BezierPathAgg &other, SVGStylableImpl *style);
+
+ curved_trans_clipped m_curved_trans_clipped;
+ curved_stroked m_curved_stroked;
+ curved_stroked_trans m_curved_stroked_trans;
+ curved_stroked_trans_clipped m_curved_stroked_trans_clipped;
+ SVGStylableImpl *m_style;
+ };
+
+ class AggShape : public CanvasItem, public BezierPathAggStroked
+ {
+ public:
+ AggShape(AggCanvas *c, SVGStylableImpl *style);
+ virtual ~AggShape();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &p);
+ virtual bool strokeContains(const QPoint &p);
+ virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
+ void draw(SVGShapeImpl *shape);
+ void calcSVPs(const SVGMatrixImpl *matrix);
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *);
+ bool isVisible(SVGShapeImpl *shape);
+
+ void setRenderContext(RenderContext context) { m_context = context; }
+
+ agg::path_storage &storage() { return m_storage; }
+ agg::trans_affine &transform() { return m_transform; }
+
+ protected:
+ void freeSVPs();
+
+ RenderContext m_context;
+ AggCanvas *m_canvas;
+ QRect m_bbox;
+ AggFillPaintServer *m_fillPainter;
+ AggStrokePaintServer *m_strokePainter;
+ };
+
+ AGG_CLASS(Rectangle, SVGRectElementImpl, rect)
+ AGG_CLASS(Ellipse, SVGEllipseElementImpl, ellipse)
+ AGG_CLASS(Circle, SVGCircleElementImpl, circle)
+
+ class AggLine : public AggShape, public MarkerHelper
+ {
+ public:
+ AggLine(AggCanvas *c, SVGLineElementImpl *line);
+ virtual ~AggLine();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual SVGElementImpl *element() const { return m_line; }
+
+ protected:
+ SVGLineElementImpl *m_line;
+ };
+
+ class AggPoly : public AggShape, public MarkerHelper
+ {
+ public:
+ AggPoly(AggCanvas *c, SVGPolyElementImpl *poly);
+ virtual ~AggPoly();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM) = 0;
+
+ virtual SVGElementImpl *element() const { return m_poly; }
+
+ protected:
+ SVGPolyElementImpl *m_poly;
+
+ };
+ class AggPolyline : public AggPoly
+ {
+ public:
+ AggPolyline(AggCanvas *c, SVGPolylineElementImpl *poly);
+ virtual ~AggPolyline();
+
+ virtual void init(const SVGMatrixImpl *screenCTM);
+ };
+
+ class AggPolygon : public AggPoly
+ {
+ public:
+ AggPolygon(AggCanvas *c, SVGPolygonElementImpl *poly);
+ virtual ~AggPolygon();
+
+ virtual void init(const SVGMatrixImpl *screenCTM);
+ };
+
+ class AggPath : public AggShape, public ::SVGPathParser, public MarkerHelper
+ {
+ public:
+ AggPath(AggCanvas *c, SVGPathElementImpl *path);
+ virtual ~AggPath();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual SVGElementImpl *element() const { return m_path; }
+
+ protected:
+ SVGPathElementImpl *m_path;
+
+ virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true);
+ virtual void svgLineTo(double x1, double y1, bool abs = true);
+ virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true);
+ virtual void svgClosePath();
+ };
+
+ class AggMarker : public CanvasMarker
+ {
+ public:
+ AggMarker(AggCanvas *c, SVGMarkerElementImpl *marker);
+ virtual ~AggMarker();
+
+ virtual QRect bbox() const { return QRect(); }
+ virtual bool fillContains(const QPoint &) { return true; }
+ virtual bool strokeContains(const QPoint &) { return true; }
+ virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
+ virtual void init();
+ virtual void draw();
+ virtual bool isVisible() { return false; }
+
+ void draw(SVGShapeImpl *obj, int x, int y, float lwidth = 1.0, double angle = 0.0);
+ //const ArtSVP *clippingRectangle() const { return m_clippingRectangle; }
+
+ protected:
+ AggCanvas *m_canvas;
+ //ArtSVP *m_clippingRectangle;
+ };
+
+ class AggImage : public CanvasItem
+ {
+ public:
+ AggImage(AggCanvas *c, SVGImageElementImpl *image);
+ virtual ~AggImage();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &) { return true; }
+ virtual bool strokeContains(const QPoint &) { return true; }
+ virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
+ virtual void init();
+ virtual void draw();
+ virtual bool isVisible();
+
+ virtual SVGElementImpl *element() const { return m_image; }
+
+ protected:
+ AggCanvas *m_canvas;
+ SVGImageElementImpl *m_image;
+ };
+
+ class AggText : public CanvasText
+ {
+ public:
+ AggText(AggCanvas *c, SVGTextElementImpl *text);
+ virtual ~AggText();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &p);
+ virtual bool strokeContains(const QPoint &p);
+ virtual void update(CanvasItemUpdate, int param1 = 0, int param2 = 0);
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual void renderCallback(SVGTextContentElementImpl *element, const SVGMatrixImpl *screenCTM, T2P::GlyphSet *glyph, T2P::GlyphLayoutParams *params, double anchor) const;
+
+ virtual void addTextDecoration(SVGTextContentElementImpl *element, double x, double y, double w, double h) const;
+
+ unsigned operator [](unsigned) const { return 0; }
+
+ protected:
+ AggCanvas *m_canvas;
+
+ private:
+ void clearCurved();
+ class SVPElement
+ {
+ public:
+ SVPElement() { svp = 0; element = 0; fillPainter = 0; strokePainter = 0; }
+ ~SVPElement();
+
+ BezierPathAggStroked *svp;
+ SVGTextContentElementImpl *element;
+ AggFillPaintServer *fillPainter;
+ AggStrokePaintServer *strokePainter;
+ };
+
+ mutable QPtrList<SVPElement> m_drawItems;
+ };
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/BezierPathAgg.cpp b/ksvg/plugin/backends/agg/BezierPathAgg.cpp
new file mode 100644
index 00000000..10a75c1c
--- /dev/null
+++ b/ksvg/plugin/backends/agg/BezierPathAgg.cpp
@@ -0,0 +1,126 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include "Point.h"
+#include "BezierPathAgg.h"
+
+#include <kdebug.h>
+
+#include <agg_basics.h>
+#include <agg_bounding_rect.h>
+
+using namespace T2P;
+
+double BezierPathAgg::length(double t)
+{
+ if(m_length < 0.0)
+ {
+ double total = 0.0;
+ double x = 0.0, y = 0.0;
+ double x2, y2;
+ unsigned cmd;
+ unsigned int id = 0;
+ m_curved_trans.rewind(id);
+ while(!agg::is_stop(cmd = m_curved_trans.vertex(&x2, &y2)))
+ {
+ if(agg::is_move_to(cmd))
+ {
+ x = x2;
+ y = y2;
+ }
+ else if(agg::is_line_to(cmd))
+ {
+ double dx = x, dy = y;
+ dx = x2 - dx;
+ dy = y2 - dy;
+ total += sqrt(pow(dx, 2) + pow(dy, 2));
+ x = x2;
+ y = y2;
+ }
+ }
+ return total * t;
+ }
+ else
+ return m_length * t;
+}
+
+void BezierPathAgg::pointTangentNormalAt(double t, Point *p, Point *tn, Point *n)
+{
+ double totallen = length(t);
+ double total = 0.0;
+ double x = 0.0, y = 0.0;
+ double x2, y2;
+ unsigned cmd;
+ unsigned int id = 0;
+ m_curved_trans.rewind(id);
+ while(!agg::is_stop(cmd = m_curved_trans.vertex(&x2, &y2)))
+ {
+ if(agg::is_move_to(cmd))
+ {
+ x = x2;
+ y = y2;
+ }
+ else if(agg::is_line_to(cmd))
+ {
+ double dx = x, dy = y;
+ x = x2;
+ y = y2;
+ dx = x - dx;
+ dy = y - dy;
+ double seg_len = sqrt(pow(dx, 2) + pow(dy, 2));
+ total += seg_len;
+ if(total >= totallen)
+ {
+ double fract = 1 - (totallen - (total - seg_len)) / seg_len;
+ if(p)
+ {
+ p->setX(x - dx * fract);
+ p->setY(y - dy * fract);
+ }
+ if(tn)
+ {
+ //kdDebug() << k_funcinfo << "dx : " << dx << endl;
+ //kdDebug() << k_funcinfo << "dy : " << dy << endl;
+ tn->setX(dx);
+ tn->setY(dy);
+ }
+ if(n)
+ {
+ // Calculate vector product of "binormal" x tangent
+ // (0,0,1) x (dx,dy,0), which is simply (dy,-dx,0).
+ n->setX(dy);
+ n->setY(-dx);
+ }
+ return;
+ }
+ }
+ }
+}
+
+void BezierPathAgg::boundingBox(Point *topLeft, Point *bottomRight)
+{
+ double x1, y1, x2, y2;
+ agg::bounding_rect(m_curved, *this, 0, 1, &x1, &y1, &x2, &y2);
+ *topLeft = Point(x1, y1);
+ *bottomRight = Point(x2, y2);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/BezierPathAgg.h b/ksvg/plugin/backends/agg/BezierPathAgg.h
new file mode 100644
index 00000000..21451aa9
--- /dev/null
+++ b/ksvg/plugin/backends/agg/BezierPathAgg.h
@@ -0,0 +1,83 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_BEZIERPATH_AGG_H
+#define T2P_BEZIERPATH_AGG_H
+
+#include <agg_curves.h>
+#include <agg_conv_curve.h>
+#include <agg_conv_stroke.h>
+#include <agg_path_storage.h>
+#include <agg_conv_transform.h>
+
+#include "Affine.h"
+#include "BezierPath.h"
+
+typedef agg::conv_curve<agg::path_storage> curved;
+typedef agg::conv_transform<curved> curved_trans;
+
+namespace T2P
+{
+ class BezierPathAgg : public BezierPath
+ {
+ public:
+ BezierPathAgg() : BezierPath(),
+ m_curved(m_storage), m_curved_trans(m_curved, m_transform)
+ {
+ m_length = -1;
+ }
+
+ ~BezierPathAgg() {}
+
+ BezierPathAgg(const BezierPathAgg &other) : BezierPath(), m_storage(other.m_storage),
+ m_curved(m_storage), m_curved_trans(m_curved, m_transform)
+ {
+ m_transform = other.m_transform;
+ m_length = other.m_length;
+ }
+
+ void copy_from(const agg::path_storage &ps, Affine &affine)
+ {
+ for(unsigned i = 0; i < ps.total_vertices(); i++)
+ {
+ double x, y;
+ unsigned cmd = ps.vertex(i, &x, &y);
+ m_storage.add_vertex(affine.dx() + x * affine.m11() + y * affine.m21(),
+ affine.dy() + x * affine.m12() + y * affine.m22(), cmd);
+ }
+ }
+
+ unsigned operator [](unsigned) { return 0; }
+
+ virtual double length(double t = 1.0);
+ virtual void pointTangentNormalAt(double t, Point *p = 0, Point *tn = 0, Point *n = 0);
+ virtual void boundingBox(Point *topLeft, Point *bottomRight);
+
+ agg::path_storage m_storage;
+ curved m_curved;
+ curved_trans m_curved_trans;
+ agg::trans_affine m_transform;
+ double m_length;
+ };
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/GlyphTracerAgg.cpp b/ksvg/plugin/backends/agg/GlyphTracerAgg.cpp
new file mode 100644
index 00000000..39b00146
--- /dev/null
+++ b/ksvg/plugin/backends/agg/GlyphTracerAgg.cpp
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <iostream>
+
+#include "Glyph.h"
+#include "Point.h"
+#include "BezierPathAgg.h"
+#include "GlyphTracerAgg.h"
+
+using namespace T2P;
+
+int traceMoveto(FT_Vector *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathAgg *bpath = static_cast<BezierPathAgg *>(glyph->modifiableBezierPath());
+ Point p = affine.mapPoint(Point(to->x, to->y));
+ bpath->m_storage.move_to(p.x(), p.y());
+ return 0;
+}
+
+int traceLineto(FT_Vector *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathAgg *bpath = static_cast<BezierPathAgg *>(glyph->modifiableBezierPath());
+ Point p = affine.mapPoint(Point(to->x, to->y));
+ bpath->m_storage.line_to(p.x(), p.y());
+ return 0;
+}
+
+int traceConicBezier(FT_Vector *control, FT_Vector *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathAgg *bpath = static_cast<BezierPathAgg *>(glyph->modifiableBezierPath());
+ Point c = affine.mapPoint(Point(control->x, control->y));
+ Point p = affine.mapPoint(Point(to->x, to->y));
+
+ double sx, sy;
+ bpath->m_storage.vertex(bpath->m_storage.total_vertices() - 1, &sx, &sy);
+ bpath->m_storage.curve4(c.x() - (c.x() - sx) / 3, c.y() - (c.y() - sy) / 3,
+ c.x() + (p.x() - c.x()) / 3, c.y() + (p.y() - c.y()) / 3, p.x(), p.y());
+
+ return 0;
+}
+
+int traceCubicBezier(FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathAgg *bpath = static_cast<BezierPathAgg *>(glyph->modifiableBezierPath());
+ Point p = affine.mapPoint(Point(to->x, to->y));
+ Point c1 = affine.mapPoint(Point(control1->x, control1->y));
+ Point c2 = affine.mapPoint(Point(control2->x, control2->y));
+ bpath->m_storage.curve4(c1.x(), c1.y(), c2.x(), c2.y(), p.x(), p.y());
+ return 0;
+}
+
+GlyphTracerAgg::GlyphTracerAgg() : GlyphTracer()
+{
+ setMoveto(*traceMoveto);
+ setLineto(*traceLineto);
+ setConicBezier(*traceConicBezier);
+ setCubicBezier(*traceCubicBezier);
+}
+
+GlyphTracerAgg::~GlyphTracerAgg()
+{
+}
+
+void GlyphTracerAgg::correctGlyph(GlyphAffinePair *glyphAffine)
+{
+
+ // Take bezier path belonging to glyph (Note: that one is _UNMODIFIABLE_, once calculated)
+ const BezierPathAgg *path = static_cast<const BezierPathAgg *>(glyphAffine->glyph()->bezierPath());
+
+ BezierPathAgg *transformatedPath = static_cast<BezierPathAgg *>(allocBezierPath(0));
+ Affine &affine = glyphAffine->affine();
+ transformatedPath->copy_from(path->m_storage, affine);
+ glyphAffine->setTransformatedPath(transformatedPath);
+}
+
+BezierPath *GlyphTracerAgg::allocBezierPath(int)
+{
+ return new BezierPathAgg();
+}
+
+void GlyphTracerAgg::closePath(Glyph *glyph)
+{
+ BezierPathAgg *bpath = static_cast<BezierPathAgg *>(glyph->modifiableBezierPath());
+ bpath->m_storage.close_polygon();
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/GlyphTracerAgg.h b/ksvg/plugin/backends/agg/GlyphTracerAgg.h
new file mode 100644
index 00000000..5fb24d4b
--- /dev/null
+++ b/ksvg/plugin/backends/agg/GlyphTracerAgg.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_GLYPHTRACER_AGG_H
+#define T2P_GLYPHTRACER_AGG_H
+
+#include "GlyphTracer.h"
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+namespace T2P
+{
+ class Glyph;
+ class BezierPath;
+
+ class GlyphTracerAgg : public GlyphTracer
+ {
+ public:
+ GlyphTracerAgg();
+ ~GlyphTracerAgg();
+
+ virtual void correctGlyph(GlyphAffinePair *glyphAffine);
+ virtual BezierPath *allocBezierPath(int size);
+ virtual void closePath(Glyph *glyph);
+ };
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/agg/Makefile.am b/ksvg/plugin/backends/agg/Makefile.am
new file mode 100644
index 00000000..4e883809
--- /dev/null
+++ b/ksvg/plugin/backends/agg/Makefile.am
@@ -0,0 +1,15 @@
+kde_module_LTLIBRARIES = libksvgrendereragg.la
+
+# Damn agg2 has no configuration querying possibility!
+AGG_CFLAGS = -I/cvs/agg2/include/
+AGG_LIBS = /cvs/agg2/src/libagg.a
+
+libksvgrendereragg_la_SOURCES = BezierPathAgg.cpp GlyphTracerAgg.cpp AggCanvas.cpp AggCanvasItems.cpp AggCanvasFactory.cpp
+libksvgrendereragg_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libksvgrendereragg_la_LIBADD = ../../../libksvg.la $(AGG_LIBS)
+libksvgrendereragg_la_METASOURCES = AUTO
+
+kde_services_DATA = ksvgaggcanvas.desktop
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+INCLUDES = $(KDE_INCLUDES) $(AGG_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
diff --git a/ksvg/plugin/backends/agg/ksvgaggcanvas.desktop b/ksvg/plugin/backends/agg/ksvgaggcanvas.desktop
new file mode 100644
index 00000000..ac51836b
--- /dev/null
+++ b/ksvg/plugin/backends/agg/ksvgaggcanvas.desktop
@@ -0,0 +1,101 @@
+[Desktop Entry]
+Type=Service
+ServiceTypes=KSVG/Renderer
+X-KDE-Library=libksvgrendereragg
+X-KSVG-InternalName=agg
+Name=KSVG Rendering Backend - Anti Grain Geometry
+Name[ar]=خلÙية رسم Ù„ KSVG - هندسة Anti Grain
+Name[bs]=KSVG renderiranje - Anti Grain Geometry
+Name[ca]=Representació en segon pla de KSVG - Geometria anti gra
+Name[cs]=Vykreslovací nástroj KSVG - Anti Grain Geometry
+Name[cy]=Ôl-wyneb Llunio KSVG - Geometreg Wrth-Raen
+Name[da]=Underliggende program for KSVG-visning - antikorn geometri
+Name[de]=KSVG-Darstellungsmodul - Antikörnungs-Geometrie
+Name[el]= ΣÏστημα υποστήÏιξης αποτÏπωσης του KSVG - Anti Grain Geometry
+Name[es]=Motor de procesado de KSVG - Geometría suavizada
+Name[et]=KSVG renderdamise taustarakendus - teralisusevastane geomeetria (AGG)
+Name[eu]=KSVG errendatze programa - Anti Grain geometriarekin
+Name[fa]=پایانۀ پشتیبانی پرداخت KSVG - هندسۀ ضد ذره
+Name[fi]=KSVG-piirtäjän taustaohjelma - sileä geometria
+Name[fr]=Moteur de rendu KSVG - Anti Grain Geometry
+Name[gl]=Mecanismo de Interpretación KSVG - Xeometría Anti-gran
+Name[he]=מנוע רינדור KSVG
+Name[hi]=के-à¤à¤¸à¤µà¥€à¤œà¥€ रेंडरिंग बैकà¤à¤£à¥à¤¡- à¤à¤¨à¥à¤Ÿà¥€ गà¥à¤°à¥‡à¤¨ जà¥à¤¯à¤¾à¤®à¤¿à¤¤à¥€
+Name[hu]=KSVG megjelenítő motor - AGG (Anti Grain Geometry)
+Name[is]=KSVG teiknari - Anti Grain Geometry
+Name[it]=Backend KSVG per il rendering - Geometrie senza sgranature
+Name[ja]=KSVG レンダリングãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ - Anti Grain Geometry
+Name[kk]=KSVG кеÑкіндеу бағдарламаÑÑ‹ - қиыршықтыққа қарÑÑ‹ геометриÑÑÑ‹
+Name[km]=កម្មវិធី​សម្រាប់​បង្ហាញ KSVG - រាង​មិន​គ្រើម
+Name[lt]=KSVG atkūrimo programinė sąsaja - Anti Grain geometrija
+Name[ms]=Tepi Belakang KSVG - Geometri Anti Bijian
+Name[nb]=Modul for KSVG-tegning – antikorngeometri
+Name[nds]=KSVG-Dorstellhölper - Antigrissel-Geometrie
+Name[ne]=KSVG रेनà¥à¤¡à¤°à¤¿à¤™ बà¥à¤¯à¤¾à¤•à¤‡à¤¨à¥à¤¡ - à¤à¤¨à¥à¤Ÿà¤¿ गà¥à¤°à¥‡à¤¨ जà¥à¤¯à¥‹à¤®à¥‡à¤Ÿà¥à¤°à¤¿
+Name[nl]=KSVG weergavecomponent - Anti Grain Geometry
+Name[nn]=Modul for KSVG-teikning – antikorngeometri
+Name[pl]=Narzędzie do renderowania KSVG - nieziarnista geometria
+Name[pt]=Infra-Estrutura de Desenho do KSVG - Geometria Anti-Grão
+Name[pt_BR]=Estrutura de Renderização do KSVG - Geometria Anti-Grain
+Name[ro]=Motor de randare KSVG - Anti Grain Geometry
+Name[ru]=Движок отриÑовки KSVG - противозерниÑÑ‚Ð°Ñ Ð³ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ð¸Ñ
+Name[sk]=Nástroj pre zobrazovanie KSVG - antigranularitná geometria
+Name[sl]=Izrisovalnik KSVG - Protizrnska geometrija
+Name[sr]=KSVG-ов позадинÑки ÑиÑтем за рендеровање — ПротивзрнаÑта геометрија
+Name[sr@Latn]=KSVG-ov pozadinski sistem za renderovanje — Protivzrnasta geometrija
+Name[sv]=KSVG-uppritningsmodul - geometri mot korninghet
+Name[ta]=KSVG வழஙà¯à®•à¯à®®à¯ பின௠அமைபà¯à®ªà¯ - ஆனà¯à®Ÿà®¿ கà¯à®°à¯‡à®©à¯ ஜியோமெடà¯à®°à®¿
+Name[tg]=Лағжандаи таÑовироти KSVG - геометриÑи мутақобили гандумӣ
+Name[tr]=KSVG Derleme Aracı - Taneciksiz Geometri
+Name[uk]=Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ KSVG - AGG
+Name[zh_CN]=KSVG 渲染åŽç«¯ - å增长几何形状
+Name[zh_HK]=KSVG åˆæˆå¾Œç«¯ - Anti Grain Geometry
+Name[zh_TW]=KSVG ä¸Šè‰²å¾Œç«¯ä»‹é¢ - Anti Grain Geometry
+Comment=New, unstable ksvg rendering backend
+Comment[bs]=Novi, nestabilni ksvg renderiranje backend
+Comment[ca]=Nou, inestable representador en segon pla de ksvg
+Comment[cs]=Nový, nestabilní vykreslovací nástroj KSVG
+Comment[cy]=Ôl-wyneb llunio ksvg newydd, ansad
+Comment[da]=Nyt, ustabilt underliggende program til ksvg-visning
+Comment[de]=Neues, unausgereiftes KSVG-Darstellungsmodul
+Comment[el]=Îέο υπό ανάπτυξη σÏστημα υποστήÏιξης αποτÏπωσης
+Comment[es]=Nuevo motor de procesado de ksvg, inestable
+Comment[et]=Uus ebastabiilne ksvg renderdamise taustarakendus
+Comment[eu]=Berria, ksvg errendatze programa ezegonkorra
+Comment[fa]=جدید، پایانۀ پشتیبانی ناپایدار پرداخت ksvg
+Comment[fi]=Uusi epävakaa ksvg-piirtäjän taustaohjelma
+Comment[fr]=Nouveau moteur de rendu KSVG instable
+Comment[gl]=Novo e inestábel mecanismo de interpretación ksvg
+Comment[he]=חדש, מנוע רינדור ×œ× ×™×¦×™×‘ עבור KSVG
+Comment[hi]=नया, असà¥à¤¥à¤¿à¤° के-à¤à¤¸à¤µà¥€à¤œà¥€ रेंडरिंग बैकà¤à¤£à¥à¤¡
+Comment[hu]=Új, még nem teljesen kiforrott megjelenítőmotor a KSVG-hez
+Comment[is]=Nýr og óstöðugur ksvg teiknari
+Comment[it]=Nuovo, instabile backend di KSVG per il rendering
+Comment[ja]=æ–°ã—ãã€ã¾ã é–‹ç™ºé€”上㮠ksvg レンダリングãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰
+Comment[kk]=Жаңа, әлі тұрақÑыз KSVG кеÑкіндеу бағдарламаÑÑ‹
+Comment[km]=កម្មវិធី​សម្រាប់​បង្ហាញ ksvg ážáŸ’មី​ážáŸ‚​មិន​សូវ​ឋិážážáŸážš
+Comment[lt]=Nauja, nestabili ksvg atkūrimo programinė sąsaja
+Comment[ms]=Tepi Belakang Menrealisasi ksvg yang baru dan tidak stabil
+Comment[nb]=Ny og ustabil modul for ksvg-tegning
+Comment[nds]=Nieg, nich stevig KSVG-Dorstellhölper
+Comment[ne]=नयाà¤, असà¥à¤¥à¤¿à¤° ksvg रेनà¥à¤¡à¤°à¤¿à¤™ बà¥à¤¯à¤¾à¤•à¤‡à¤¨à¥à¤¡
+Comment[nl]=Nieuwe, niet stabiele KSVG weergavecomponent
+Comment[nn]=Ny og ustabil modul for ksvg-teikning
+Comment[pl]=Nowe, niestabilne, narzędzie do renderowania KSVG
+Comment[pt]=Uma infra-estrutura de desenho do ksvg, nova e instável
+Comment[pt_BR]=Nova e instável estrutura de renderização do ksvg
+Comment[ro]=Motor de randare KSVG nou, netestat suficient
+Comment[ru]=Ðовый, неÑтабильный движок прориÑовки ksvg
+Comment[sk]=Nová, nestabilná verzia nástroja pre zobrazovanie ksvg
+Comment[sl]=Nov, nestabilen izrisovalnik KSVG
+Comment[sr]=Ðов, неÑтабилан KSVG-ов позадинÑки ÑиÑтем за рендеровање
+Comment[sr@Latn]=Nov, nestabilan KSVG-ov pozadinski sistem za renderovanje
+Comment[sv]=Ny, instabil KSVG-uppritningsmodul
+Comment[ta]=பà¯à®¤à®¿à®¯, நிலையிலà¯à®²à®¾à®¤ ksvg வழஙà¯à®•à¯à®®à¯ பின௠அமைபà¯à®ªà¯
+Comment[tg]=Лағжандаи ғайриуÑтувори таÑовироти ksvg-и нав
+Comment[tr]=Yeni, stabil olmayan ksvg derleme aracı
+Comment[uk]=Ðовий, неÑтабільний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ KSVG
+Comment[zh_CN]=æ–°çš„ä¸ç¨³å®šçš„ ksvg 渲染åŽç«¯
+Comment[zh_HK]=新但ä¸ç©©å®šçš„ ksvg åˆæˆå¾Œç«¯
+Comment[zh_TW]=新的,ä¸ç©©å®šçš„ ksvg 上色後端介é¢
+author=Rob Buis <buis@kde.org>
diff --git a/ksvg/plugin/backends/libart/BezierPathLibart.cpp b/ksvg/plugin/backends/libart/BezierPathLibart.cpp
new file mode 100644
index 00000000..fb163952
--- /dev/null
+++ b/ksvg/plugin/backends/libart/BezierPathLibart.cpp
@@ -0,0 +1,160 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <math.h>
+#include "Point.h"
+#include "BezierPathLibart.h"
+
+#include <kdebug.h>
+
+#include <libart_lgpl/art_bpath.h>
+#include <libart_lgpl/art_vpath.h>
+#include <libart_lgpl/art_vpath_bpath.h>
+
+using namespace T2P;
+
+BezierPathLibart::BezierPathLibart() : BezierPath()
+{
+ m_array.resize(0);
+ m_length = -1;
+}
+
+BezierPathLibart::BezierPathLibart(ArtBpath *other) : BezierPath()
+{
+ int i = 0;
+ for(;other[i].code != ART_END; i++)
+ {
+ ensureSpace(m_array, i)
+ m_array[i] = other[i];
+ }
+ ensureSpace(m_array, i)
+ m_array[i].code = ART_END;
+}
+
+BezierPathLibart::~BezierPathLibart()
+{
+}
+
+double BezierPathLibart::length(double t)
+{
+ if(m_length < 0.0)
+ {
+ double total = 0.0;
+ // We cheat a bit...
+ ArtVpath *vpath = art_bez_path_to_vec(m_array.data(), 0.25);
+ double x = 0.0, y = 0.0;
+ for(int i = 0; vpath[i].code != ART_END; i++)
+ {
+ if(vpath[i].code == ART_MOVETO)
+ {
+ x = vpath[i].x;
+ y = vpath[i].y;
+ }
+ else if(vpath[i].code == ART_LINETO)
+ {
+ double dx = x, dy = y;
+ x = vpath[i].x;
+ y = vpath[i].y;
+ dx = x - dx;
+ dy = y - dy;
+ total += sqrt(pow(dx, 2) + pow(dy, 2));
+ }
+ }
+ art_free(vpath);
+ return total * t;
+ }
+ else
+ return m_length * t;
+}
+
+void BezierPathLibart::pointTangentNormalAt(double t, Point *p, Point *tn, Point *n)
+{
+ double totallen = length(t);
+ // We cheat a bit...
+ ArtVpath *vpath = art_bez_path_to_vec(m_array.data(), 0.25);
+ double total = 0.0;
+ double x = 0.0, y = 0.0;
+ for(int i = 0; vpath[i].code != ART_END; i++)
+ {
+ if(vpath[i].code == ART_MOVETO)
+ {
+ x = vpath[i].x;
+ y = vpath[i].y;
+ }
+ else if(vpath[i].code == ART_LINETO)
+ {
+ double dx = x, dy = y;
+ x = vpath[i].x;
+ y = vpath[i].y;
+ dx = x - dx;
+ dy = y - dy;
+ double seg_len = sqrt(pow(dx, 2) + pow(dy, 2));
+ total += seg_len;
+ if(total >= totallen)
+ {
+ double fract = 1 - (totallen - (total - seg_len)) / seg_len;
+ if(p)
+ {
+ p->setX(x - dx * fract);
+ p->setY(y - dy * fract);
+ }
+ // Calculate tangent
+ if(tn)
+ {
+ tn->setX(dx);
+ tn->setY(dy);
+ }
+ // Calculate normal vector.
+ if(n)
+ {
+ // Calculate vector product of "binormal" x tangent
+ // (0,0,1) x (dx,dy,0), which is simply (dy,-dx,0).
+ n->setX(dy);
+ n->setY(-dx);
+ }
+ return;
+ }
+ }
+ }
+ art_free(vpath);
+}
+
+void BezierPathLibart::boundingBox(Point *topLeft, Point *bottomRight)
+{
+ if(m_array.count() > 0)
+ {
+ // We cheat a bit...
+ ArtVpath *vpath = art_bez_path_to_vec(m_array.data(), 0.25);
+
+ ArtDRect rect;
+ art_vpath_bbox_drect(vpath, &rect);
+ art_free(vpath);
+
+ *topLeft = Point(rect.x0, rect.y0);
+ *bottomRight = Point(rect.x1, rect.y1);
+ }
+ else
+ {
+ *topLeft = Point(0, 0);
+ *bottomRight = Point(0, 0);
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/BezierPathLibart.h b/ksvg/plugin/backends/libart/BezierPathLibart.h
new file mode 100644
index 00000000..a6dfd2b9
--- /dev/null
+++ b/ksvg/plugin/backends/libart/BezierPathLibart.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_BEZIERPATH_LIBART_H
+#define T2P_BEZIERPATH_LIBART_H
+
+#include "BezierPath.h"
+#include <qmemarray.h>
+
+class _ArtBpath;
+
+#define ensureSpace(vec, index) if((int)vec.size() == index) vec.resize(index + 1);
+
+namespace T2P
+{
+ class BezierPathLibart : public BezierPath
+ {
+ public:
+ BezierPathLibart();
+ BezierPathLibart(_ArtBpath *other);
+ ~BezierPathLibart();
+
+ virtual double length(double t = 1.0);
+ virtual void pointTangentNormalAt(double t, Point *p = 0, Point *tn = 0, Point *n = 0);
+ virtual void boundingBox(Point *topLeft, Point *bottomRight);
+
+ // Don't make those private members, these are all internal anyway...
+ QMemArray<_ArtBpath> m_array;
+ double m_length;
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/GlyphTracerLibart.cpp b/ksvg/plugin/backends/libart/GlyphTracerLibart.cpp
new file mode 100644
index 00000000..b034c6e6
--- /dev/null
+++ b/ksvg/plugin/backends/libart/GlyphTracerLibart.cpp
@@ -0,0 +1,177 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <iostream>
+
+#include <kdebug.h>
+
+#include "Glyph.h"
+#include "Point.h"
+#include "BezierPathLibart.h"
+#include "GlyphTracerLibart.h"
+
+#include <libart_lgpl/art_bpath.h>
+
+#include <config.h>
+
+#ifdef HAVE_FREETYPE_2_2_x
+ #define FT_VECTOR_PARAMETER const FT_Vector
+#else
+ #define FT_VECTOR_PARAMETER FT_Vector
+#endif
+
+using namespace T2P;
+
+int traceMoveto(FT_VECTOR_PARAMETER *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathLibart *path = static_cast<BezierPathLibart *>(glyph->modifiableBezierPath());
+ Point p = affine.mapPoint(Point(to->x, to->y));
+
+ int index = path->m_array.count();
+ if(index == 0 ||
+ p.x() != path->m_array[index - 1].x3 ||
+ p.y() != path->m_array[index - 1].y3)
+ {
+ path->m_array.resize(index + 1);
+ path->m_array[index].code = ART_MOVETO;
+ path->m_array[index].x3 = p.x();
+ path->m_array[index].y3 = p.y();
+ }
+
+ return 0;
+}
+
+int traceLineto(FT_VECTOR_PARAMETER *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathLibart *path = static_cast<BezierPathLibart *>(glyph->modifiableBezierPath());
+ Point p = affine.mapPoint(Point(to->x, to->y));
+
+ int index = path->m_array.count();
+ ArtBpath *last = &path->m_array[index - 1];
+
+ if((p.x() != last->x3) || (p.y() != last->y3))
+ {
+ path->m_array.resize(index + 1);
+ path->m_array[index].code = ART_LINETO;
+ path->m_array[index].x3 = p.x();
+ path->m_array[index].y3 = p.y();
+ }
+
+ return 0;
+}
+
+int traceConicBezier(FT_VECTOR_PARAMETER *control, FT_VECTOR_PARAMETER *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathLibart *path = static_cast<BezierPathLibart *>(glyph->modifiableBezierPath());
+
+ int index = path->m_array.count();
+ if(!(index > 0))
+ return -1;
+
+ path->m_array.resize(index + 1);
+ ArtBpath *s = &path->m_array[index - 1];
+ ArtBpath *e = &path->m_array[index];
+
+ e->code = ART_CURVETO;
+
+ Point c = affine.mapPoint(Point(control->x, control->y));
+ Point p = affine.mapPoint(Point(to->x, to->y));
+ e->x3 = p.x();
+ e->y3 = p.y();
+
+ path->m_array[index].x1 = c.x() - (c.x() - s->x3) / 3;
+ path->m_array[index].y1 = c.y() - (c.y() - s->y3) / 3;
+ path->m_array[index].x2 = c.x() + (e->x3 - c.x()) / 3;
+ path->m_array[index].y2 = c.y() + (e->y3 - c.y()) / 3;
+
+ return 0;
+}
+
+int traceCubicBezier(FT_VECTOR_PARAMETER *control1, FT_VECTOR_PARAMETER *control2, FT_VECTOR_PARAMETER *to, void *obj)
+{
+ Glyph *glyph = reinterpret_cast<Glyph *>(obj);
+ Affine &affine = glyph->affine();
+ BezierPathLibart *path = static_cast<BezierPathLibart *>(glyph->modifiableBezierPath());
+
+ Point p = affine.mapPoint(Point(to->x, to->y));
+ Point c1 = affine.mapPoint(Point(control1->x, control1->y));
+ Point c2 = affine.mapPoint(Point(control2->x, control2->y));
+
+ int index = path->m_array.count();
+ path->m_array.resize(index + 1);
+ path->m_array[index].code = ART_CURVETO;
+ path->m_array[index].x1 = c1.x();
+ path->m_array[index].y1 = c1.y();
+ path->m_array[index].x2 = c2.x();
+ path->m_array[index].y2 = c2.y();
+ path->m_array[index].x3 = p.x();
+ path->m_array[index].y3 = p.y();
+
+ return 0;
+}
+
+GlyphTracerLibart::GlyphTracerLibart() : GlyphTracer()
+{
+ setMoveto(*traceMoveto);
+ setLineto(*traceLineto);
+ setConicBezier(*traceConicBezier);
+ setCubicBezier(*traceCubicBezier);
+}
+
+GlyphTracerLibart::~GlyphTracerLibart()
+{
+}
+
+void GlyphTracerLibart::correctGlyph(GlyphAffinePair *glyphAffine)
+{
+ // Take bezier path belonging to glyph (Note: that one is _UNMODIFIABLE_, once calculated)
+ const BezierPathLibart *path = static_cast<const BezierPathLibart *>(glyphAffine->glyph()->bezierPath());
+
+ // Create a new empty path with the same size
+ ArtBpath *transformed = art_bpath_affine_transform(path->m_array.data(), glyphAffine->affine().data());
+ BezierPathLibart *transformatedPath = new BezierPathLibart(transformed);
+ art_free(transformed);
+ glyphAffine->setTransformatedPath(transformatedPath);
+}
+
+BezierPath *GlyphTracerLibart::allocBezierPath(int)
+{
+ BezierPathLibart *bpath = new BezierPathLibart();
+ //if(size != 0)
+ // bpath->m_array.resize(size);
+
+ return bpath;
+}
+
+void GlyphTracerLibart::closePath(Glyph *glyph)
+{
+ BezierPathLibart *path = static_cast<BezierPathLibart *>(glyph->modifiableBezierPath());
+ int index = path->m_array.count();
+ path->m_array.resize(index + 1);
+ path->m_array[index].code = ART_END;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/GlyphTracerLibart.h b/ksvg/plugin/backends/libart/GlyphTracerLibart.h
new file mode 100644
index 00000000..39b87490
--- /dev/null
+++ b/ksvg/plugin/backends/libart/GlyphTracerLibart.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org>
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef T2P_GLYPHTRACER_LIBART_H
+#define T2P_GLYPHTRACER_LIBART_H
+
+#include "GlyphTracer.h"
+
+// FreeType 2 includes
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+namespace T2P
+{
+ class Glyph;
+ class BezierPath;
+ class GlyphAffinePair;
+
+ class GlyphTracerLibart : public GlyphTracer
+ {
+ public:
+ GlyphTracerLibart();
+ virtual ~GlyphTracerLibart();
+
+ virtual void correctGlyph(GlyphAffinePair *glyphAffine);
+ virtual BezierPath *allocBezierPath(int size);
+ virtual void closePath(Glyph *glyph);
+ };
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.cpp b/ksvg/plugin/backends/libart/LibartCanvas.cpp
new file mode 100644
index 00000000..5697b623
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvas.cpp
@@ -0,0 +1,425 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "LibartCanvas.h"
+#include "SVGMatrixImpl.h"
+#include "SVGRectImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGShapeImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGStringListImpl.h"
+#include "SVGPatternElementImpl.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGLinearGradientElementImpl.h"
+#include "SVGRadialGradientElementImpl.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGTextPositioningElementImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGMaskElementImpl.h"
+
+#include <kdebug.h>
+#include <kglobal.h>
+#include <kgenericfactory.h>
+
+#include "SVGPaint.h"
+
+#include <qdatetime.h>
+#include <qstring.h>
+#include <qimage.h>
+
+#include "KSVGHelper.h"
+#include "KSVGTextChunk.h"
+#include "LibartCanvasItems.h"
+
+#include <libart_lgpl/art_rgb.h>
+#include <libart_lgpl/art_affine.h>
+#include <libart_lgpl/art_alphagamma.h>
+#include <libart_lgpl/art_rgb_svp.h>
+#include <libart_lgpl/art_svp.h>
+#include <libart_lgpl/art_svp_ops.h>
+#include <libart_lgpl/art_svp_intersect.h>
+#include <libart_lgpl/art_rect_svp.h>
+#include <libart_lgpl/art_svp_vpath.h>
+
+#include <libs/art_support/art_misc.h>
+#include <libs/art_support/art_rgba_svp.h>
+
+#include <Font.h>
+#include "BezierPathLibart.h"
+#include "GlyphTracerLibart.h"
+
+#include <fontconfig/fontconfig.h>
+
+ArtSVP *art_svp_from_rect(int x0, int y0, int x1, int y1)
+{
+ ArtVpath vpath[] =
+ {
+ { ART_MOVETO, x0, y0 },
+ { ART_LINETO, x0, y1 },
+ { ART_LINETO, x1, y1 },
+ { ART_LINETO, x1, y0 },
+ { ART_LINETO, x0, y0 },
+ { ART_END, 0, 0}
+ };
+
+ return art_svp_from_vpath(vpath);
+}
+
+ArtSVP *art_svp_from_irect(ArtIRect *bbox)
+{
+ return art_svp_from_rect(bbox->x0, bbox->y0, bbox->x1, bbox->y1);
+}
+
+ArtSVP *art_svp_from_qrect(const QRect& rect)
+{
+ return art_svp_from_rect(rect.left(), rect.top(), rect.right() + 1, rect.bottom() + 1);
+}
+
+using namespace KSVG;
+
+LibartCanvas::LibartCanvas(unsigned int width, unsigned int height) : KSVGCanvas(width, height)
+{
+ m_fontContext = new T2P::Converter(new T2P::GlyphTracerLibart());
+}
+
+T2P::BezierPath *LibartCanvas::toBezierPath(CanvasItem *item) const
+{
+ LibartPath *path = dynamic_cast<LibartPath *>(item);
+ if(!path)
+ return 0;
+
+ // Only handle LibartPath items
+ //T2P::BezierPathLibart *result = new T2P::BezierPathLibart(path->m_array.data());
+ return path;
+}
+
+// drawing primitives
+CanvasItem *LibartCanvas::createRectangle(SVGRectElementImpl *rect)
+{
+ return new LibartRectangle(this, rect);
+}
+
+CanvasItem *LibartCanvas::createEllipse(SVGEllipseElementImpl *ellipse)
+{
+ return new LibartEllipse(this, ellipse);
+}
+
+CanvasItem *LibartCanvas::createCircle(SVGCircleElementImpl *circle)
+{
+ return new LibartCircle(this, circle);
+}
+
+CanvasItem *LibartCanvas::createLine(SVGLineElementImpl *line)
+{
+ return new LibartLine(this, line);
+}
+
+CanvasItem *LibartCanvas::createPolyline(SVGPolylineElementImpl *poly)
+{
+ return new LibartPolyline(this, poly);
+}
+
+CanvasItem *LibartCanvas::createPolygon(SVGPolygonElementImpl *poly)
+{
+ return new LibartPolygon(this, poly);
+}
+
+CanvasItem *LibartCanvas::createPath(SVGPathElementImpl *path)
+{
+ return new LibartPath(this, path);
+}
+
+CanvasItem *LibartCanvas::createClipPath(SVGClipPathElementImpl *clippath)
+{
+ CanvasClipPath *result = new LibartClipPath(this, clippath);
+ QString index = clippath->id().string();
+ m_clipPaths.insert(index, result);
+ return result;
+}
+
+CanvasItem *LibartCanvas::createImage(SVGImageElementImpl *image)
+{
+ return new LibartImage(this, image);
+}
+
+CanvasItem *LibartCanvas::createCanvasMarker(SVGMarkerElementImpl *marker)
+{
+ return new LibartMarker(this, marker);
+}
+
+CanvasItem *LibartCanvas::createText(SVGTextElementImpl *text)
+{
+ return new LibartText(this, text);
+}
+
+CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver)
+{
+ LibartPaintServer *result;
+ if(dynamic_cast<SVGLinearGradientElementImpl *>(pserver))
+ result = new LibartLinearGradient(dynamic_cast<SVGLinearGradientElementImpl *>(pserver));
+ else if(dynamic_cast<SVGRadialGradientElementImpl *>(pserver))
+ result = new LibartRadialGradient(dynamic_cast<SVGRadialGradientElementImpl *>(pserver));
+ else if(dynamic_cast<SVGPatternElementImpl *>(pserver))
+ result = new LibartPattern(dynamic_cast<SVGPatternElementImpl *>(pserver));
+ return result;
+}
+
+void LibartCanvas::drawImage(QImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon)
+{
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(style);
+
+ if(shape)
+ {
+ if(image.depth() != 32)
+ image = image.convertDepth(32);
+
+ ArtSVP *imageBorder = svpFromPolygon(clippingPolygon);
+ ArtSVP *clipSvp = clipSingleSVP(imageBorder, shape);
+
+ ArtDRect bbox;
+ art_drect_svp(&bbox, clipSvp);
+
+ // clamp to viewport
+ int x0 = int(bbox.x0);
+ int y0 = int(bbox.y0);
+
+ // Use inclusive coords for x1/y1 for clipToBuffer
+ int x1 = int(ceil(bbox.x1)) - 1;
+ int y1 = int(ceil(bbox.y1)) - 1;
+
+ if(x0 < int(m_width) && y0 < int(m_height) && x1 >= 0 && y1 >= 0)
+ {
+ clipToBuffer(x0, y0, x1, y1);
+
+ QRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
+
+ QByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+
+ double affine[6];
+ KSVGHelper::matrixToAffine(matrix, affine);
+
+ ksvg_art_rgb_affine_clip(clipSvp, m_buffer + x0 * nrChannels() + y0 * rowStride(), x0, y0, x1 + 1, y1 + 1, rowStride(), nrChannels(), image.bits(), image.width(), image.height(), image.width() * 4, affine, int(style->getOpacity() * 255), (const art_u8 *)mask.data());
+ }
+
+ art_svp_free(imageBorder);
+ art_svp_free(clipSvp);
+ }
+}
+
+ArtSVP *LibartCanvas::clippingRect(const QRect &rect, const SVGMatrixImpl *ctm)
+{
+ ArtVpath *vec = allocVPath(6);
+ // Order of points in clipping rectangle must be counter-clockwise
+ bool flip = ((ctm->a() * ctm->d()) < (ctm->b() * ctm->c()));
+
+ vec[0].code = ART_MOVETO;
+ vec[0].x = rect.x();
+ vec[0].y = rect.y();
+
+ vec[1].code = ART_LINETO;
+ vec[1].x = rect.x() + (flip ? rect.width() : 0);
+ vec[1].y = rect.y() + (flip ? 0 : rect.height());
+
+ vec[2].code = ART_LINETO;
+ vec[2].x = rect.x() + rect.width();
+ vec[2].y = rect.y() + rect.height();
+
+ vec[3].code = ART_LINETO;
+ vec[3].x = rect.x() + (flip ? 0 : rect.width());
+ vec[3].y = rect.y() + (flip ? rect.height() : 0);
+
+ vec[4].code = ART_LINETO;
+ vec[4].x = rect.x();
+ vec[4].y = rect.y();
+
+ vec[5].code = ART_END;
+
+ double affine[6];
+ KSVGHelper::matrixToAffine(ctm, affine);
+
+ ArtVpath *temp = art_vpath_affine_transform(vec, affine);
+ art_free(vec);
+
+ ArtSVP *result = art_svp_from_vpath(temp);
+ art_free(temp);
+ return result;
+}
+
+ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
+{
+ ArtSVP *clippedSvp = copy_svp(svp);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape);
+
+ if(style)
+ {
+ QString clipPathRef = style->getClipPath();
+
+ if(!clipPathRef.isEmpty())
+ {
+ CanvasClipPath *clipPath = m_clipPaths[clipPathRef];
+
+ if(clipPath)
+ {
+ LibartClipPath *lclip = dynamic_cast<LibartClipPath *>(clipPath);
+ reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(shape);
+
+ lclip->init();
+
+ if(lclip->clipSVP())
+ {
+ ArtSVP *s = art_svp_intersect(lclip->clipSVP(), clippedSvp);
+ art_svp_free(clippedSvp);
+ clippedSvp = s;
+ }
+ }
+ }
+ }
+
+ SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(shape);
+
+ // Clip outer svg, unless width and height not set
+ if(svg && (!svg->isRootElement() || !svg->getAttribute("width").isEmpty() || !svg->getAttribute("height").isEmpty()) && !svg->getOverflow())
+ {
+ ArtSVP *svgClip = clippingRect(svg->clip(), svg->screenCTM());
+ ArtSVP *s = art_svp_intersect(svgClip, clippedSvp);
+ art_svp_free(clippedSvp);
+ art_svp_free(svgClip);
+ clippedSvp = s;
+ }
+
+ if(dynamic_cast<SVGPatternElementImpl *>(shape) != 0)
+ {
+ // TODO: inherit clipping paths into tile space
+ }
+ else if(dynamic_cast<SVGMarkerElementImpl *>(shape) != 0)
+ {
+ SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(shape);
+
+ if(!marker->clipShape().isEmpty())
+ {
+ ArtSVP *clipShape = svpFromPolygon(marker->clipShape());
+ ArtSVP *s = art_svp_intersect(clipShape, clippedSvp);
+ art_svp_free(clipShape);
+ art_svp_free(clippedSvp);
+ clippedSvp = s;
+ }
+
+ // TODO: inherit clipping paths into marker space
+ }
+ else
+ {
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(shape);
+ DOM::Node parentNode = element->parentNode();
+
+ if(!parentNode.isNull())
+ {
+ SVGElementImpl *parent = element->ownerDoc()->getElementFromHandle(parentNode.handle());
+
+ if(parent)
+ {
+ SVGShapeImpl *parentShape = dynamic_cast<SVGShapeImpl *>(parent);
+
+ if(parentShape)
+ {
+ // Clip against ancestor clipping paths
+ ArtSVP *parentClippedSvp = clipSingleSVP(clippedSvp, parentShape);
+ art_svp_free(clippedSvp);
+ clippedSvp = parentClippedSvp;
+ }
+ }
+ }
+ }
+
+ return clippedSvp;
+}
+
+void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, QByteArray mask, QRect screenBBox)
+{
+ int x0 = screenBBox.left();
+ int y0 = screenBBox.top();
+ int x1 = screenBBox.right();
+ int y1 = screenBBox.bottom();
+
+ if(m_nrChannels == 3)
+ {
+ if(mask.data())
+ art_ksvg_rgb_svp_alpha_mask(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0, (art_u8 *)mask.data());
+ else
+ art_rgb_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0);
+ }
+ else
+ art_ksvg_rgba_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 4 + y0 * 4 * m_width, m_width * 4, 0, (art_u8 *)mask.data());
+}
+
+ArtSVP *LibartCanvas::copy_svp(const ArtSVP *svp)
+{
+ // No API to copy an SVP so do so without accessing the data structure directly.
+ ArtVpath *vec = allocVPath(1);
+
+ vec[0].code = ART_END;
+
+ ArtSVP *empty = art_svp_from_vpath(vec);
+ art_free(vec);
+
+ ArtSVP *result = art_svp_union(empty, svp);
+ art_svp_free(empty);
+
+ return result;
+}
+
+ArtSVP *LibartCanvas::svpFromPolygon(const KSVGPolygon& polygon)
+{
+ if(polygon.numPoints() > 2)
+ {
+ ArtVpath *points = new ArtVpath[polygon.numPoints() + 2];
+
+ points[0].code = ART_MOVETO;
+ points[0].x = polygon.point(0).x();
+ points[0].y = polygon.point(0).y();
+
+ unsigned int i;
+
+ for(i = 1; i < polygon.numPoints(); i++)
+ {
+ points[i].code = ART_LINETO;
+ points[i].x = polygon.point(i).x();
+ points[i].y = polygon.point(i).y();
+ }
+
+ points[i].code = ART_LINETO;
+ points[i].x = polygon.point(0).x();
+ points[i].y = polygon.point(0).y();
+
+ points[i + 1].code = ART_END;
+
+ ArtSVP *svp = art_svp_from_vpath(points);
+ delete [] points;
+
+ return svp;
+ }
+ else
+ return 0;
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.h b/ksvg/plugin/backends/libart/LibartCanvas.h
new file mode 100644
index 00000000..e0da1682
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvas.h
@@ -0,0 +1,84 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LIBARTCANVAS_H
+#define LIBARTCANVAS_H
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+#include <libart_lgpl/art_svp.h>
+#include <libart_lgpl/art_vpath.h>
+#include <libart_lgpl/art_config.h>
+
+#include <Glyph.h>
+#include <Converter.h>
+#include "GlyphTracerLibart.h"
+
+class QString;
+class QImage;
+
+struct _ArtSVP;
+
+namespace KSVG
+{
+
+class LibartPaintServer;
+class SVGElementImpl;
+class SVGStylableImpl;
+class SVGSVGElementImpl;
+class KSVGPolygon;
+class LibartCanvas : public KSVGCanvas
+{
+public:
+ LibartCanvas(unsigned int width, unsigned int height);
+
+ void drawSVP(_ArtSVP *svp, art_u32 color, QByteArray mask, QRect screenBBox);
+ void drawImage(QImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon);
+
+ virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const;
+
+ // creating canvas items
+ virtual CanvasItem *createRectangle(SVGRectElementImpl *rect);
+ virtual CanvasItem *createEllipse(SVGEllipseElementImpl *ellipse);
+ virtual CanvasItem *createCircle(SVGCircleElementImpl *circle);
+ virtual CanvasItem *createLine(SVGLineElementImpl *line);
+ virtual CanvasItem *createPolyline(SVGPolylineElementImpl *poly);
+ virtual CanvasItem *createPolygon(SVGPolygonElementImpl *poly);
+ virtual CanvasItem *createPath(SVGPathElementImpl *path);
+ virtual CanvasItem *createClipPath(SVGClipPathElementImpl *clippath);
+ virtual CanvasItem *createImage(SVGImageElementImpl *image);
+ virtual CanvasItem *createCanvasMarker(SVGMarkerElementImpl *marker);
+ virtual CanvasItem *createText(SVGTextElementImpl *text);
+ virtual CanvasPaintServer *createPaintServer(SVGElementImpl *pserver);
+
+ _ArtSVP *clippingRect(const QRect &rect, const SVGMatrixImpl *ctm);
+ _ArtSVP *svpFromPolygon(const KSVGPolygon& polygon);
+
+ static ArtSVP *copy_svp(const ArtSVP *svp);
+
+ _ArtSVP *clipSingleSVP(_ArtSVP *svp, SVGShapeImpl *clipShape);
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp b/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp
new file mode 100644
index 00000000..48d37f05
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kdebug.h>
+
+#include "LibartCanvas.h"
+#include "LibartCanvasFactory.h"
+
+using namespace KSVG;
+
+K_EXPORT_COMPONENT_FACTORY(libksvgrendererlibart, LibartCanvasFactory)
+
+LibartCanvasFactory::LibartCanvasFactory()
+{
+}
+
+LibartCanvasFactory::~LibartCanvasFactory()
+{
+}
+
+QObject *LibartCanvasFactory::createObject(QObject *, const char *, const char *, const QStringList &args)
+{
+ int width = (*args.at(1)).toInt();
+ int height = (*args.at(0)).toInt();
+ return new LibartCanvas(width, height);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.h b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
new file mode 100644
index 00000000..5b3ed0b3
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LIBARTCANVASFACTORY_H
+#define LIBARTCANVASFACTORY_H
+
+#include <klibloader.h>
+
+#include "CanvasItem.h"
+#include "KSVGCanvas.h"
+
+namespace KSVG
+{
+
+class LibartCanvasFactory : public KLibFactory
+{
+public:
+ LibartCanvasFactory();
+ virtual ~LibartCanvasFactory();
+
+ virtual QObject *createObject(QObject *parent = 0, const char *pname = 0, const char *name = "QObject", const QStringList &args = QStringList());
+};
+
+}
+
+#endif
+
+/// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
new file mode 100644
index 00000000..5dd97be1
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
@@ -0,0 +1,2209 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <cfloat>
+
+#include <qimage.h>
+#include <qwmatrix.h>
+
+#include "SVGPaint.h"
+#include "SVGRectImpl.h"
+#include "SVGAngleImpl.h"
+#include "SVGPaintImpl.h"
+#include "SVGUnitTypes.h"
+#include "SVGHelperImpl.h"
+#include "SVGDocumentImpl.h"
+#include "SVGPointListImpl.h"
+#include "SVGMarkerElement.h"
+#include "SVGMarkerElementImpl.h"
+#include "SVGSVGElementImpl.h"
+#include "SVGPathSegListImpl.h"
+#include "SVGAnimatedRectImpl.h"
+#include "SVGAnimatedStringImpl.h"
+#include "SVGImageElementImpl.h"
+#include "SVGAnimatedAngleImpl.h"
+#include "SVGAnimatedLengthImpl.h"
+#include "SVGPolygonElementImpl.h"
+#include "SVGClipPathElementImpl.h"
+#include "SVGPolylineElementImpl.h"
+#include "SVGAnimatedLengthListImpl.h"
+#include "SVGAnimatedNumberImpl.h"
+#include "SVGAnimatedEnumerationImpl.h"
+#include "SVGPreserveAspectRatioImpl.h"
+#include "SVGAnimatedPreserveAspectRatioImpl.h"
+#include "SVGGradientElementImpl.h"
+#include "SVGGradientElement.h"
+#include "SVGLinearGradientElementImpl.h"
+#include "SVGRadialGradientElementImpl.h"
+#include "SVGPatternElementImpl.h"
+#include "SVGPatternElement.h"
+#include "SVGStopElementImpl.h"
+#include "SVGStylableImpl.h"
+#include "SVGAnimatedTransformListImpl.h"
+#include "SVGTransformListImpl.h"
+#include "SVGUnitConverter.h"
+#include "SVGTextPathElementImpl.h"
+#include "SVGMaskElementImpl.h"
+
+#include "KSVGHelper.h"
+#include "LibartCanvasItems.h"
+#include "KSVGTextChunk.h"
+
+#include "art_misc.h"
+#include "art_render_misc.h"
+#include "BezierPathLibart.h"
+#include "Point.h"
+
+#include <dom/dom_node.h>
+
+
+#include <libart_lgpl/art_vpath.h>
+#include <libart_lgpl/art_bpath.h>
+#include <libart_lgpl/art_affine.h>
+#include <libart_lgpl/art_svp_ops.h>
+#include <libart_lgpl/art_svp_point.h>
+#include <libart_lgpl/art_vpath_svp.h>
+#include <libart_lgpl/art_svp_intersect.h>
+#include <libart_lgpl/art_svp_vpath.h>
+#include <libart_lgpl/art_svp_vpath_stroke.h>
+#include <libart_lgpl/art_rect_svp.h>
+#include <libart_lgpl/art_vpath_dash.h>
+#include <libart_lgpl/art_render.h>
+#include <libart_lgpl/art_rect_svp.h>
+#include <libart_lgpl/art_render_gradient.h>
+#include <libart_lgpl/art_render_svp.h>
+#include <libart_lgpl/art_render_mask.h>
+
+using namespace KSVG;
+
+LibartShape::LibartShape(LibartCanvas *c, SVGStylableImpl *style) : m_canvas(c), m_style(style)
+{
+ m_fillSVP = 0;
+ m_strokeSVP = 0;
+ m_fillPainter = 0;
+ m_strokePainter = 0;
+}
+
+LibartShape::~LibartShape()
+{
+ freeSVPs();
+ delete m_fillPainter;
+ delete m_strokePainter;
+}
+
+QRect LibartShape::bbox() const
+{
+ QRect rect;
+ if(m_strokeSVP || m_fillSVP)
+ {
+ ArtIRect *irect = new ArtIRect();
+ ArtVpath *vpath = art_vpath_from_svp(m_strokeSVP ? m_strokeSVP : m_fillSVP);
+ art_vpath_bbox_irect(vpath, irect);
+ art_free(vpath);
+
+ rect.setX(irect->x0);
+ rect.setY(irect->y0);
+ rect.setWidth(irect->x1 - irect->x0);
+ rect.setHeight(irect->y1 - irect->y0);
+
+ delete irect;
+ }
+
+ return rect;
+}
+
+bool LibartShape::isVisible(SVGShapeImpl *shape)
+{
+ return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
+}
+
+bool LibartShape::fillContains(const QPoint &p)
+{
+ if(m_fillSVP)
+ return art_svp_point_wind(m_fillSVP, p.x(), p.y()) != 0;
+ else
+ return false;
+}
+
+bool LibartShape::strokeContains(const QPoint &p)
+{
+ if(m_strokeSVP)
+ return art_svp_point_wind(m_strokeSVP, p.x(), p.y()) != 0;
+ else
+ return false;
+}
+
+void LibartShape::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(reason == UPDATE_STYLE)
+ {
+ if(!m_fillPainter || !m_strokePainter)
+ LibartShape::init();
+ if(m_fillPainter)
+ m_fillPainter->update(m_style);
+ if(m_strokePainter)
+ m_strokePainter->update(m_style);
+ m_canvas->invalidate(this, false);
+ }
+ else if(reason == UPDATE_TRANSFORM)
+ {
+ reset();
+ m_canvas->invalidate(this, true);
+ }
+ else if(reason == UPDATE_ZOOM)
+ reset();
+ else if(reason == UPDATE_PAN)
+ {
+ if(m_fillSVP)
+ ksvg_art_svp_move(m_fillSVP, param1, param2);
+ if(m_strokeSVP)
+ ksvg_art_svp_move(m_strokeSVP, param1, param2);
+ }
+ else if(reason == UPDATE_LINEWIDTH)
+ {
+ if(m_strokeSVP)
+ {
+ art_svp_free(m_strokeSVP);
+ m_strokeSVP = 0;
+ }
+ init();
+ m_canvas->invalidate(this, true);
+ }
+}
+
+void LibartShape::draw(SVGShapeImpl *shape)
+{
+ if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
+ return;
+
+ bool fillOk = m_fillSVP && m_style->isFilled();
+ bool strokeOk = m_strokeSVP && m_style->isStroked() && m_style->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted.
+
+ if(fillOk || strokeOk)
+ {
+ if(m_fillPainter && m_fillSVP)
+ m_fillPainter->draw(m_canvas, m_fillSVP, m_style, shape);
+
+ if(m_strokePainter && m_strokeSVP)
+ m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, shape);
+ }
+}
+
+void LibartShape::init(const SVGMatrixImpl *)
+{
+}
+
+void LibartPainter::update(SVGStylableImpl *style)
+{
+ if(paintType(style) != SVG_PAINTTYPE_URI)
+ {
+ QColor qcolor;
+ if(paintType(style) == SVG_PAINTTYPE_CURRENTCOLOR)
+ qcolor = style->getColor()->rgbColor().color();
+ else
+ qcolor = color(style);
+
+ short _opacity = static_cast<short>(opacity(style) * 255 + 0.5);
+
+ // Spec: clamping
+ _opacity = _opacity < 0 ? 0 : _opacity;
+ _opacity = _opacity > 255 ? 255 : _opacity;
+
+ m_color = KSVGHelper::toArtColor(qcolor, _opacity);
+ }
+}
+
+void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape)
+{
+ ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, shape);
+
+ // Clipping
+ ArtDRect bbox;
+ art_drect_svp(&bbox, clippedSvp);
+
+ // clamp to viewport
+ int x0 = int(bbox.x0);
+ int y0 = int(bbox.y0);
+
+ // Use inclusive coords for x1/y1 for clipToBuffer
+ int x1 = int(ceil(bbox.x1)) - 1;
+ int y1 = int(ceil(bbox.y1)) - 1;
+
+ if(x0 < int(canvas->width()) && y0 < int(canvas->height()) && x1 > -1 && y1 > -1)
+ {
+ canvas->clipToBuffer(x0, y0, x1, y1);
+
+ QRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
+
+ QByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+
+ if(paintType(style) == SVG_PAINTTYPE_URI)
+ {
+ LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), paintUri(style)));
+
+ if(pserver)
+ {
+ pserver->setBBoxTarget(shape);
+ if(!pserver->finalized())
+ pserver->finalizePaintServer();
+ pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox);
+ }
+ }
+ else
+ canvas->drawSVP(clippedSvp, m_color, mask, screenBBox);
+ }
+
+ art_svp_free(clippedSvp);
+}
+
+LibartStrokePainter::LibartStrokePainter(SVGStylableImpl *style)
+{
+ update(style);
+}
+
+LibartFillPainter::LibartFillPainter(SVGStylableImpl *style)
+{
+ update(style);
+}
+
+void LibartShape::init()
+{
+ if(m_style->isFilled())
+ {
+ if(m_fillPainter == 0)
+ m_fillPainter = new LibartFillPainter(m_style);
+ }
+ else
+ {
+ delete m_fillPainter;
+ m_fillPainter = 0;
+ }
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(m_style->isStroked() && m_style->getStrokeWidth()->baseVal()->value() > 0)
+ {
+ if(m_strokePainter == 0)
+ m_strokePainter = new LibartStrokePainter(m_style);
+ }
+ else
+ {
+ delete m_strokePainter;
+ m_strokePainter = 0;
+ }
+}
+
+void LibartShape::initClipItem()
+{
+ init();
+}
+
+ArtSVP *LibartShape::clipSVP()
+{
+ return m_fillSVP;
+}
+
+void LibartShape::freeSVPs()
+{
+ if(m_fillSVP)
+ art_svp_free(m_fillSVP);
+ if(m_strokeSVP)
+ art_svp_free(m_strokeSVP);
+
+ m_fillSVP = 0;
+ m_strokeSVP = 0;
+}
+
+void LibartShape::calcClipSVP(ArtVpath *vec, SVGStylableImpl *style, const SVGMatrixImpl *matrix, _ArtSVP **clipSVP)
+{
+ double affine[6];
+ KSVGHelper::matrixToAffine(matrix, affine);
+
+ if(!style)
+ {
+ art_free(vec);
+ return;
+ }
+
+ ArtVpath *vtemp = art_vpath_affine_transform(vec, affine);
+ art_free(vec);
+ vec = vtemp;
+
+ ArtSVP *temp;
+ ArtSvpWriter *swr;
+ temp = art_svp_from_vpath(vec);
+
+ if(style->getClipRule() == RULE_EVENODD)
+ swr = art_svp_writer_rewind_new(ART_WIND_RULE_ODDEVEN);
+ else
+ swr = art_svp_writer_rewind_new(ART_WIND_RULE_NONZERO);
+
+ art_svp_intersector(temp, swr);
+ *clipSVP = art_svp_writer_rewind_reap(swr);
+
+ art_svp_free(temp);
+ art_free(vec);
+}
+
+void LibartShape::calcSVPs(ArtVpath *vec, SVGStylableImpl *style, const SVGMatrixImpl *matrix, ArtSVP **strokeSVP, ArtSVP **fillSVP)
+{
+ if(style)
+ {
+ double affine[6];
+ KSVGHelper::matrixToAffine(matrix, affine);
+
+ ArtVpath *temp = art_vpath_affine_transform(vec, affine);
+ art_free(vec);
+ vec = temp;
+ calcSVPInternal(vec, style, affine, strokeSVP, fillSVP);
+ }
+ else
+ art_free(vec);
+}
+
+void LibartShape::calcSVPs(ArtBpath *bpath, SVGStylableImpl *style, const SVGMatrixImpl *matrix, ArtSVP **strokeSVP, ArtSVP **fillSVP)
+{
+ if(style)
+ {
+ double affine[6];
+ KSVGHelper::matrixToAffine(matrix, affine);
+
+ ArtBpath *temp = art_bpath_affine_transform(bpath, affine);
+ ArtVpath *vec = ksvg_art_bez_path_to_vec(temp, 0.25);
+ art_free(temp);
+ calcSVPInternal(vec, style, affine, strokeSVP, fillSVP);
+ }
+}
+
+void LibartShape::calcSVPInternal(ArtVpath *vec, SVGStylableImpl *style, double *affine, ArtSVP **strokeSVP, ArtSVP **fillSVP)
+{
+ ArtSVP *svp;
+
+ // Filling
+ {
+ ArtSvpWriter *swr;
+ ArtSVP *temp;
+ temp = art_svp_from_vpath(vec);
+
+ if(style->getFillRule() == RULE_EVENODD)
+ swr = art_svp_writer_rewind_new(ART_WIND_RULE_ODDEVEN);
+ else
+ swr = art_svp_writer_rewind_new(ART_WIND_RULE_NONZERO);
+
+ art_svp_intersector(temp, swr);
+ svp = art_svp_writer_rewind_reap(swr);
+
+ *fillSVP = svp;
+ art_svp_free(temp);
+ }
+
+ // Stroking
+ if(style->isStroked() || style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI)
+ {
+ double ratio = art_affine_expansion(affine);
+
+ unsigned int dashLength;
+ if(style->getDashArray() && (dashLength = style->getDashArray()->baseVal()->numberOfItems()) > 0)
+ {
+ // HACK: libart will hang in art_vpath_dash() if passed an array with only zeroes.
+ bool allZeroes = true;
+
+ // there are dashes to be rendered
+ ArtVpathDash dash;
+ dash.offset = int(style->getDashOffset()->baseVal()->value()) * ratio;
+ dash.n_dash = dashLength;
+ double *dashes = new double[dashLength];
+ for(unsigned int i = 0; i < dashLength; i++)
+ {
+ dashes[i] = style->getDashArray()->baseVal()->getItem(i)->value() * ratio;
+ if(dashes[i] != 0.0)
+ allZeroes = false;
+ }
+ dash.dash = dashes;
+
+ if(!allZeroes)
+ {
+ // get the dashed VPath and use that for the stroke render operation
+ ArtVpath *vec2 = art_vpath_dash(vec, &dash);
+ art_free(vec);
+ vec = vec2;
+ }
+
+ // reset the dashes
+ delete [] dashes;
+ }
+
+ double penWidth = style->getStrokeWidth()->baseVal()->value() * ratio;
+ svp = art_svp_vpath_stroke(vec, (ArtPathStrokeJoinType)style->getJoinStyle(), (ArtPathStrokeCapType)style->getCapStyle(), penWidth, style->getStrokeMiterlimit(), 0.25);
+
+ *strokeSVP = svp;
+ }
+ art_free(vec);
+}
+
+// #####
+
+LibartRectangle::LibartRectangle(LibartCanvas *c, SVGRectElementImpl *rect)
+: LibartShape(c, rect), m_rect(rect)
+{
+ init();
+}
+
+void LibartRectangle::draw()
+{
+ if(isVisible())
+ LibartShape::draw(m_rect);
+}
+
+bool LibartRectangle::isVisible()
+{
+ // Spec: a value of zero disables rendering
+ return LibartShape::isVisible(m_rect) && m_rect->width()->baseVal()->value() > 0 && m_rect->height()->baseVal()->value() > 0;
+}
+
+void LibartRectangle::init()
+{
+ init(m_rect->screenCTM());
+}
+
+void LibartRectangle::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ double x = m_rect->x()->baseVal()->value();
+ double y = m_rect->y()->baseVal()->value();
+ double width = m_rect->width()->baseVal()->value();
+ double height = m_rect->height()->baseVal()->value();
+ double rx = m_rect->rx()->baseVal()->value();
+ double ry = m_rect->ry()->baseVal()->value();
+
+ // Spec: If there is no rx or ry specified, draw a normal rect
+ if(rx == -1 && ry == -1)
+ {
+ ArtVpath *vec = allocVPath(6);
+
+ vec[0].code = ART_MOVETO;
+ vec[0].x = x;
+ vec[0].y = y;
+
+ vec[1].code = ART_LINETO;
+ vec[1].x = x;
+ vec[1].y = y + height;
+
+ vec[2].code = ART_LINETO;
+ vec[2].x = x + width;
+ vec[2].y = y + height;
+
+ vec[3].code = ART_LINETO;
+ vec[3].x = x + width;
+ vec[3].y = y;
+
+ vec[4].code = ART_LINETO;
+ vec[4].x = x;
+ vec[4].y = y;
+
+ vec[5].code = ART_END;
+
+ if(m_context == NORMAL)
+ calcSVPs(vec, m_rect, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(vec, m_rect, screenCTM, &m_fillSVP);
+ }
+ else
+ {
+ ArtVpath *res;
+ ArtBpath *vec = allocBPath(10);
+
+ int i = 0;
+
+ // Spec: If rx isn't specified, but ry, set rx to ry
+ if(rx == -1)
+ rx = ry;
+
+ // Spec: If ry isn't specified, but rx, set ry to rx
+ if(ry == -1)
+ ry = rx;
+
+ // Spec: If rx is greater than half of the width of the rectangle
+ // then set rx to half of the width
+ if(rx > width / 2)
+ rx = width / 2;
+
+ // Spec: If ry is greater than half of the height of the rectangle
+ // then set ry to half of the height
+ if(ry > height / 2)
+ ry = height / 2;
+
+ vec[i].code = ART_MOVETO_OPEN;
+ vec[i].x3 = x + rx;
+ vec[i].y3 = y;
+
+ i++;
+
+ vec[i].code = ART_CURVETO;
+ vec[i].x1 = x + rx * (1 - 0.552);
+ vec[i].y1 = y;
+ vec[i].x2 = x;
+ vec[i].y2 = y + ry * (1 - 0.552);
+ vec[i].x3 = x;
+ vec[i].y3 = y + ry;
+
+ i++;
+
+ if(ry < height / 2)
+ {
+ vec[i].code = ART_LINETO;
+ vec[i].x3 = x;
+ vec[i].y3 = y + height - ry;
+
+ i++;
+ }
+ vec[i].code = ART_CURVETO;
+ vec[i].x1 = x;
+ vec[i].y1 = y + height - ry * (1 - 0.552);
+ vec[i].x2 = x + rx * (1 - 0.552);
+ vec[i].y2 = y + height;
+ vec[i].x3 = x + rx;
+ vec[i].y3 = y + height;
+
+ i++;
+
+ if(rx < width / 2)
+ {
+ vec[i].code = ART_LINETO;
+ vec[i].x3 = x + width - rx;
+ vec[i].y3 = y + height;
+
+ i++;
+ }
+
+ vec[i].code = ART_CURVETO;
+ vec[i].x1 = x + width - rx * (1 - 0.552);
+ vec[i].y1 = y + height;
+ vec[i].x2 = x + width;
+ vec[i].y2 = y + height - ry * (1 - 0.552);
+ vec[i].x3 = x + width;
+
+ vec[i].y3 = y + height - ry;
+
+ i++;
+
+ if(ry < height / 2)
+ {
+ vec[i].code = ART_LINETO;
+ vec[i].x3 = x + width;
+ vec[i].y3 = y + ry;
+
+ i++;
+ }
+ vec[i].code = ART_CURVETO;
+ vec[i].x1 = x + width;
+ vec[i].y1 = y + ry * (1 - 0.552);
+ vec[i].x2 = x + width - rx * (1 - 0.552);
+ vec[i].y2 = y;
+ vec[i].x3 = x + width - rx;
+ vec[i].y3 = y;
+
+ i++;
+
+ if(rx < width / 2)
+ {
+ vec[i].code = ART_LINETO;
+ vec[i].x3 = x + rx;
+ vec[i].y3 = y;
+
+ i++;
+ }
+
+ vec[i].code = ART_END;
+
+ res = ksvg_art_bez_path_to_vec(vec, 0.25);
+ if(m_context == NORMAL)
+ calcSVPs(res, m_rect, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(res, m_rect, screenCTM, &m_fillSVP);
+ art_free(vec);
+ }
+}
+
+// #####
+
+LibartEllipse::LibartEllipse(LibartCanvas *c, SVGEllipseElementImpl *ellipse)
+: LibartShape(c, ellipse), m_ellipse(ellipse)
+{
+ init();
+}
+
+void LibartEllipse::draw()
+{
+ if(isVisible())
+ LibartShape::draw(m_ellipse);
+}
+
+bool LibartEllipse::isVisible()
+{
+ // Spec: dont render when rx and/or ry is zero
+ return LibartShape::isVisible(m_ellipse) && m_ellipse->rx()->baseVal()->value() > 0 && m_ellipse->ry()->baseVal()->value() > 0;
+}
+
+void LibartEllipse::init()
+{
+ init(m_ellipse->screenCTM());
+}
+
+void LibartEllipse::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ ArtBpath *temp = allocBPath(6);
+
+ double x1, y1, x2, y2, x3, y3;
+ double len = 0.55228474983079356;
+ double rx = m_ellipse->rx()->baseVal()->value();
+ double ry = m_ellipse->ry()->baseVal()->value();
+ double cx = m_ellipse->cx()->baseVal()->value();
+ double cy = m_ellipse->cy()->baseVal()->value();
+ double cos4[] = {1.0, 0.0, -1.0, 0.0, 1.0};
+ double sin4[] = {0.0, 1.0, 0.0, -1.0, 0.0};
+ int i = 0;
+
+ temp[i].code = ART_MOVETO;
+ temp[i].x3 = cx + rx;
+ temp[i].y3 = cy;
+
+ i++;
+
+ while(i < 5)
+ {
+ x1 = cos4[i-1] + len * cos4[i];
+ y1 = sin4[i-1] + len * sin4[i];
+ x2 = cos4[i] + len * cos4[i-1];
+ y2 = sin4[i] + len * sin4[i-1];
+ x3 = cos4[i];
+ y3 = sin4[i];
+
+ temp[i].code = ART_CURVETO;
+ temp[i].x1 = cx + x1 * rx;
+ temp[i].y1 = cy + y1 * ry;
+ temp[i].x2 = cx + x2 * rx;
+ temp[i].y2 = cy + y2 * ry;
+ temp[i].x3 = cx + x3 * rx;
+ temp[i].y3 = cy + y3 * ry;
+
+ i++;
+ }
+
+ temp[i].code = ART_END;
+
+ if(m_context == NORMAL)
+ calcSVPs(temp, m_ellipse, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(ksvg_art_bez_path_to_vec(temp, 0.25), m_ellipse, screenCTM, &m_fillSVP);
+ art_free(temp);
+}
+
+// #####
+
+LibartCircle::LibartCircle(LibartCanvas *c, SVGCircleElementImpl *circle)
+: LibartShape(c, circle), m_circle(circle)
+{
+ init();
+}
+
+void LibartCircle::draw()
+{
+ // Spec: a value of zero disables rendering
+ if(isVisible())
+ LibartShape::draw(m_circle);
+}
+
+bool LibartCircle::isVisible()
+{
+ // Spec: dont render when rx and/or ry is zero
+ return LibartShape::isVisible(m_circle) && m_circle->r()->baseVal()->value() > 0;
+}
+
+void LibartCircle::init()
+{
+ init(m_circle->screenCTM());
+}
+
+void LibartCircle::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ ArtBpath *temp = allocBPath(6);
+
+ double x1, y1, x2, y2, x3, y3;
+ double len = 0.55228474983079356;
+ double r = m_circle->r()->baseVal()->value();
+ double cx = m_circle->cx()->baseVal()->value();
+ double cy = m_circle->cy()->baseVal()->value();
+ double cos4[] = {1.0, 0.0, -1.0, 0.0, 1.0};
+ double sin4[] = {0.0, 1.0, 0.0, -1.0, 0.0};
+ int i = 0;
+
+ temp[i].code = ART_MOVETO;
+ temp[i].x3 = cx + r;
+ temp[i].y3 = cy;
+
+ i++;
+
+ while(i < 5)
+ {
+ x1 = cos4[i-1] + len * cos4[i];
+ y1 = sin4[i-1] + len * sin4[i];
+ x2 = cos4[i] + len * cos4[i-1];
+ y2 = sin4[i] + len * sin4[i-1];
+ x3 = cos4[i];
+ y3 = sin4[i];
+
+ temp[i].code = ART_CURVETO;
+ temp[i].x1 = cx + x1 * r;
+ temp[i].y1 = cy + y1 * r;
+ temp[i].x2 = cx + x2 * r;
+ temp[i].y2 = cy + y2 * r;
+ temp[i].x3 = cx + x3 * r;
+ temp[i].y3 = cy + y3 * r;
+
+ i++;
+ }
+
+ temp[i].code = ART_END;
+
+ if(m_context == NORMAL)
+ calcSVPs(temp, m_circle, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(ksvg_art_bez_path_to_vec(temp, 0.25), m_circle, screenCTM, &m_fillSVP);
+ art_free(temp);
+}
+
+// #####
+
+LibartLine::LibartLine(LibartCanvas *c, SVGLineElementImpl *line)
+: LibartShape(c, line), MarkerHelper(), m_line(line)
+{
+ init();
+}
+
+LibartLine::~LibartLine()
+{
+}
+
+void LibartLine::draw()
+{
+ LibartShape::draw(m_line);
+
+ if(m_line->hasMarkers())
+ {
+ double x1 = m_line->x1()->baseVal()->value();
+ double y1 = m_line->y1()->baseVal()->value();
+ double x2 = m_line->x2()->baseVal()->value();
+ double y2 = m_line->y2()->baseVal()->value();
+ double slope = SVGAngleImpl::todeg(atan2(y2 - y1, x2 - x1));
+
+ if(m_line->hasStartMarker())
+ doStartMarker(m_line, m_line, x1, y1, slope);
+ if(m_line->hasEndMarker())
+ doEndMarker(m_line, m_line, x2, y2, slope);
+ }
+}
+
+bool LibartLine::isVisible()
+{
+ return LibartShape::isVisible(m_line);
+}
+
+void LibartLine::init()
+{
+ init(m_line->screenCTM());
+}
+
+void LibartLine::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ ArtVpath *vec;
+
+ vec = allocVPath(3);
+
+ vec[0].code = ART_MOVETO_OPEN;
+ vec[0].x = m_line->x1()->baseVal()->value();
+ vec[0].y = m_line->y1()->baseVal()->value();
+
+ vec[1].code = ART_LINETO;
+ vec[1].x = m_line->x2()->baseVal()->value();
+ vec[1].y = m_line->y2()->baseVal()->value();
+
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ if(vec[1].x == vec[0].x && vec[1].y == vec[0].y && m_line->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ vec[1].x += .5;
+
+ vec[2].code = ART_END;
+
+ if(m_context == NORMAL)
+ {
+ calcSVPs(vec, m_line, screenCTM, &m_strokeSVP, &m_fillSVP);
+ art_svp_free(m_fillSVP);
+ m_fillSVP = 0;
+ }
+ else
+ calcClipSVP(vec, m_line, screenCTM, &m_fillSVP);
+}
+
+// #####
+LibartPoly::LibartPoly(LibartCanvas *c, SVGPolyElementImpl *poly)
+: LibartShape(c, poly), MarkerHelper(), m_poly(poly)
+{
+}
+
+LibartPoly::~LibartPoly()
+{
+}
+
+void LibartPoly::init()
+{
+ init(m_poly->screenCTM());
+}
+
+void LibartPoly::draw()
+{
+ LibartShape::draw(m_poly);
+
+ if(m_poly->hasMarkers())
+ m_poly->drawMarkers();
+}
+
+bool LibartPoly::isVisible()
+{
+ return LibartShape::isVisible(m_poly);
+}
+
+// #####
+LibartPolyline::LibartPolyline(LibartCanvas *c, SVGPolylineElementImpl *poly)
+: LibartPoly(c, poly)
+{
+ LibartPoly::init();
+}
+
+LibartPolyline::~LibartPolyline()
+{
+}
+
+void LibartPolyline::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ unsigned int numberOfPoints = m_poly->points()->numberOfItems();
+
+ if(numberOfPoints < 1)
+ return;
+
+ ArtVpath *polyline = allocVPath(2 + numberOfPoints);
+
+ polyline[0].code = ART_MOVETO_OPEN;
+ polyline[0].x = m_poly->points()->getItem(0)->x();
+ polyline[0].y = m_poly->points()->getItem(0)->y();
+
+ unsigned int index;
+ for(index = 1; index < numberOfPoints; index++)
+ {
+ polyline[index].code = ART_LINETO;
+ polyline[index].x = m_poly->points()->getItem(index)->x();
+ polyline[index].y = m_poly->points()->getItem(index)->y();
+ }
+
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ if(numberOfPoints == 2 && polyline[1].x == polyline[0].x && polyline[1].y == polyline[0].y && m_poly->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ polyline[1].x += .5;
+
+
+ if(m_poly->isFilled()) // if the polyline must be filled, inform libart that it should not be closed.
+ {
+ polyline[index].code = (ArtPathcode) ART_END2;
+ polyline[index].x = m_poly->points()->getItem(0)->x();
+ polyline[index++].y = m_poly->points()->getItem(0)->y();
+ }
+
+ polyline[index].code = ART_END;
+ if(m_context == NORMAL)
+ calcSVPs(polyline, m_poly, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(polyline, m_poly, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+LibartPolygon::LibartPolygon(LibartCanvas *c, SVGPolygonElementImpl *poly)
+: LibartPoly(c, poly)
+{
+ LibartPoly::init();
+}
+
+LibartPolygon::~LibartPolygon()
+{
+}
+
+void LibartPolygon::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ unsigned int numberOfPoints = m_poly->points()->numberOfItems();
+
+ if(numberOfPoints < 1)
+ return;
+
+ ArtVpath *polygon = allocVPath(2 + numberOfPoints);
+
+ polygon[0].code = ART_MOVETO;
+ polygon[0].x = m_poly->points()->getItem(0)->x();
+ polygon[0].y = m_poly->points()->getItem(0)->y();
+
+ unsigned int index;
+ for(index = 1; index < numberOfPoints; index++)
+ {
+ polygon[index].code = ART_LINETO;
+ polygon[index].x = m_poly->points()->getItem(index)->x();
+ polygon[index].y = m_poly->points()->getItem(index)->y();
+ }
+
+ polygon[index].code = ART_LINETO;
+ polygon[index].x = m_poly->points()->getItem(0)->x();
+ polygon[index].y = m_poly->points()->getItem(0)->y();
+
+ index++;
+ polygon[index].code = ART_END;
+
+ if(m_context == NORMAL)
+ calcSVPs(polygon, m_poly, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(polygon, m_poly, screenCTM, &m_fillSVP);
+}
+
+// #####
+
+LibartPath::LibartPath(LibartCanvas *c, SVGPathElementImpl *path)
+: LibartShape(c, path), MarkerHelper(), T2P::BezierPathLibart(), ::SVGPathParser(), m_path(path)
+{
+ reset();
+}
+
+LibartPath::~LibartPath()
+{
+}
+
+void LibartPath::reset()
+{
+ m_array.resize(0);
+ LibartShape::reset();
+}
+
+void LibartPath::draw()
+{
+ LibartShape::draw(m_path);
+
+ if(m_path->hasMarkers())
+ {
+ SVGPathElementImpl::MarkerData markers = m_path->markerData();
+ int numMarkers = markers.numMarkers();
+
+ if(m_path->hasStartMarker())
+ doStartMarker(m_path, m_path, markers.marker(0).x, markers.marker(0).y, markers.marker(0).angle);
+
+ for(int i = 1; i < numMarkers - 1; i++)
+ {
+ if(m_path->hasMidMarker())
+ doMidMarker(m_path, m_path, markers.marker(i).x, markers.marker(i).y, markers.marker(i).angle);
+ }
+
+ if(m_path->hasEndMarker())
+ doEndMarker(m_path, m_path, markers.marker(numMarkers - 1).x, markers.marker(numMarkers - 1).y, markers.marker(numMarkers - 1).angle);
+ }
+}
+
+bool LibartPath::isVisible()
+{
+ return LibartShape::isVisible(m_path);
+}
+
+void LibartPath::init()
+{
+ init(m_path->screenCTM());
+}
+
+void LibartPath::init(const SVGMatrixImpl *screenCTM)
+{
+ LibartShape::init();
+ if(m_array.count() > 0)
+ {
+ if(m_context == NORMAL)
+ calcSVPs(m_array.data(), m_path, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(ksvg_art_bez_path_to_vec(m_array.data(), 0.25), m_path, screenCTM, &m_fillSVP);
+ }
+ else if(!m_path->getAttribute("d").string().isEmpty())
+ {
+ parseSVG(m_path->getAttribute("d").string(), true);
+
+ int index = m_array.count();
+ double curx = m_array[index - 1].x3;
+ double cury = m_array[index - 1].y3;
+
+ // Find last subpath
+ int find = -1;
+ for(int i = index - 1; i >= 0; i--)
+ {
+ if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
+ {
+ find = i;
+ break;
+ }
+ }
+
+ // Fix a problem where the .svg file used floats as values... (sofico.svg)
+ if(curx != m_array[find].x3 && cury != m_array[find].y3)
+ {
+ if((int) curx == (int) m_array[find].x3 && (int) cury == (int) m_array[find].y3)
+ {
+ ensureSpace(m_array, index)
+
+ m_array[index].code = ART_LINETO;
+ m_array[index].x3 = m_array[find].x3;
+ m_array[index].y3 = m_array[find].y3;
+
+ curx = m_array[find].x3;
+ cury = m_array[find].y3;
+
+ index++;
+ }
+ }
+
+ // handle filled paths that are not closed explicitly
+ if(m_path->getFillColor()->paintType() != SVG_PAINTTYPE_NONE)
+ {
+ if((int) curx != (int) m_array[find].x3 || (int) cury != (int) m_array[find].y3)
+ {
+ ensureSpace(m_array, index)
+
+ m_array[index].code = (ArtPathcode)ART_END2;
+ m_array[index].x3 = m_array[find].x3;
+ m_array[index].y3 = m_array[find].y3;
+
+ curx = m_array[find].x3;
+ cury = m_array[find].y3;
+
+ index++;
+ }
+ }
+
+ // close
+ ensureSpace(m_array, index)
+
+ m_array[index].code = ART_END;
+
+ // A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto
+ // and a closepath will be stroked only if the 'stroke-linecap' property is set to "round", producing a circle
+ // centered at the given point.
+ if(index == 2 && m_array[1].code == ART_LINETO && m_array[1].x3 == m_array[0].x3 && m_array[1].y3 == m_array[0].y3 && m_path->getCapStyle() == PATH_STROKE_CAP_ROUND)
+ m_array[1].x3 += .5;
+
+ // There are pure-moveto paths which reference paint servers *bah*
+ // Do NOT render them
+ bool render = false;
+ for(int i = index; i >= 0; i--)
+ {
+ if(m_array[i].code != ART_MOVETO_OPEN && m_array[i].code != ART_MOVETO && !(m_array[i].code >= ART_END))
+ {
+ render = true;
+ break;
+ }
+ }
+
+ if(render && m_context == NORMAL)
+ calcSVPs(m_array.data(), m_path, screenCTM, &m_strokeSVP, &m_fillSVP);
+ else
+ calcClipSVP(ksvg_art_bez_path_to_vec(m_array.data(), 0.25), m_path, screenCTM, &m_fillSVP);
+ }
+}
+
+void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool)
+{
+ int index = m_array.count();
+
+ if(index > 0 && !closed)
+ {
+ // Find last subpath
+ int find = -1;
+ for(int i = index - 1; i >= 0; i--)
+ {
+ if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
+ {
+ find = i;
+ break;
+ }
+ }
+
+ ensureSpace(m_array, index)
+
+ m_array[index].code = (ArtPathcode) ART_END2;
+ m_array[index].x3 = m_array[find].x3;
+ m_array[index].y3 = m_array[find].y3;
+
+ index++;
+ }
+
+ ensureSpace(m_array, index)
+
+ m_array[index].code = (index == 0) ? ART_MOVETO : ART_MOVETO_OPEN;
+ m_array[index].x3 = x1;
+ m_array[index].y3 = y1;
+}
+
+void LibartPath::svgLineTo(double x1, double y1, bool)
+{
+ int index = m_array.count();
+
+ ensureSpace(m_array, index)
+
+ m_array[index].code = ART_LINETO;
+ m_array[index].x3 = x1;
+ m_array[index].y3 = y1;
+}
+
+void LibartPath::svgCurveToCubic(double x1, double y1, double x2, double y2, double x3, double y3, bool)
+{
+ int index = m_array.count();
+
+ ensureSpace(m_array, index)
+
+ m_array[index].code = ART_CURVETO;
+ m_array[index].x1 = x1;
+ m_array[index].y1 = y1;
+ m_array[index].x2 = x2;
+ m_array[index].y2 = y2;
+ m_array[index].x3 = x3;
+ m_array[index].y3 = y3;
+}
+
+void LibartPath::svgClosePath()
+{
+ int index = m_array.count();
+ double curx = m_array[index - 1].x3;
+ double cury = m_array[index - 1].y3;
+
+ int find = -1;
+ for(int i = index - 1; i >= 0; i--)
+ {
+ if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
+ {
+ find = i;
+ break;
+ }
+ }
+
+ if(find != -1)
+ {
+ if(m_array[find].x3 != curx || m_array[find].y3 != cury)
+ {
+ ensureSpace(m_array, index)
+
+ m_array[index].code = ART_LINETO;
+ m_array[index].x3 = m_array[find].x3;
+ m_array[index].y3 = m_array[find].y3;
+ }
+ }
+}
+
+// #####
+
+LibartClipPath::LibartClipPath(LibartCanvas *c, SVGClipPathElementImpl *clipPath)
+: CanvasClipPath(clipPath), m_canvas(c)
+{
+ m_clipSVP = 0;
+ m_clipItems.setAutoDelete(true);
+}
+
+LibartClipPath::~LibartClipPath()
+{
+ if(m_clipSVP)
+ art_svp_free(m_clipSVP);
+}
+
+void LibartClipPath::update(CanvasItemUpdate, int, int)
+{
+ if(m_clipSVP)
+ art_svp_free(m_clipSVP);
+ m_clipSVP = 0;
+}
+
+void LibartClipPath::init()
+{
+ SVGMatrixImpl *clipMatrix = 0;
+
+ // Start with referencing element's coordinate system
+ SVGLocatableImpl *locatableReferrer = dynamic_cast<SVGLocatableImpl *>(m_clipPath->getBBoxTarget());
+ if(locatableReferrer)
+ clipMatrix = locatableReferrer->getScreenCTM();
+ else
+ clipMatrix = SVGSVGElementImpl::createSVGMatrix();
+
+ if(m_clipPath->clipPathUnits()->baseVal() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX && m_clipPath->getBBoxTarget())
+ {
+ SVGRectImpl *rect = m_clipPath->getBBoxTarget()->getBBox();
+
+ clipMatrix->translate(rect->qrect().x(), rect->qrect().y());
+ clipMatrix->scaleNonUniform(rect->qrect().width(), rect->qrect().height());
+
+ rect->deref();
+ }
+
+ // Add transformations on the clipPath element itself
+ if(m_clipPath->localMatrix())
+ clipMatrix->multiply(m_clipPath->localMatrix());
+
+ if(m_clipSVP)
+ {
+ art_svp_free(m_clipSVP);
+ m_clipSVP = 0;
+ }
+
+ DOM::Node node = m_clipPath->firstChild();
+ for(; !node.isNull(); node = node.nextSibling())
+ {
+ SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle());
+ SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
+
+ bool ok = tests ? tests->ok() : true;
+
+ if(element && shape && ok && !shape->isContainer())
+ {
+ LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(shape->item());
+
+ if(dynamic_cast<LibartText *>(shape->item()))
+ {
+ // The cast to a clipElement above is failing when it is valid. But only
+ // in the plugin - svgdisplay works fine. What's going on? (Adrian)
+ clipElement = dynamic_cast<LibartText *>(shape->item());
+ }
+
+ if(clipElement)
+ {
+ clipElement->setRenderContext(CLIPPING);
+
+ // Push coordinate system down to children.
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(shape);
+ if(locatable)
+ locatable->updateCachedScreenCTM(clipMatrix);
+
+ clipElement->initClipItem();
+
+ ArtSVP *one = clipElement->clipSVP();
+ if(!one)
+ break;
+
+ if(m_clipSVP == 0)
+ m_clipSVP = LibartCanvas::copy_svp(one);
+ else
+ {
+ ArtSVP *svp_union = art_svp_union(m_clipSVP, one);
+ art_svp_free(m_clipSVP);
+ m_clipSVP = svp_union;
+ }
+ }
+ }
+ }
+
+ clipMatrix->deref();
+}
+
+void LibartClipPath::draw()
+{
+}
+
+ArtSVP *LibartClipPath::clipSVP()
+{
+ return m_clipSVP;
+}
+
+// #####
+
+LibartImage::LibartImage(LibartCanvas *c, SVGImageElementImpl *image)
+: m_canvas(c), m_image(image)
+{
+}
+
+LibartImage::~LibartImage()
+{
+}
+
+void LibartImage::draw()
+{
+ if(isVisible())
+ {
+ SVGMatrixImpl *ctm = m_image->scaledImageMatrix();
+ QImage image = m_image->scaledImage();
+ KSVGPolygon clippingPolygon = m_image->clippingShape();
+
+ m_canvas->drawImage(image, m_image, ctm, clippingPolygon);
+
+ ctm->deref();
+ }
+}
+
+bool LibartImage::isVisible()
+{
+ return (m_referenced || (m_image->getVisible() && m_image->getDisplay() && m_image->directRender())) && m_image->image();
+}
+
+void LibartImage::init()
+{
+}
+
+QRect LibartImage::bbox() const
+{
+ QRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
+ static_cast<int>(m_image->y()->baseVal()->value()),
+ static_cast<int>(m_image->width()->baseVal()->value()),
+ static_cast<int>(m_image->height()->baseVal()->value()));
+
+
+ return SVGHelperImpl::fromUserspace(m_image, bbox);
+}
+
+// #####
+
+LibartMarker::LibartMarker(LibartCanvas *c, SVGMarkerElementImpl *marker)
+: CanvasMarker(marker), m_canvas(c)
+{
+}
+
+LibartMarker::~LibartMarker()
+{
+}
+
+void LibartMarker::init()
+{
+}
+
+void LibartMarker::draw()
+{
+}
+
+// #####
+
+LibartText::LibartText(LibartCanvas *c, SVGTextElementImpl *text)
+: CanvasText(text), m_canvas(c)
+{
+ m_drawFillItems.setAutoDelete(true);
+ m_drawStrokeItems.setAutoDelete(true);
+ m_fillPainters.setAutoDelete(true);
+ m_strokePainters.setAutoDelete(true);
+
+ init();
+}
+
+LibartText::~LibartText()
+{
+ clearSVPs();
+}
+
+LibartText::SVPElement::~SVPElement()
+{
+ if(svp)
+ art_svp_free(svp);
+}
+
+QRect LibartText::bbox() const
+{
+ QRect result, rect;
+
+ QPtrListIterator<SVPElement> it1(m_drawFillItems);
+ QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+
+ SVPElement *fill = it1.current(), *stroke = it2.current();
+ while(fill != 0 || stroke != 0)
+ {
+ ArtIRect *irect = new ArtIRect();
+ ArtVpath *vpath = art_vpath_from_svp((stroke && stroke->svp) ? stroke->svp : fill->svp);
+ art_vpath_bbox_irect(vpath, irect);
+ art_free(vpath);
+
+ rect.setX(irect->x0);
+ rect.setY(irect->y0);
+ rect.setWidth(irect->x1 - irect->x0);
+ rect.setHeight(irect->y1 - irect->y0);
+
+ delete irect;
+
+ result = result.unite(rect);
+
+ fill = ++it1;
+ stroke = ++it2;
+ }
+ return result;
+}
+
+bool LibartText::fillContains(const QPoint &p)
+{
+ QPtrListIterator<SVPElement> it(m_drawFillItems);
+
+ SVPElement *fill = it.current();
+ while(fill && fill->svp)
+ {
+ if(fill->svp && art_svp_point_wind(fill->svp, p.x(), p.y()) != 0)
+ return true;
+
+ fill = ++it;
+ }
+
+ return false;
+}
+
+bool LibartText::strokeContains(const QPoint &p)
+{
+ QPtrListIterator<SVPElement> it(m_drawStrokeItems);
+
+ SVPElement *stroke = it.current();
+ while(stroke && stroke->svp)
+ {
+ if(stroke->svp && art_svp_point_wind(stroke->svp, p.x(), p.y()) != 0)
+ return true;
+
+ stroke = ++it;
+ }
+
+ return false;
+}
+
+void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
+{
+ if(reason == UPDATE_STYLE)
+ {
+ QPtrListIterator<SVPElement> it1(m_drawFillItems);
+ QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ SVPElement *fill = it1.current(), *stroke = it2.current();
+ while(fill != 0 || stroke != 0)
+ {
+ SVGTextContentElementImpl *text = fill ? fill->element : stroke->element;
+
+ bool fillOk = fill && fill->svp && text->isFilled();
+ bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted.
+ if(fillOk || strokeOk)
+ {
+ if(m_fillPainters.find(text))
+ m_fillPainters[text]->update(text);
+
+ if(m_strokePainters.find(text))
+ m_strokePainters[text]->update(text);
+ }
+ fill = ++it1;
+ stroke = ++it2;
+ }
+ m_canvas->invalidate(this, false);
+ }
+ else if(reason == UPDATE_TRANSFORM)
+ {
+ clearSVPs();
+ init();
+ m_canvas->invalidate(this, true);
+ }
+ else if(reason == UPDATE_ZOOM)
+ {
+ clearSVPs();
+ init();
+ }
+ else if(reason == UPDATE_PAN)
+ {
+ QPtrListIterator<SVPElement> it1(m_drawFillItems);
+ QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+
+ double affine[6];
+ KSVGHelper::matrixToAffine(m_text->screenCTM(), affine);
+
+ SVPElement *fill = it1.current(), *stroke = it2.current();
+ while(fill != 0 || stroke != 0)
+ {
+ SVGTextContentElementImpl *text = fill ? fill->element : stroke->element;
+
+ bool fillOk = fill && fill->svp && text->isFilled();
+ bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted.
+
+ if(fillOk)
+ ksvg_art_svp_move(fill->svp, param1, param2);
+ if(strokeOk)
+ ksvg_art_svp_move(stroke->svp, param1, param2);
+ fill = ++it1;
+ stroke = ++it2;
+ }
+ }
+ /*
+ else if(reason == UPDATE_LINEWIDTH)
+ {
+ }*/
+}
+
+void LibartText::draw()
+{
+ QPtrListIterator<SVPElement> it1(m_drawFillItems);
+ QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+
+ SVPElement *fill = it1.current(), *stroke = it2.current();
+ while(fill != 0 || stroke != 0)
+ {
+ SVGTextContentElementImpl *text = fill ? fill->element : stroke->element;
+ if(!text || !text->getVisible() || !text->getDisplay() || !text->directRender())
+ return;
+
+ bool fillOk = fill && fill->svp && text->isFilled();
+ bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted.
+
+ if(fillOk || strokeOk)
+ {
+ if(fillOk && m_fillPainters.find(text))
+ m_fillPainters[text]->draw(m_canvas, fill->svp, text, text);
+
+ if(strokeOk && m_strokePainters.find(text))
+ m_strokePainters[text]->draw(m_canvas, stroke->svp, text, text);
+ }
+ fill = ++it1;
+ stroke = ++it2;
+ }
+}
+
+bool LibartText::isVisible()
+{
+ bool foundVisible = false;
+ QPtrListIterator<SVPElement> it1(m_drawFillItems);
+ QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+
+ SVPElement *fill = it1.current(), *stroke = it2.current();
+ while(fill != 0 || stroke != 0)
+ {
+ SVGTextContentElementImpl *text = fill ? fill->element : stroke->element;
+ if(text && text->getVisible() && text->getDisplay() && text->directRender())
+ {
+ foundVisible = true;
+ break;
+ }
+
+ fill = ++it1;
+ stroke = ++it2;
+ }
+
+ return foundVisible;
+}
+
+void LibartText::init()
+{
+ init(m_text->screenCTM());
+}
+
+void LibartText::renderCallback(SVGTextContentElementImpl *element, const SVGMatrixImpl *screenCTM, T2P::GlyphSet *glyph, T2P::GlyphLayoutParams *params, double anchor) const
+{
+ unsigned int glyphCount = glyph->glyphCount(); // Don't call it n times in the for loop
+ for(unsigned int i = 0; i < glyphCount; i++)
+ {
+ T2P::GlyphAffinePair *glyphAffine = glyph->set()[i];
+ ArtBpath *bezier = static_cast<const T2P::BezierPathLibart *>(glyphAffine->transformatedPath())->m_array.data();
+ ArtBpath *result = bezier;
+
+ // text-anchor support
+ if(anchor != 0)
+ {
+ double correct[6];
+
+ if(!params->tb())
+ art_affine_translate(correct, -anchor, 0);
+ else
+ art_affine_translate(correct, 0, -anchor);
+
+ ArtBpath *temp = art_bpath_affine_transform(result, correct);
+ //art_free(result);
+ result = temp;
+ }
+
+ ArtSVP *fillSVP = 0, *strokeSVP = 0;
+
+ if(m_context == NORMAL)
+ LibartShape::calcSVPs(result, m_text, screenCTM, &strokeSVP, &fillSVP);
+ else
+ LibartShape::calcClipSVP(ksvg_art_bez_path_to_vec(result, 0.25), m_text, screenCTM, &fillSVP);
+
+ SVPElement *fillElement = new SVPElement();
+ fillElement->svp = fillSVP;
+ fillElement->element = element;
+
+ SVPElement *strokeElement = new SVPElement();
+ strokeElement->svp = strokeSVP;
+ strokeElement->element = element;
+
+ m_drawFillItems.append(fillElement);
+ m_drawStrokeItems.append(strokeElement);
+
+ if(!m_fillPainters.find(element) && element->isFilled())
+ m_fillPainters.insert(element, new LibartFillPainter(element));
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ m_strokePainters.insert(element, new LibartStrokePainter(element));
+ }
+}
+
+void LibartText::init(const SVGMatrixImpl *screenCTM)
+{
+ int curx = 0, cury = 0, endx = 0, endy = 0;
+ KSVGTextChunk *textChunk = CanvasText::createTextChunk(m_canvas, screenCTM, curx, cury, endx, endy);
+
+ if(textChunk->count() > 0)
+ CanvasText::createGlyphs(textChunk, m_canvas, screenCTM, curx, cury, endx, endy);
+
+ delete textChunk;
+}
+
+void LibartText::clearSVPs()
+{
+ m_drawFillItems.clear();
+ m_drawStrokeItems.clear();
+ m_fillPainters.clear();
+ m_strokePainters.clear();
+}
+
+void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x, double y, double width, double height) const
+{
+ if(m_text->isFilled() || m_text->isStroked())
+ {
+ // compute rect svp
+ ArtVpath *vec = allocVPath(6);
+
+ vec[0].code = ART_MOVETO;
+ vec[0].x = x;
+ vec[0].y = y;
+
+ vec[1].code = ART_LINETO;
+ vec[1].x = x;
+ vec[1].y = y + height;
+
+ vec[2].code = ART_LINETO;
+ vec[2].x = x + width;
+ vec[2].y = y + height;
+
+ vec[3].code = ART_LINETO;
+ vec[3].x = x + width;
+ vec[3].y = y;
+
+ vec[4].code = ART_LINETO;
+ vec[4].x = x;
+ vec[4].y = y;
+
+ vec[5].code = ART_END;
+ double affine[6];
+ KSVGHelper::matrixToAffine(m_text->screenCTM(), affine);
+
+ ArtVpath *temp = art_vpath_affine_transform(vec, affine);
+ art_free(vec);
+ vec = temp;
+
+ if(m_text->isFilled())
+ {
+ ArtSvpWriter *swr;
+ ArtSVP *temp = art_svp_from_vpath(vec);
+
+ swr = art_svp_writer_rewind_new(ART_WIND_RULE_ODDEVEN);
+
+ art_svp_intersector(temp, swr);
+ ArtSVP *fillSVP = art_svp_writer_rewind_reap(swr);
+
+ SVPElement *fillElement = new SVPElement();
+ fillElement->svp = fillSVP;
+ fillElement->element = element;
+
+ m_drawFillItems.append(fillElement);
+
+ if(!m_fillPainters.find(element) && element->isFilled())
+ m_fillPainters.insert(element, new LibartFillPainter(element));
+
+ art_svp_free(temp);
+ }
+ // Stroking
+ if(m_text->isStroked() || m_text->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI)
+ {
+ double ratio = art_affine_expansion(affine);
+ ArtSVP *strokeSVP = art_svp_vpath_stroke(vec, (ArtPathStrokeJoinType)m_text->getJoinStyle(), (ArtPathStrokeCapType)m_text->getCapStyle(), m_text->getStrokeWidth()->baseVal()->value() * ratio, m_text->getStrokeMiterlimit(), 0.25);
+
+ SVPElement *strokeElement = new SVPElement();
+ strokeElement->svp = strokeSVP;
+ strokeElement->element = element;
+
+ m_drawStrokeItems.append(strokeElement);
+
+ // Spec: A zero value causes no stroke to be painted.
+ if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ m_strokePainters.insert(element, new LibartStrokePainter(element));
+ }
+ art_free(vec);
+ }
+}
+
+void LibartText::initClipItem()
+{
+ init();
+}
+
+ArtSVP *LibartText::clipSVP()
+{
+ ArtSVP *svp = 0;
+ QPtrListIterator<SVPElement> it(m_drawFillItems);
+
+ SVPElement *fill = it.current();
+ while(fill && fill->svp)
+ {
+ if(svp == 0)
+ svp = LibartCanvas::copy_svp(fill->svp);
+ else
+ {
+ ArtSVP *svp_union = art_svp_union(svp, fill->svp);
+ art_svp_free(svp);
+ svp = svp_union;
+ }
+
+ fill = ++it;
+ }
+
+ return svp;
+}
+
+ArtRender *LibartPaintServer::createRenderer(QRect bbox, KSVGCanvas *c)
+{
+ int x0 = bbox.x();
+ int y0 = bbox.y();
+ int x1 = bbox.right();
+ int y1 = bbox.bottom();
+
+ c->clipToBuffer(x0, y0, x1, y1);
+
+ // Note: We always pass 3 for the number of channels since the ART_ALPHA parameter
+ // adds the alpha channel when present.
+ ArtRender *render = 0;
+ render = art_render_new(QMIN(x0, x1),
+ QMIN(y0, y1),
+ QMAX(x0, x1) + 1,
+ QMAX(y0, y1) + 1,
+ c->renderingBuffer() + x0 * c->nrChannels() + y0 * c->rowStride(),
+ c->rowStride(), 3, 8,
+ c->nrChannels() == 3 ? ART_ALPHA_NONE : ART_ALPHA_PREMUL, 0);
+
+ return render;
+}
+
+void LibartGradient::parseGradientStops(SVGGradientElementImpl *gradient)
+{
+ const double epsilon = DBL_EPSILON;
+
+ for(DOM::Node node = gradient->firstChild(); !node.isNull(); node = node.nextSibling())
+ {
+ SVGStopElementImpl *elem = dynamic_cast<SVGStopElementImpl *>(m_gradient->ownerDoc()->getElementFromHandle(node.handle()));
+ if(elem)
+ {
+ m_stops.resize(m_stops.size() + 1);
+
+ ArtGradientStop *stop = &(m_stops[m_stops.size() - 1]);
+
+ stop->offset = elem->offset()->baseVal();
+
+ // Spec: clamp range to 0 to 1
+ if(stop->offset < epsilon)
+ stop->offset = 0;
+ else if(stop->offset > 1 - epsilon)
+ stop->offset = 1;
+
+ // Spec: if offset is less than previous offset, set it to the previous offset
+ if(m_stops.size() > 1 && stop->offset < (stop - 1)->offset + epsilon)
+ stop->offset = (stop - 1)->offset;
+
+ // Get color
+ QColor qStopColor;
+
+ if(elem->getStopColor()->colorType() == SVG_COLORTYPE_CURRENTCOLOR)
+ qStopColor = elem->getColor()->rgbColor().color();
+ else
+ qStopColor = elem->getStopColor()->rgbColor().color();
+
+ // Convert in a libart suitable form
+ QString tempName = qStopColor.name();
+ const char *str = tempName.latin1();
+
+ int stopColor = 0;
+
+ for(int i = 1; str[i]; i++)
+ {
+ int hexval;
+ if(str[i] >= '0' && str[i] <= '9')
+ hexval = str[i] - '0';
+ else if (str[i] >= 'A' && str[i] <= 'F')
+ hexval = str[i] - 'A' + 10;
+ else if (str[i] >= 'a' && str[i] <= 'f')
+ hexval = str[i] - 'a' + 10;
+ else
+ break;
+
+ stopColor = (stopColor << 4) + hexval;
+ }
+
+ // Apply stop-opacity
+ float opacity = elem->stopOpacity();
+
+ // Get rgba color including stop-opacity
+ Q_UINT32 rgba = (stopColor << 8) | int(opacity * 255.0 + 0.5);
+ Q_UINT32 r, g, b, a;
+
+ a = rgba & 0xff;
+ r = (rgba >> 24) & 0xff;
+ g = (rgba >> 16) & 0xff;
+ b = (rgba >> 8) & 0xff;
+
+ stop->color[0] = ART_PIX_MAX_FROM_8(r);
+ stop->color[1] = ART_PIX_MAX_FROM_8(g);
+ stop->color[2] = ART_PIX_MAX_FROM_8(b);
+ stop->color[3] = ART_PIX_MAX_FROM_8(a);
+ }
+ }
+}
+
+void LibartGradient::finalizePaintServer()
+{
+ parseGradientStops(m_gradient->stopsSource());
+
+ QString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
+ if(!_href.isEmpty())
+ reference(_href);
+
+ setFinalized();
+}
+
+void LibartGradient::reference(const QString &)
+{
+}
+
+void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+{
+ if(!m_stops.isEmpty())
+ {
+ m_linear->converter()->finalize(getBBoxTarget(), m_linear->ownerSVGElement(), m_linear->gradientUnits()->baseVal());
+
+ ArtKSVGGradientLinear *linear = art_new(ArtKSVGGradientLinear, 1);
+
+ if(m_linear->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REPEAT)
+ linear->spread = ART_GRADIENT_REPEAT;
+ else if(m_linear->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REFLECT)
+ linear->spread = ART_GRADIENT_REFLECT;
+ else
+ linear->spread = ART_GRADIENT_PAD;
+
+ linear->interpolation = m_linear->getColorInterpolation() == CI_SRGB ? ART_KSVG_SRGB_INTERPOLATION : ART_KSVG_LINEARRGB_INTERPOLATION;
+
+ ArtRender *render = createRenderer(screenBBox, c);
+
+ double _x1 = m_linear->x1()->baseVal()->value();
+ double _y1 = m_linear->y1()->baseVal()->value();
+ double _x2 = m_linear->x2()->baseVal()->value();
+ double _y2 = m_linear->y2()->baseVal()->value();
+
+ // Respect current transformation matrix (so gradients zoom with...)
+ SVGTransformableImpl *transformable = dynamic_cast<SVGTransformableImpl *>(getBBoxTarget());
+ SVGMatrixImpl *matrix = 0;
+ if(transformable)
+ matrix = transformable->getScreenCTM();
+ else
+ matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ const double epsilon = DBL_EPSILON;
+
+ if(m_linear->gradientUnits()->baseVal() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ {
+ // Here we're undoing the unit-converter's work because putting the
+ // bounding box transform into the matrix here lets the gradient transform
+ // sit at the right point in the chain to work with bounding box coordinates. It
+ // also removes the need for code to generate the 'not perpendicular to gradient vector' effect.
+ SVGRectImpl *userBbox = getBBoxTarget()->getBBox();
+
+ double width = userBbox->width();
+ double height = userBbox->height();
+
+ // Catch case of width or height of zero, which can be the case for lines.
+ if(width < epsilon)
+ width = 1;
+ if(height < epsilon)
+ height = 1;
+
+ _x1 /= width;
+ _y1 /= height;
+ _x2 /= width;
+ _y2 /= height;
+
+ matrix->translate(userBbox->x(), userBbox->y());
+ matrix->scaleNonUniform(width, height);
+
+ userBbox->deref();
+ }
+
+ // Adjust to gradient transform
+ SVGMatrixImpl *gradTrans = m_linear->gradientTransform()->baseVal()->concatenate();
+ if(gradTrans)
+ {
+ matrix->multiply(gradTrans);
+ gradTrans->deref();
+ }
+
+ double dx = _x2 - _x1;
+ double dy = _y2 - _y1;
+
+ if(fabs(dx) < epsilon && fabs(dy) < epsilon)
+ {
+ // Lines can generate (0, 0) with bbox coords.
+ dx = 1;
+ dy = 0;
+ }
+
+ double angle = atan2(dy, dx);
+ double length = sqrt(dx * dx + dy * dy);
+
+ const double pi = 3.14159265358979323846;
+
+ matrix->translate(_x1, _y1);
+ matrix->scale(length);
+ matrix->rotate(angle * 180.0 / pi);
+
+ double affine[6];
+
+ KSVGHelper::matrixToAffine(matrix, affine);
+ art_affine_invert(linear->affine, affine);
+
+ matrix->deref();
+
+ QMemArray<ArtGradientStop> stops = m_stops;
+ stops.detach();
+
+ for(unsigned int i = 0; i < stops.size(); i++)
+ stops[i].color[3] = ArtPixMaxDepth(stops[i].color[3] * opacity + 0.5);
+
+ if(m_linear->x1()->baseVal()->valueInSpecifiedUnits() == m_linear->x2()->baseVal()->valueInSpecifiedUnits()
+ && m_linear->y1()->baseVal()->valueInSpecifiedUnits() == m_linear->y2()->baseVal()->valueInSpecifiedUnits())
+ {
+ // Spec: If x1 == x2 and y1 == y2, paint the area in a single colour, using the colour
+ // of the last stop.
+ //
+ // Using valueInSpecifiedUnits() so that we are comparing the values before possible
+ // conversion to bounding box units by the converter.
+ if(stops.size() > 1)
+ {
+ stops[0] = stops[stops.size() - 1];
+ stops.resize(1);
+ }
+ }
+
+ linear->stops = &(stops[0]);
+ linear->n_stops = stops.size();
+
+ art_render_svp(render, svp);
+ art_ksvg_render_gradient_linear(render, linear, ART_FILTER_HYPER);
+
+ if(mask.data())
+ art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1,
+ (const art_u8 *)mask.data(), screenBBox.width());
+
+ art_render_invoke(render);
+
+ art_free(linear);
+ }
+}
+
+void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+{
+ if(!m_stops.isEmpty())
+ {
+ m_radial->converter()->finalize(getBBoxTarget(), m_radial->ownerSVGElement(), m_radial->gradientUnits()->baseVal());
+
+ ArtKSVGGradientRadial *radial = art_new(ArtKSVGGradientRadial, 1);
+
+ if(m_radial->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REPEAT)
+ radial->spread = ART_GRADIENT_REPEAT;
+ else if(m_radial->spreadMethod()->baseVal() == SVG_SPREADMETHOD_REFLECT)
+ radial->spread = ART_GRADIENT_REFLECT;
+ else
+ radial->spread = ART_GRADIENT_PAD;
+
+ radial->interpolation = m_radial->getColorInterpolation() == CI_SRGB ? ART_KSVG_SRGB_INTERPOLATION : ART_KSVG_LINEARRGB_INTERPOLATION;
+
+ ArtRender *render = createRenderer(screenBBox, c);
+
+ // Respect current transformation matrix (so gradients zoom with...)
+ SVGTransformableImpl *transformable = dynamic_cast<SVGTransformableImpl *>(getBBoxTarget());
+ SVGMatrixImpl *matrix = 0;
+ if(transformable)
+ matrix = transformable->getScreenCTM();
+ else
+ matrix = SVGSVGElementImpl::createSVGMatrix();
+
+ double _cx = m_radial->cx()->baseVal()->value();
+ double _cy = m_radial->cy()->baseVal()->value();
+ double _r = m_radial->r()->baseVal()->value();
+
+ double _fx;
+ double _fy;
+
+ // Spec: If attribute fx is not specified, fx will coincide with cx.
+ if(m_radial->getAttribute("fx").isEmpty())
+ _fx = _cx;
+ else
+ _fx = m_radial->fx()->baseVal()->value();
+
+ // Spec: If attribute fy is not specified, fy will coincide with cy.
+ if(m_radial->getAttribute("fy").isEmpty())
+ _fy = _cy;
+ else
+ _fy = m_radial->fy()->baseVal()->value();
+
+ const double epsilon = DBL_EPSILON;
+
+ if(m_radial->gradientUnits()->baseVal() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ {
+ // Here we're undoing the unit-converter's work because putting the
+ // bounding box transform into the matrix here lets the gradient transform
+ // sit at the right point in the chain to work with bounding box coordinates.
+ // It also produces the elliptical shape due to the non-uniform scaling.
+ SVGRectImpl *userBBox = getBBoxTarget()->getBBox();
+
+ double width = userBBox->width();
+ double height = userBBox->height();
+
+ // Catch case of width or height of zero, which can be the case for lines.
+ if(width < epsilon)
+ width = 1;
+ if(height < epsilon)
+ height = 1;
+
+ _cx /= width;
+ _cy /= height;
+ _fx /= width;
+ _fy /= height;
+ _r /= (sqrt(width * width + height * height) / 1.4142135623731);
+
+ matrix->translate(userBBox->x(), userBBox->y());
+ matrix->scaleNonUniform(width, height);
+
+ userBBox->deref();
+ }
+
+ // Adjust to gradient transforms
+ SVGMatrixImpl *transform = m_radial->gradientTransform()->baseVal()->concatenate();
+
+ if(transform)
+ {
+ matrix->multiply(transform);
+ transform->deref();
+ }
+
+ double fx = (_fx - _cx) / _r;
+ double fy = (_fy - _cy) / _r;
+
+ if(fx * fx + fy * fy > 0.99)
+ {
+ // Spec: If (fx, fy) lies outside the circle defined by (cx, cy) and r, set (fx, fy)
+ // to the point of intersection of the line through (fx, fy) and the circle.
+ //
+ // Note: We need to keep (fx, fy) inside the unit circle in order for
+ // libart to render the gradient correctly.
+ double angle = atan2(fy, fx);
+ fx = cos(angle) * 0.99;
+ fy = sin(angle) * 0.99;
+ }
+
+ radial->fx = fx;
+ radial->fy = fy;
+
+ matrix->translate(_cx, _cy);
+ matrix->scale(_r);
+
+ double affine[6];
+
+ KSVGHelper::matrixToAffine(matrix, affine);
+ art_affine_invert(radial->affine, affine);
+
+ matrix->deref();
+
+ QMemArray<ArtGradientStop> stops = m_stops;
+ stops.detach();
+
+ for(unsigned int i = 0; i < stops.size(); i++)
+ stops[i].color[3] = ArtPixMaxDepth(stops[i].color[3] * opacity + 0.5);
+
+ radial->stops = &(stops[0]);
+ radial->n_stops = stops.size();
+
+ art_render_svp(render, svp);
+ art_ksvg_render_gradient_radial(render, radial, ART_FILTER_HYPER);
+
+ if(mask.data())
+ art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1,
+ (const art_u8 *)mask.data(), screenBBox.width());
+
+ art_render_invoke(render);
+
+ art_free(radial);
+ }
+}
+
+LibartPattern::LibartPattern(SVGPatternElementImpl *pattern)
+ : m_pattern(pattern)
+{
+}
+
+void LibartPattern::finalizePaintServer()
+{
+ m_pattern->finalizePaintServer();
+ setFinalized();
+}
+
+void LibartPattern::reference(const QString &href)
+{
+ m_pattern->reference(href);
+}
+
+void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+{
+ SVGPatternElementImpl::Tile tile = m_pattern->createTile(getBBoxTarget());
+
+ if(!tile.image().isNull())
+ {
+ QWMatrix m = tile.screenToTile();
+ double affine[6];
+
+ affine[0] = m.m11();
+ affine[1] = m.m12();
+ affine[2] = m.m21();
+ affine[3] = m.m22();
+ affine[4] = m.dx();
+ affine[5] = m.dy();
+
+ int alpha = int(opacity * 255 + 0.5);
+
+ ksvg_art_rgb_texture(svp, c->renderingBuffer() + screenBBox.x() * c->nrChannels() + screenBBox.y() * c->rowStride(), screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, c->rowStride(), c->nrChannels(), tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4, affine, ART_FILTER_NEAREST, 0L, alpha, (art_u8 *)mask.data());
+ }
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.h b/ksvg/plugin/backends/libart/LibartCanvasItems.h
new file mode 100644
index 00000000..c62224e5
--- /dev/null
+++ b/ksvg/plugin/backends/libart/LibartCanvasItems.h
@@ -0,0 +1,414 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LIBARTCANVASITEMS_H
+#define LIBARTCANVASITEMS_H
+
+#include <qptrlist.h>
+
+#include "CanvasItems.h"
+#include "LibartCanvas.h"
+#include "BezierPathLibart.h"
+
+#include "SVGPathElementImpl.h"
+#include "SVGPolyElementImpl.h"
+#include "SVGLineElementImpl.h"
+#include "SVGRectElementImpl.h"
+#include "SVGTextElementImpl.h"
+#include "SVGCircleElementImpl.h"
+#include "SVGEllipseElementImpl.h"
+
+// Helpers
+#define allocVPath(n) art_new(ArtVpath, n)
+#define allocBPath(n) art_new(ArtBpath, n)
+
+#define LIBART_CLASS(Class, Type, Member) \
+class Libart##Class : public LibartShape \
+{ \
+public: \
+ Libart##Class(LibartCanvas *c, Type *Member); \
+ virtual ~Libart##Class() { } \
+ virtual void draw(); \
+ virtual bool isVisible(); \
+ virtual void init(); \
+ virtual void init(const SVGMatrixImpl *screenCTM); \
+ virtual SVGElementImpl *element() const { return m_##Member; } \
+protected: \
+ Type *m_##Member; \
+};
+
+struct _ArtSVP;
+struct _ArtBpath;
+struct _ArtRender;
+struct _ArtGradientStop;
+
+namespace KSVG
+{
+ class SVGImageElementImpl;
+ class SVGGradientElementImpl;
+ class SVGRadialGradientElementImpl;
+ class SVGLinearGradientElementImpl;
+ class SVGPatternElementImpl;
+
+ class LibartPaintServer : public CanvasPaintServer
+ {
+ public:
+ LibartPaintServer() : CanvasPaintServer() {}
+ virtual ~LibartPaintServer() {}
+
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox) = 0;
+
+ _ArtRender *createRenderer(QRect rect, KSVGCanvas *c);
+ };
+
+ class LibartGradient : public LibartPaintServer
+ {
+ public:
+ LibartGradient(SVGGradientElementImpl *gradient) : m_gradient(gradient) {}
+ virtual ~LibartGradient() {}
+
+ void parseGradientStops(SVGGradientElementImpl *gradient);
+
+ virtual void finalizePaintServer();
+ virtual void reference(const QString &href);
+
+ protected:
+ SVGGradientElementImpl *m_gradient;
+ QMemArray<_ArtGradientStop> m_stops;
+ };
+
+ class LibartLinearGradient : public LibartGradient
+ {
+ public:
+ LibartLinearGradient(SVGLinearGradientElementImpl *linear) : LibartGradient(linear), m_linear(linear) {}
+
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+
+ protected:
+ SVGLinearGradientElementImpl *m_linear;
+ };
+
+ class LibartRadialGradient : public LibartGradient
+ {
+ public:
+ LibartRadialGradient(SVGRadialGradientElementImpl *radial) : LibartGradient(radial), m_radial(radial) {}
+
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+
+ protected:
+ SVGRadialGradientElementImpl *m_radial;
+ };
+
+ class LibartPattern : public LibartPaintServer
+ {
+ public:
+ LibartPattern(SVGPatternElementImpl *pattern);
+ virtual ~LibartPattern() {}
+
+ virtual void finalizePaintServer();
+ virtual void reference(const QString &href);
+
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+
+ protected:
+ SVGPatternElementImpl *m_pattern;
+ };
+
+ class LibartPainter
+ {
+ public:
+ LibartPainter() { m_color = 0; }
+ virtual ~LibartPainter() {}
+
+ void update(SVGStylableImpl *style);
+ void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape);
+
+ virtual float opacity(SVGStylableImpl *style) const = 0;
+ virtual unsigned short paintType(SVGStylableImpl *style) const = 0;
+ virtual QString paintUri(SVGStylableImpl *style) const = 0;
+ virtual QRgb color(SVGStylableImpl *style) const = 0;
+
+ protected:
+ art_u32 m_color;
+ };
+
+ class LibartFillPainter : public LibartPainter
+ {
+ public:
+ LibartFillPainter(SVGStylableImpl *style);
+
+ float opacity(SVGStylableImpl *style) const { return style->getFillOpacity() * style->getOpacity(); }
+ unsigned short paintType(SVGStylableImpl *style) const { return style->getFillColor()->paintType(); }
+ QString paintUri(SVGStylableImpl *style) const { return style->getFillColor()->uri().string(); }
+ QRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); }
+ };
+
+ class LibartStrokePainter : public LibartPainter
+ {
+ public:
+ LibartStrokePainter(SVGStylableImpl *style);
+
+ float opacity(SVGStylableImpl *style) const { return style->getStrokeOpacity() * style->getOpacity(); }
+ unsigned short paintType(SVGStylableImpl *style) const { return style->getStrokeColor()->paintType(); }
+ QString paintUri(SVGStylableImpl *style) const { return style->getStrokeColor()->uri().string(); }
+ QRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); }
+ };
+
+ class LibartClipItem
+ {
+ public:
+ LibartClipItem() { m_context = NORMAL; }
+ virtual ~LibartClipItem() {}
+
+ virtual void initClipItem() = 0;
+ void setRenderContext(RenderContext context) { m_context = context; }
+ virtual ArtSVP *clipSVP() = 0;
+
+ protected:
+ RenderContext m_context;
+ };
+
+ class LibartShape : public CanvasItem, public LibartClipItem
+ {
+ public:
+ LibartShape(LibartCanvas *c, SVGStylableImpl *style);
+ virtual ~LibartShape();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &p);
+ virtual bool strokeContains(const QPoint &p);
+ virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
+ void draw(SVGShapeImpl *shape);
+ bool isVisible(SVGShapeImpl *shape);
+
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *);
+ virtual void reset() { freeSVPs(); init(); }
+
+ void initClipItem();
+ ArtSVP *clipSVP();
+
+ static void calcClipSVP(ArtVpath *vec, SVGStylableImpl *style, const SVGMatrixImpl *matrix, _ArtSVP **clipSVP);
+ static void calcSVPs(ArtVpath *vec, SVGStylableImpl *style, const SVGMatrixImpl *matrix, _ArtSVP **strokeSVP, _ArtSVP **fillSVP);
+ static void calcSVPs(_ArtBpath *bpath, SVGStylableImpl *style, const SVGMatrixImpl *matrix, _ArtSVP **strokeSVP, _ArtSVP **fillSVP);
+
+ protected:
+ void freeSVPs();
+ static void calcSVPInternal(ArtVpath *vec, SVGStylableImpl *style, double *affine, ArtSVP **strokeSVP, ArtSVP **fillSVP);
+
+ _ArtSVP *m_fillSVP;
+ _ArtSVP *m_strokeSVP;
+ LibartFillPainter *m_fillPainter;
+ LibartStrokePainter *m_strokePainter;
+ LibartCanvas *m_canvas;
+ SVGStylableImpl *m_style;
+ };
+
+ LIBART_CLASS(Rectangle, SVGRectElementImpl, rect)
+ LIBART_CLASS(Ellipse, SVGEllipseElementImpl, ellipse)
+ LIBART_CLASS(Circle, SVGCircleElementImpl, circle)
+
+ class LibartLine : public LibartShape, public MarkerHelper
+ {
+ public:
+ LibartLine(LibartCanvas *c, SVGLineElementImpl *line);
+ virtual ~LibartLine();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual SVGElementImpl *element() const { return m_line; }
+
+ protected:
+ SVGLineElementImpl *m_line;
+ };
+
+ class LibartPoly : public LibartShape, public MarkerHelper
+ {
+ public:
+ LibartPoly(LibartCanvas *c, SVGPolyElementImpl *poly);
+ virtual ~LibartPoly();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM) = 0;
+
+ virtual SVGElementImpl *element() const { return m_poly; }
+
+ protected:
+ SVGPolyElementImpl *m_poly;
+
+ };
+ class LibartPolyline : public LibartPoly
+ {
+ public:
+ LibartPolyline(LibartCanvas *c, SVGPolylineElementImpl *poly);
+ virtual ~LibartPolyline();
+
+ virtual void init(const SVGMatrixImpl *screenCTM);
+ };
+
+ class LibartPolygon : public LibartPoly
+ {
+ public:
+ LibartPolygon(LibartCanvas *c, SVGPolygonElementImpl *poly);
+ virtual ~LibartPolygon();
+
+ virtual void init(const SVGMatrixImpl *screenCTM);
+ };
+
+ class LibartPath : public LibartShape, public MarkerHelper, public T2P::BezierPathLibart, public ::SVGPathParser
+ {
+ public:
+ LibartPath(LibartCanvas *c, SVGPathElementImpl *path);
+ virtual ~LibartPath();
+
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void reset();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual SVGElementImpl *element() const { return m_path; }
+
+ protected:
+ friend class LibartCanvas;
+ SVGPathElementImpl *m_path;
+
+ virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true);
+ virtual void svgLineTo(double x1, double y1, bool abs = true);
+ virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true);
+ virtual void svgClosePath();
+ };
+
+ class LibartClipPath : public CanvasClipPath
+ {
+ public:
+ LibartClipPath(LibartCanvas *c, SVGClipPathElementImpl *clipPath);
+ virtual ~LibartClipPath();
+
+ virtual QRect bbox() const { return QRect(); }
+ virtual bool fillContains(const QPoint &) { return true; }
+ virtual bool strokeContains(const QPoint &) { return true; }
+ virtual void update(CanvasItemUpdate, int param1 = 0, int param2 = 0);
+ virtual void init();
+ virtual void draw();
+ virtual bool isVisible() { return false; }
+
+ _ArtSVP *clipSVP();
+
+ protected:
+ LibartCanvas *m_canvas;
+ _ArtSVP *m_clipSVP;
+
+ QPtrList<CanvasItem> m_clipItems;
+ };
+
+ class LibartImage : public CanvasItem
+ {
+ public:
+ LibartImage(LibartCanvas *c, SVGImageElementImpl *image);
+ virtual ~LibartImage();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &) { return true; }
+ virtual bool strokeContains(const QPoint &) { return true; }
+ virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
+ virtual void init();
+ virtual void draw();
+ virtual bool isVisible();
+
+ // We can't include SVGImageElementImpl.h here
+ // because of compiliation errors (X11 headers!)
+ virtual SVGElementImpl *element() const { return reinterpret_cast<SVGElementImpl *>(m_image); }
+
+ protected:
+ LibartCanvas *m_canvas;
+ SVGImageElementImpl *m_image;
+ };
+
+ class LibartMarker : public CanvasMarker
+ {
+ public:
+ LibartMarker(LibartCanvas *c, SVGMarkerElementImpl *marker);
+ virtual ~LibartMarker();
+
+ virtual QRect bbox() const { return QRect(); }
+ virtual bool fillContains(const QPoint &) { return true; }
+ virtual bool strokeContains(const QPoint &) { return true; }
+ virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
+ virtual void init();
+ virtual void draw();
+ virtual bool isVisible() { return false; }
+
+ protected:
+ LibartCanvas *m_canvas;
+ };
+
+ class LibartText : public CanvasText, public LibartClipItem
+ {
+ public:
+ LibartText(LibartCanvas *c, SVGTextElementImpl *text);
+ virtual ~LibartText();
+
+ virtual QRect bbox() const;
+ virtual bool fillContains(const QPoint &p);
+ virtual bool strokeContains(const QPoint &p);
+ virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
+ virtual void draw();
+ virtual bool isVisible();
+ virtual void init();
+ virtual void init(const SVGMatrixImpl *screenCTM);
+
+ virtual void renderCallback(SVGTextContentElementImpl *element, const SVGMatrixImpl *screenCTM, T2P::GlyphSet *glyph, T2P::GlyphLayoutParams *params, double anchor) const;
+ virtual void addTextDecoration(SVGTextContentElementImpl *element, double x, double y, double w, double h) const;
+
+ void initClipItem();
+ ArtSVP *clipSVP();
+
+ protected:
+ LibartCanvas *m_canvas;
+
+ private:
+ void clearSVPs();
+
+ class SVPElement
+ {
+ public:
+ SVPElement() { svp = 0; element = 0; }
+ ~SVPElement();
+
+ _ArtSVP *svp;
+ SVGTextContentElementImpl *element;
+ };
+
+ // renderCallback() is const.
+ mutable QPtrList<SVPElement> m_drawFillItems;
+ mutable QPtrList<SVPElement> m_drawStrokeItems;
+ mutable QPtrDict<LibartFillPainter> m_fillPainters;
+ mutable QPtrDict<LibartStrokePainter> m_strokePainters;
+ };
+}
+
+#endif
+
diff --git a/ksvg/plugin/backends/libart/Makefile.am b/ksvg/plugin/backends/libart/Makefile.am
new file mode 100644
index 00000000..b3f4ea5b
--- /dev/null
+++ b/ksvg/plugin/backends/libart/Makefile.am
@@ -0,0 +1,11 @@
+kde_module_LTLIBRARIES = libksvgrendererlibart.la
+
+libksvgrendererlibart_la_SOURCES = BezierPathLibart.cpp GlyphTracerLibart.cpp LibartCanvas.cpp LibartCanvasItems.cpp LibartCanvasFactory.cpp
+libksvgrendererlibart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+libksvgrendererlibart_la_LIBADD = ../../../libksvg.la
+libksvgrendererlibart_la_METASOURCES = AUTO
+
+kde_services_DATA = ksvglibartcanvas.desktop
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+INCLUDES = $(LIBART_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(KDE_INCLUDES) $(all_includes)
diff --git a/ksvg/plugin/backends/libart/ksvglibartcanvas.desktop b/ksvg/plugin/backends/libart/ksvglibartcanvas.desktop
new file mode 100644
index 00000000..af6f3a6c
--- /dev/null
+++ b/ksvg/plugin/backends/libart/ksvglibartcanvas.desktop
@@ -0,0 +1,101 @@
+[Desktop Entry]
+Type=Service
+ServiceTypes=KSVG/Renderer
+X-KDE-Library=libksvgrendererlibart
+X-KSVG-InternalName=libart
+Name=KSVG Rendering Backend - Libart
+Name[ar]=خلÙية الرسم Ù„ KSVG - Libart
+Name[bs]=KSVG renderiranje - Libart
+Name[ca]=Representació en segon pla de KSVG - Biblioteca d'imatges
+Name[cs]=Vykreslovací nástroj KSVG - Libart
+Name[cy]=Ôl-wyneb Llunio KSVG - Libart
+Name[da]=Underliggende program til KSVG-visning - Libart
+Name[de]=KSVG-Darstellungsmodul - Libart
+Name[el]=ΣÏστημα υποστήÏιξης αποτÏπωσης του KSVG - Libart
+Name[es]=Motor de procesado de KSVG - Libart
+Name[et]=KSVG renderdamise taustarakendus - Libart
+Name[eu]=KSVG errendatze programa - Libart
+Name[fa]=پایانۀ پشتیبانی پرداخت KSVG - Libart
+Name[fi]=KSVG-piirtäjän taustaohjelma - Libart
+Name[fr]=Moteur de rendu KSVG - Libart
+Name[ga]=Inneall Rindreála KSVG - Libart
+Name[gl]=Mecanismo de Interpretación KSVG - Libart
+Name[hi]=के-à¤à¤¸à¤µà¥€à¤œà¥€ रेंडरिंग बैकà¤à¤£à¥à¤¡- लिबआरà¥à¤Ÿ
+Name[hu]=KSVG megjelenítőmotor - Libart
+Name[is]=KSVG teiknari - Libart
+Name[it]=Backend di KSVG per il rendering - Libart
+Name[ja]=KSVG レンダリングãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ - Libart
+Name[kk]=KSVG кеÑкіндеу бағдарламаÑÑ‹ - Libart
+Name[km]=កម្មវិធី​សម្រាប់​បង្ហាញ KSVG - Libart
+Name[lt]=KSVG atkūrimo programinė sąsaja - Libart
+Name[ms]=Tepi Belakang Menrealisasi KSVG - Libart
+Name[nb]=Modul for KSVG-tegning – Libart
+Name[nds]=KSVG-Dorstellhölper - Libart
+Name[ne]=KSVG रेनà¥à¤¡à¤°à¤¿à¤™ बà¥à¤¯à¤¾à¤•à¤‡à¤¨à¥à¤¡ - लिबरà¥à¤Ÿ
+Name[nl]=KSVG weergavecomponent - Libart
+Name[nn]=Modul for KSVG-teikning – Libart
+Name[pl]=Narzędzie do renderowania KSVG - Libart
+Name[pt]=Infra-Estrutura de Desenho do KSVG - Libart
+Name[pt_BR]=Estrutura de KSVG Rendering Backend - Libart
+Name[ro]=Motor de randare KSVG - Libart
+Name[ru]=Движок отриÑовки KSVG - Libart
+Name[sk]=Nástroj pre zobrazovanie KSVG - libart
+Name[sl]=Izrisovalnik KSVG - Libart
+Name[sr]=KSVG-ов позадинÑки ÑиÑтем за рендеровање — Libart
+Name[sr@Latn]=KSVG-ov pozadinski sistem za renderovanje — Libart
+Name[sv]=KSVG-uppritningsmodul - konstbibliotek
+Name[ta]=KSVG வழஙà¯à®•à¯à®®à¯ பின௠அமைபà¯à®ªà¯ - லிபாரà¯à®Ÿà¯
+Name[tg]=Лағжандаи таÑовироти KSVG - Libart
+Name[tr]=KSVG Derleme Aracı - Libart
+Name[uk]=Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ KSVG - Libart
+Name[zh_CN]=KSVG 渲染åŽç«¯ - Libart
+Name[zh_HK]=KSVG åˆæˆå¾Œç«¯ - Libart
+Name[zh_TW]=KSVG ä¸Šè‰²å¾Œç«¯ä»‹é¢ - Libart
+Comment=Mature ksvg rendering backend
+Comment[ar]=خلÙية الرسم Ù„ksvg البالغة
+Comment[bs]=Zreli ksvg rendering backend
+Comment[ca]=Representador madur en segon pla de ksvg
+Comment[cs]=Vyspělý vykreslovací nástroj KSVG
+Comment[cy]=Ôl-wyneb llunio ksvg aeddfed
+Comment[da]=Modent underliggende program til ksvg-visning
+Comment[de]=Ausgereiftes KSVG-Darstellungsmodul
+Comment[el]=ÎÏιμο σÏστημα υποστήÏιξης αποτÏπωσης του KSVG
+Comment[es]=Motor de procesado de ksvg tradicional
+Comment[et]=Kasutamisküps ksvg renderdamise taustarakendus
+Comment[eu]=ksvg errendatze programa egonkorra
+Comment[fa]=پایانۀ پشتیبانی کامل پرداخت ksvg
+Comment[fi]=Kypsä ksvg-piirtäjän taustaohjelma
+Comment[fr]=Moteur de rendu KSVG mature
+Comment[gl]=Mecanismo de interpretación maduro ksvg
+Comment[hi]=परिपकà¥à¤µ के-à¤à¤¸à¤µà¥€à¤œà¥€ रेंडरिंग बैकà¤à¤£à¥à¤¡
+Comment[hu]=Egy kiforrott megjelenítőmotor a KSVG-hez
+Comment[is]=Reyndur ksvg teiknari
+Comment[it]=Maturo backend di KSVG per il rendering
+Comment[ja]=æˆç†Ÿã—㟠ksvg レンダリングãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰
+Comment[kk]=БаÑÒ“Ñ‹, жетілірдірген, KSVG кеÑкіндеу бағдарламаÑÑ‹
+Comment[km]=កម្មវិធី​សម្រាប់​បង្ហាញ ksvg ចាស់ៗ
+Comment[lt]=Išvystyta ksvg atkūrimo programinė sąsaja
+Comment[ms]=Tepi belakang menrealisasi ksvg matang
+Comment[nb]=Velutviklet modul for ksvg-tegning
+Comment[nds]=Reep KSVG-Dorstellhölper
+Comment[ne]=पूरà¥à¤£ विकसित ksvg रेनà¥à¤¡à¤°à¤¿à¤™ बà¥à¤¯à¤¾à¤•à¤‡à¤¨à¥à¤¡
+Comment[nl]=Volgroeide KSVG weergavecomponent
+Comment[nn]=Velutvikla modul for ksvg-teikning
+Comment[pl]=Dopracowane narzędzie do renderowania KSVG
+Comment[pt]=Uma infra-estrutura de desenho do ksvg mais madura
+Comment[pt_BR]=Estrutura de renderização madura do ksvg
+Comment[ro]=Motor de randare KSVG matur
+Comment[ru]=Старый движок отриÑовки ksvg
+Comment[sk]=Stabilný nástroj pre zobrazovanie ksvg
+Comment[sl]=Zrel izrisovalnik KSVG
+Comment[sr]=Стари KSVG-ов позадинÑки ÑиÑтем за рендеровање
+Comment[sr@Latn]=Stari KSVG-ov pozadinski sistem za renderovanje
+Comment[sv]=Mogen KSVG-uppritningsmodul
+Comment[ta]=à®®à¯à®´à¯à®®à¯ˆà®¯à®¾à®© ksvg வழஙà¯à®•à¯à®®à¯ பின௠அமைபà¯à®ªà¯
+Comment[tg]=Лағжандаи таÑовироти кӯҳнаи ksvg
+Comment[tr]=Tamamlanmış ksvg derleme aracı
+Comment[uk]=Стабільний Ñ–Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ KSVG
+Comment[zh_CN]=稳定的 ksvg 渲染åŽç«¯
+Comment[zh_HK]=æˆç†Ÿçš„ ksvg åˆæˆå¾Œç«¯
+Comment[zh_TW]=æˆç†Ÿçš„ ksvg 上色後端介é¢
+author=Nikolas Zimmermann <wildfox@kde.org>
diff --git a/ksvg/plugin/ksvg_factory.cpp b/ksvg/plugin/ksvg_factory.cpp
new file mode 100644
index 00000000..b231783c
--- /dev/null
+++ b/ksvg/plugin/ksvg_factory.cpp
@@ -0,0 +1,100 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kaboutdata.h>
+#include <kinstance.h>
+#include <klocale.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+
+#include "ksvg_plugin.h"
+#include "ksvg_factory.moc"
+
+#include <kdebug.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+extern "C"
+{
+ void *init_libksvgplugin()
+ {
+ KGlobal::locale()->insertCatalogue("ksvgplugin");
+ return new KSVGPluginFactory();
+ }
+}
+
+KInstance *KSVGPluginFactory::s_instance = 0;
+KAboutData *KSVGPluginFactory::s_about = 0;
+
+KSVGPluginFactory::KSVGPluginFactory(QObject *parent, const char *name) : KParts::Factory(parent, name)
+{
+}
+
+KSVGPluginFactory::~KSVGPluginFactory()
+{
+ delete s_instance;
+ s_instance = 0;
+ delete s_about;
+
+ s_about = 0;
+}
+
+KParts::Part *KSVGPluginFactory::createPartObject(QWidget *parentWidget, const char *wname, QObject *parent, const char *name, const char *, const QStringList &args)
+{
+ // Get the width and height of the <embed>
+ // TODO : <object>
+ unsigned int width = 0, height = 0;
+ bool dummy;
+ QRegExp r1("(WIDTH)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
+ QRegExp r2("(HEIGHT)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
+ for(QValueListConstIterator<QString> it = args.begin(); it != args.end(); ++it)
+ {
+ if(r1.search(*it) > -1)
+ width = r1.cap(3).toUInt(&dummy);
+ if(r2.search(*it) > -1)
+ height = r2.cap(3).toUInt(&dummy);
+ }
+
+ return new KSVGPlugin(parentWidget, wname, parent, name, width, height);
+}
+
+KInstance *KSVGPluginFactory::instance()
+{
+ if(!s_instance)
+ {
+ s_about = new KAboutData("ksvg", I18N_NOOP("KSVG"), "0.1", "KSVG\nFreedom for veKtors",KAboutData::License_GPL_V2,"(c) 2001-2003, The KSVG Team",0,"http://svg.kde.org");
+ s_about->addAuthor("Rob Buis", 0, "buis@kde.org");
+ s_about->addAuthor("Nikolas Zimmermann", 0, "wildfox@kde.org");
+ s_about->addCredit("Adrian Page", 0);
+ s_about->addCredit("Andreas Streichardt", 0, "mop@spaceregents.de");
+ s_instance = new KInstance(s_about);
+ }
+
+ return s_instance;
+}
+
+KSVGPluginBrowserExtension::KSVGPluginBrowserExtension(KSVGPlugin *parent)
+: KParts::BrowserExtension(parent, "KSVGPlugin BrowserExtension")
+{
+}
+
+KSVGPluginBrowserExtension::~KSVGPluginBrowserExtension()
+{
+}
diff --git a/ksvg/plugin/ksvg_factory.h b/ksvg/plugin/ksvg_factory.h
new file mode 100644
index 00000000..b462c782
--- /dev/null
+++ b/ksvg/plugin/ksvg_factory.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGFactory_H
+#define KSVGFactory_H
+
+#include <kparts/factory.h>
+#include <kparts/browserextension.h>
+
+class KAboutData;
+class KInstance;
+
+class KSVGPluginFactory : public KParts::Factory
+{
+Q_OBJECT
+public:
+ KSVGPluginFactory(QObject *parent = 0, const char *name = 0);
+ virtual ~KSVGPluginFactory();
+
+ virtual KParts::Part *createPartObject(QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList());
+
+ static KInstance *instance();
+
+private:
+ static KInstance *s_instance;
+ static KAboutData *s_about;
+};
+
+class KSVGPluginBrowserExtension : public KParts::BrowserExtension
+{
+Q_OBJECT
+friend class KSVGPlugin;
+
+public:
+ KSVGPluginBrowserExtension(KSVGPlugin *parent);
+ virtual ~KSVGPluginBrowserExtension();
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvg_plugin.cpp b/ksvg/plugin/ksvg_plugin.cpp
new file mode 100644
index 00000000..37e0a0dd
--- /dev/null
+++ b/ksvg/plugin/ksvg_plugin.cpp
@@ -0,0 +1,417 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <krun.h>
+#include <kdebug.h>
+#include <kaction.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+#include <ktempfile.h>
+#include <ksimpleconfig.h>
+#include <kaboutapplication.h>
+
+#include "ksvg_widget.h"
+#include "ksvg_factory.h"
+#include "ksvg_plugin.moc"
+
+#include "KSVGCanvas.h"
+#include "KSVGLoader.h"
+#include "CanvasFactory.h"
+#include "DocumentFactory.h"
+
+#include "SVGDocument.h"
+#include "SVGWindowImpl.h"
+#include "SVGZoomAndPan.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+#include <qimage.h>
+
+using namespace KSVG;
+
+#define DEFAULT_WIDTH 400
+#define DEFAULT_HEIGHT 400
+#define ZOOM_FACTOR 1.2
+
+struct KSVGPlugin::Private
+{
+ KSVGWidget *window;
+ KSVGPluginBrowserExtension *extension;
+
+ KAction *zoomInAction;
+ KAction *zoomOutAction;
+ KAction *zoomResetAction;
+ KAction *stopAnimationsAction;
+ KAction *viewSourceAction;
+ KAction *viewMemoryAction;
+ KAction *aboutApp;
+ KAction *saveToPNG;
+ KToggleAction *fontKerningAction;
+ KToggleAction *progressiveAction;
+ KSelectAction *renderingBackendAction;
+
+ QString description;
+
+ QPoint panPoint;
+ float zoomFactor;
+
+ SVGDocumentImpl *doc;
+ KSVGCanvas *canvas;
+ QPixmap *backgroundPixmap;
+ KAboutApplication *aboutKSVG;
+
+ unsigned int width;
+ unsigned int height;
+};
+
+KSVGPlugin::KSVGPlugin(QWidget *wparent, const char *, QObject *parent, const char *name, unsigned int width, unsigned int height) : KParts::ReadOnlyPart(parent, name)
+{
+ kdDebug(26003) << "KSVGPlugin::KSVGPlugin" << endl;
+ setInstance(KSVGPluginFactory::instance());
+
+ ksvgd = new KSVGPlugin::Private();
+
+ ksvgd->width = width;
+ ksvgd->height = height;
+
+ ksvgd->zoomFactor = 1.0;
+
+ ksvgd->doc = 0;
+
+ ksvgd->window = new KSVGWidget(this, wparent, "Rendering Widget");
+ connect(ksvgd->window, SIGNAL(browseURL(const QString &)), this, SLOT(browseURL(const QString &)));
+ ksvgd->window->show();
+
+ KParts::Part::setWidget(ksvgd->window);
+
+ ksvgd->extension = new KSVGPluginBrowserExtension(this);
+
+ ksvgd->backgroundPixmap = new QPixmap(width > 0 ? width : DEFAULT_WIDTH, height > 0 ? height : DEFAULT_HEIGHT);
+ ksvgd->backgroundPixmap->fill();
+
+ ksvgd->canvas = KSVG::CanvasFactory::self()->loadCanvas(width > 0 ? width : DEFAULT_WIDTH, height > 0 ? height : DEFAULT_HEIGHT);
+ if(!ksvgd->canvas)
+ return;
+
+ ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window);
+
+ ksvgd->zoomInAction = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection());
+ ksvgd->zoomOutAction = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection());
+ ksvgd->zoomResetAction = new KAction(i18n("Zoom &Reset"), "viewmag", this, SLOT(slotZoomReset()), actionCollection(), "zoom_reset");
+ ksvgd->stopAnimationsAction = new KAction(i18n("&Stop Animations"), "stop", Key_Escape, this, SLOT(slotStop()), actionCollection(), "stop_anims");
+ ksvgd->viewSourceAction = new KAction(i18n("View &Source"), "document2", Key_F6, this, SLOT(slotViewSource()), actionCollection(), "view_source");
+ ksvgd->viewMemoryAction = new KAction(i18n("View &Memory"), "document2", Key_F7, this, SLOT(slotViewMemory()), actionCollection(), "view_memory");
+ ksvgd->saveToPNG = new KAction(i18n("Save to PNG..."), "save", 0, this, SLOT(slotSaveToPNG()), actionCollection(), "save_to_png");
+// ksvgd->aboutApp = KStdAction::aboutApp(this, SLOT(slotAboutKSVG()), actionCollection());//, "KSVG");
+ ksvgd->aboutApp = new KAction(i18n("About KSVG"), "vectorgfx", 0, this, SLOT(slotAboutKSVG()), actionCollection(), "help_about_app");
+ ksvgd->fontKerningAction = new KToggleAction(i18n("Use Font &Kerning"), "viewmagfit", Key_F8, this, SLOT(slotFontKerning()), actionCollection(), "font_kerning");
+ ksvgd->progressiveAction = new KToggleAction(i18n("Use &Progressive Rendering"), "", Key_F9, this, SLOT(slotProgressiveRendering()), actionCollection(), "progressive");
+
+ KSimpleConfig config("ksvgpluginrc", true);
+ config.setGroup("Rendering");
+ ksvgd->fontKerningAction->setChecked(config.readBoolEntry("FontKerning", true));
+ ksvgd->progressiveAction->setChecked(config.readBoolEntry("ProgressiveRendering", true));
+
+ ksvgd->renderingBackendAction = new KSelectAction(i18n("Rendering &Backend"), 0, this, SLOT(slotRenderingBackend()), actionCollection(), "rendering_backend");
+
+ QStringList items;
+ QPtrList<KSVG::CanvasInfo> canvasList = KSVG::CanvasFactory::self()->canvasList();
+ QPtrListIterator<KSVG::CanvasInfo> it(canvasList);
+ KSVG::CanvasInfo *canvasInfo = 0;
+ while((canvasInfo = it.current()) != 0)
+ {
+ items << canvasInfo->name;
+ ++it;
+ }
+
+ ksvgd->renderingBackendAction->setItems(items);
+ ksvgd->renderingBackendAction->setCurrentItem(KSVG::CanvasFactory::self()->itemInList(ksvgd->canvas));
+
+ ksvgd->aboutKSVG = new KAboutApplication(KSVGPluginFactory::instance()->aboutData(), wparent);
+
+ setXMLFile("ksvgplugin.rc");
+}
+
+KSVGPlugin::~KSVGPlugin()
+{
+ kdDebug(26003) << "KSVGPlugin::~KSVGPlugin" << endl;
+
+ if(ksvgd->doc && ksvgd->doc->rootElement())
+ ksvgd->doc->rootElement()->pauseAnimations();
+
+ KSVG::CanvasFactory::self()->cleanup();
+ delete ksvgd->extension;
+
+ if(ksvgd->doc)
+ ksvgd->doc->detach();
+
+ delete ksvgd->canvas;
+ delete ksvgd->backgroundPixmap;
+ delete ksvgd;
+}
+
+SVGDocumentImpl *KSVGPlugin::docImpl()
+{
+ return ksvgd->doc;
+}
+
+SVGDocument KSVGPlugin::document()
+{
+ return SVGDocument(ksvgd->doc);
+}
+
+void KSVGPlugin::reset()
+{
+ if(ksvgd->canvas)
+ ksvgd->canvas->reset();
+
+ ksvgd->zoomFactor = 1;
+ ksvgd->window->reset();
+ ksvgd->panPoint = QPoint(0, 0);
+}
+
+bool KSVGPlugin::openURL(const KURL &url)
+{
+ m_url = url;
+
+ if(!url.prettyURL().isEmpty())
+ {
+ reset();
+
+ DocumentFactory *docFactory = DocumentFactory::self();
+
+ // when embedded, stick to passed width and height
+ ksvgd->doc = docFactory->requestDocumentImpl((ksvgd->width > 0 && ksvgd->height > 0));
+
+ ksvgd->doc->attach(ksvgd->canvas);
+ ksvgd->doc->addToDocumentDict(ksvgd->doc->handle(), ksvgd->doc);
+ ksvgd->doc->setReferrer(ksvgd->extension->urlArgs().metaData()["referrer"]);
+
+ connect(ksvgd->doc, SIGNAL(finishedParsing(bool, const QString &)), this, SLOT(slotParsingFinished(bool, const QString &)));
+ connect(ksvgd->doc, SIGNAL(finishedRendering()), this, SLOT(slotRenderingFinished()));
+ connect(ksvgd->doc, SIGNAL(gotDescription(const QString &)), this, SLOT(slotSetDescription(const QString &)));
+ connect(ksvgd->doc, SIGNAL(gotTitle(const QString &)), this, SLOT(slotSetTitle(const QString &)));
+ connect(ksvgd->doc, SIGNAL(gotURL(const QString &)), this, SLOT(slotGotURL(const QString &)));
+ connect(ksvgd->window, SIGNAL(redraw(const QRect &)), this, SLOT(slotRedraw(const QRect &)));
+
+ ksvgd->backgroundPixmap->fill();
+ bitBlt(ksvgd->window, 0, 0, ksvgd->backgroundPixmap, 0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height());
+ ksvgd->zoomFactor = 1;
+
+ emit started(0);
+ ksvgd->doc->open(url);
+ emit completed();
+ }
+ else
+ return false;
+
+ return true;
+}
+
+void KSVGPlugin::browseURL(const QString &url)
+{
+ ksvgd->doc->rootElement()->pauseAnimations();
+ KParts::URLArgs args;
+ args.frameName = "_self";
+ emit ksvgd->extension->openURLRequest(KURL(m_url, url), args);
+}
+
+void KSVGPlugin::slotRedraw(const QRect &r)
+{
+ if(ksvgd->window->width() != ksvgd->backgroundPixmap->width() ||
+ ksvgd->window->height() != ksvgd->backgroundPixmap->height())
+ {
+ ksvgd->backgroundPixmap->resize(ksvgd->window->width(), ksvgd->window->height());
+
+ if(ksvgd->doc && ksvgd->doc->canvas())
+ {
+ ksvgd->doc->canvas()->resize(ksvgd->window->width(), ksvgd->window->height());
+ ksvgd->doc->canvas()->blit();
+ }
+ }
+
+ bitBlt(ksvgd->window, r.x(), r.y(), ksvgd->backgroundPixmap, r.x(), r.y(), r.width(), r.height());
+}
+
+void KSVGPlugin::slotViewSource()
+{
+ KTempFile temp;
+ *temp.textStream() << KSVGLoader::getUrl(m_url, true) << endl;
+ KRun::runURL(KURL(temp.name()), "text/plain", true);
+}
+
+void KSVGPlugin::slotViewMemory()
+{
+ KTempFile temp;
+ *temp.textStream() << ksvgd->doc->window()->printNode(*ksvgd->doc).string() << endl;
+ KRun::runURL(KURL(temp.name()), "text/plain", true);
+}
+
+void KSVGPlugin::slotFontKerning()
+{
+ KSimpleConfig config("ksvgpluginrc", false);
+ config.setGroup("Rendering");
+ config.writeEntry("FontKerning", ksvgd->fontKerningAction->isChecked());
+
+ if(ksvgd->doc)
+ {
+ SVGSVGElementImpl *root = ksvgd->doc->rootElement();
+ if(!root)
+ return;
+
+ ksvgd->doc->canvas()->fontContext()->setKerning(ksvgd->fontKerningAction->isChecked());
+ update();
+ }
+}
+
+void KSVGPlugin::slotProgressiveRendering()
+{
+ KSimpleConfig config("ksvgpluginrc", false);
+ config.setGroup("Rendering");
+ config.writeEntry("ProgressiveRendering", ksvgd->progressiveAction->isChecked());
+}
+
+void KSVGPlugin::slotRenderingBackend()
+{
+ KSimpleConfig config("ksvgpluginrc", false);
+ config.setGroup("Canvas");
+ config.writeEntry("ActiveCanvas", KSVG::CanvasFactory::self()->internalNameFor(ksvgd->renderingBackendAction->currentText()));
+ config.sync();
+ KSVG::CanvasFactory::self()->deleteCanvas(ksvgd->canvas);
+ ksvgd->canvas = KSVG::CanvasFactory::self()->loadCanvas(ksvgd->width > 0 ? ksvgd->width : DEFAULT_WIDTH, ksvgd->height > 0 ? ksvgd->height : DEFAULT_HEIGHT);
+ if(!ksvgd->canvas)
+ return;
+
+ ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window);
+ openURL(m_url);
+}
+
+void KSVGPlugin::slotAboutKSVG()
+{
+ ksvgd->aboutKSVG->show();
+}
+
+void KSVGPlugin::slotStop()
+{
+ if(ksvgd->doc->rootElement()->animationsPaused())
+ ksvgd->doc->rootElement()->unpauseAnimations();
+ else
+ ksvgd->doc->rootElement()->pauseAnimations();
+}
+
+void KSVGPlugin::slotParsingFinished(bool error, const QString &errorDesc)
+{
+ emit completed();
+
+ if(error)
+ {
+ kdDebug(26003) << "Finished with error : " << errorDesc << endl;
+ emit setStatusBarText(errorDesc);
+ }
+ else
+ kdDebug(26003) << "Finished without errors!" << endl;
+}
+
+void KSVGPlugin::slotRenderingFinished()
+{
+ bitBlt(ksvgd->window, 0, 0, ksvgd->backgroundPixmap, 0, 0, ksvgd->canvas->width(), ksvgd->canvas->height());
+}
+
+void KSVGPlugin::slotZoomIn()
+{
+ ksvgd->zoomFactor *= ZOOM_FACTOR;
+ update();
+}
+
+void KSVGPlugin::slotZoomOut()
+{
+ ksvgd->zoomFactor *= (1.0 / ZOOM_FACTOR);
+ update();
+}
+
+void KSVGPlugin::slotZoomReset()
+{
+ ksvgd->zoomFactor = 1.0;
+ update();
+}
+
+void KSVGPlugin::slotSaveToPNG()
+{
+ if(ksvgd && ksvgd->backgroundPixmap)
+ {
+ QImage img = ksvgd->backgroundPixmap->convertToImage();
+ QString filename = KFileDialog::getSaveFileName();
+ if(!filename.isEmpty())
+ img.save(filename, "PNG");
+ }
+}
+
+void KSVGPlugin::setPanPoint(const QPoint &translate)
+{
+ ksvgd->panPoint = translate;
+ update();
+}
+
+void KSVGPlugin::update()
+{
+ if(ksvgd->doc)
+ {
+ SVGSVGElementImpl *root = ksvgd->doc->rootElement();
+ if(!root || root->zoomAndPan() != SVG_ZOOMANDPAN_MAGNIFY)
+ return;
+
+ ksvgd->backgroundPixmap->fill();
+
+ bool zoomChanged = ksvgd->zoomFactor != root->currentScale();
+ root->setCurrentScale(ksvgd->zoomFactor);
+ root->setCurrentTranslate(ksvgd->panPoint);
+
+ ksvgd->doc->syncCachedMatrices();
+
+ if(zoomChanged)
+ ksvgd->doc->canvas()->update(ksvgd->zoomFactor);
+ else
+ ksvgd->doc->canvas()->update(ksvgd->panPoint);
+
+ // Fixes drawing glitches
+ slotRedraw(QRect(0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height()));
+ }
+}
+
+void KSVGPlugin::slotSetDescription(const QString &desc)
+{
+ ksvgd->description = desc;
+ emit setStatusBarText(i18n("Description: %1").arg(desc));
+}
+
+void KSVGPlugin::slotSetTitle(const QString &title)
+{
+ emit setWindowCaption(title);
+}
+
+void KSVGPlugin::slotGotURL(const QString &text)
+{
+ if(text.isNull() && !ksvgd->description.isEmpty())
+ emit setStatusBarText(i18n("Description: %1").arg(ksvgd->description));
+ else
+ emit setStatusBarText(text);
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvg_plugin.h b/ksvg/plugin/ksvg_plugin.h
new file mode 100644
index 00000000..87286be9
--- /dev/null
+++ b/ksvg/plugin/ksvg_plugin.h
@@ -0,0 +1,87 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGPlugin_H
+#define KSVGPlugin_H
+
+#include <qobject.h>
+#include <kparts/part.h>
+
+namespace KSVG
+{
+ class SVGDocument;
+ class SVGDocumentImpl;
+ class SVGDescElementImpl;
+ class SVGTitleElementImpl;
+}
+
+class KSVGPlugin : public KParts::ReadOnlyPart
+{
+Q_OBJECT
+public:
+ KSVGPlugin(QWidget *parentWidget, const char *wname, QObject *parent, const char *name, unsigned int width = 0, unsigned int height = 0);
+ virtual ~KSVGPlugin();
+
+ virtual bool openFile() { return false; }
+ virtual bool openURL(const KURL &url);
+
+ KSVG::SVGDocument document();
+ KSVG::SVGDocumentImpl *docImpl();
+
+ void reset();
+ void setPanPoint(const QPoint &translate);
+ void update();
+ void setPopupActive(bool);
+
+signals:
+ void gotHyperlink(const QString &);
+ void gotHyperlinkCoordinate(const QRect &);
+
+public slots:
+ void slotRedraw(const QRect &);
+
+private slots:
+ void browseURL(const QString &url);
+ void slotStop();
+ void slotViewSource();
+ void slotViewMemory();
+ void slotFontKerning();
+ void slotProgressiveRendering();
+ void slotRenderingBackend();
+ void slotZoomIn();
+ void slotZoomOut();
+ void slotZoomReset();
+ void slotAboutKSVG();
+ void slotSaveToPNG();
+
+ void slotParsingFinished(bool error, const QString &errorDesc);
+ void slotRenderingFinished();
+ void slotSetDescription(const QString &);
+ void slotSetTitle(const QString &);
+ void slotGotURL(const QString &);
+
+private:
+ class Private;
+ Private *ksvgd;
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvg_widget.cpp b/ksvg/plugin/ksvg_widget.cpp
new file mode 100644
index 00000000..073e60a5
--- /dev/null
+++ b/ksvg/plugin/ksvg_widget.cpp
@@ -0,0 +1,267 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <kcursor.h>
+#include <kpopupmenu.h>
+#include <kxmlguifactory.h>
+#include "ksvg_widget.moc"
+
+#include "ksvg_plugin.h"
+#include "SVGDocumentImpl.h"
+#include "SVGSVGElementImpl.h"
+
+KSVGWidget::KSVGWidget(KSVGPlugin *part, QWidget *parent, const char *name)
+: QWidget(parent, name), m_part(part)
+{
+ setMouseTracking(true);
+ setFocusPolicy(WheelFocus);
+
+ setBackgroundMode(NoBackground);
+
+ reset();
+}
+
+KSVGWidget::~KSVGWidget()
+{
+}
+
+KSVGPlugin *KSVGWidget::part() const
+{
+ return m_part;
+}
+
+void KSVGWidget::reset()
+{
+ m_oldPanningPos.setX(0);
+ m_oldPanningPos.setY(0);
+ m_panningPos.setX(0);
+ m_panningPos.setY(0);
+}
+
+void KSVGWidget::paintEvent(QPaintEvent *e)
+{
+ emit redraw(e->rect());
+}
+
+KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, QMouseEvent *event)
+{
+ DOM::AbstractView temp;
+
+ int clientX = event->x();
+ int clientY = event->y();
+
+ if(part()->docImpl() && part()->docImpl()->rootElement())
+ {
+ clientX = int(clientX / part()->docImpl()->rootElement()->currentScale());
+ clientY = int(clientY / part()->docImpl()->rootElement()->currentScale());
+ }
+
+ int button = 0;
+ if(event->stateAfter() & Qt::LeftButton)
+ button = 1;
+ else if(event->stateAfter() & Qt::MidButton)
+ button = 2;
+ else if(event->stateAfter() & Qt::RightButton)
+ button = 3;
+
+ KSVG::SVGMouseEventImpl *mev = new KSVG::SVGMouseEventImpl(id, // type
+ true, // canBubbleArg
+ true, // cancelableArg
+ temp, // view
+ 0, // detail
+ event->globalX(), //screenXArg
+ event->globalY(), // screenYArg,
+ clientX, // clientXArg
+ clientY, // clientYArg
+ (event->state() & Qt::ControlButton), // ctrlKeyArg
+ (event->state() & Qt::AltButton), // altKeyArg
+ (event->state() & Qt::ShiftButton), // shiftKeyArg
+ (event->state() & Qt::MetaButton), // metaKeyArg
+ button, // buttonArg
+ 0);
+
+ mev->ref();
+
+ return mev;
+}
+
+void KSVGWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if(event->state() & QMouseEvent::ControlButton && event->state() & QMouseEvent::LeftButton)
+ {
+ if(m_panningPos.isNull())
+ m_panningPos = event->pos();
+ else
+ part()->setPanPoint(m_oldPanningPos - (m_panningPos - event->pos()));
+
+ return;
+ }
+ else if(event->state() & QMouseEvent::ControlButton)
+ return;
+
+ KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEMOVE_EVENT, event);
+
+ if(part()->docImpl() && part()->docImpl()->rootElement())
+ part()->docImpl()->rootElement()->prepareMouseEvent(event->pos(), event->pos(), mev);
+
+ if(mev->target() && mev->url().string().isEmpty())
+ {
+ KSVG::SVGElementImpl *target = const_cast<KSVG::SVGElementImpl *>(mev->target());
+ KSVG::SVGStylableImpl *style = dynamic_cast<KSVG::SVGStylableImpl *>(target);
+
+ if(!style)
+ {
+ setCursor(KCursor::arrowCursor());
+ return;
+ }
+
+ switch(style->getCursor())
+ {
+ case KSVG::CURSOR_CROSSHAIR:
+ setCursor(KCursor::crossCursor());
+ break;
+ case KSVG::CURSOR_POINTER:
+ setCursor(KCursor::handCursor());
+ break;
+ case KSVG::CURSOR_MOVE:
+ setCursor(KCursor::sizeAllCursor());
+ break;
+ case KSVG::CURSOR_E_RESIZE:
+ case KSVG::CURSOR_W_RESIZE:
+ setCursor(KCursor::sizeHorCursor());
+ break;
+ case KSVG::CURSOR_N_RESIZE:
+ case KSVG::CURSOR_S_RESIZE:
+ setCursor(KCursor::sizeVerCursor());
+ break;
+ case KSVG::CURSOR_NW_RESIZE:
+ case KSVG::CURSOR_SE_RESIZE:
+ setCursor(KCursor::sizeFDiagCursor());
+ break;
+ case KSVG::CURSOR_NE_RESIZE:
+ case KSVG::CURSOR_SW_RESIZE:
+ setCursor(KCursor::sizeBDiagCursor());
+ break;
+ case KSVG::CURSOR_TEXT:
+ setCursor(KCursor::ibeamCursor());
+ break;
+ case KSVG::CURSOR_WAIT:
+ setCursor(KCursor::waitCursor());
+ break;
+ case KSVG::CURSOR_HELP:
+ setCursor(KCursor::whatsThisCursor());
+ break;
+ default:
+ setCursor(KCursor::arrowCursor());
+ }
+ }
+ else if(mev->url().string().isEmpty())
+ setCursor(KCursor::arrowCursor());
+
+ if(!mev->url().string().isEmpty())
+ setCursor(KCursor::handCursor());
+
+ mev->deref();
+}
+
+void KSVGWidget::mousePressEvent(QMouseEvent *event)
+{
+ if(event->state() & QMouseEvent::ControlButton)
+ return;
+
+ if(event->button() == RightButton)
+ {
+ if(part() && part()->factory())
+ {
+ QPopupMenu *popup = static_cast<QPopupMenu *>(part()->factory()->container("popupmenu", part()));
+ if(popup)
+ popup->popup(event->globalPos());
+ }
+ }
+
+ KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEDOWN_EVENT, event);
+
+ if(part()->docImpl() && part()->docImpl()->rootElement())
+ part()->docImpl()->rootElement()->prepareMouseEvent(event->pos(), event->pos(), mev);
+
+ mev->deref();
+}
+
+void KSVGWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ if(!m_panningPos.isNull())
+ {
+ m_oldPanningPos = m_oldPanningPos - (m_panningPos - event->pos());
+ m_panningPos.setX(0);
+ m_panningPos.setY(0);
+ }
+
+ if(event->state() & QMouseEvent::ControlButton)
+ return;
+
+ KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEUP_EVENT, event);
+
+ if(part()->docImpl() && part()->docImpl()->rootElement())
+ part()->docImpl()->rootElement()->prepareMouseEvent(event->pos(), event->pos(), mev);
+
+ if(!mev->url().string().isEmpty())
+ {
+ QString url = mev->url().string();
+ if(url.startsWith("#"))
+ url.prepend(part()->docImpl()->baseUrl().prettyURL());
+ emit browseURL(url);
+ }
+
+ mev->deref();
+}
+
+void KSVGWidget::keyPressEvent(QKeyEvent *ke)
+{
+ if(ke->stateAfter() & QMouseEvent::ControlButton)
+ {
+ setCursor(KCursor::sizeAllCursor());
+ return;
+ }
+
+ if(part()->docImpl()->lastTarget())
+ part()->docImpl()->lastTarget()->dispatchKeyEvent(ke);
+}
+
+void KSVGWidget::keyReleaseEvent(QKeyEvent *ke)
+{
+ if(ke->state() & QMouseEvent::ControlButton)
+ {
+ setCursor(KCursor::arrowCursor());
+ return;
+ }
+
+ if(part()->docImpl()->lastTarget())
+ part()->docImpl()->lastTarget()->dispatchKeyEvent(ke);
+}
+
+void KSVGWidget::resizeEvent(QResizeEvent *e)
+{
+ if(part()->docImpl() && part()->docImpl()->rootElement())
+ part()->docImpl()->rootElement()->dispatchEvent(KSVG::SVGEvent::RESIZE_EVENT, true, false);
+
+ emit redraw(QRect(0, 0, e->size().width(), e->size().height()));
+}
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvg_widget.h b/ksvg/plugin/ksvg_widget.h
new file mode 100644
index 00000000..3cd94849
--- /dev/null
+++ b/ksvg/plugin/ksvg_widget.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KSVGWidget_H
+#define KSVGWidget_H
+
+#include <qwidget.h>
+
+#include <kpopupmenu.h>
+
+#include <SVGEventImpl.h>
+
+class KSVGPlugin;
+class KSVGWidget : public QWidget
+{
+Q_OBJECT
+public:
+ KSVGWidget(KSVGPlugin *part, QWidget *parent, const char *name);
+ virtual ~KSVGWidget();
+
+ KSVGPlugin *part() const;
+
+ void reset();
+
+protected:
+ virtual void paintEvent(QPaintEvent *);
+
+ virtual void mouseMoveEvent(QMouseEvent *);
+ virtual void mousePressEvent(QMouseEvent *);
+ virtual void mouseReleaseEvent(QMouseEvent *);
+
+ virtual void keyPressEvent(QKeyEvent *);
+ virtual void keyReleaseEvent(QKeyEvent *);
+
+ virtual void resizeEvent(QResizeEvent *);
+
+signals:
+ void browseURL(const QString &);
+ void redraw(const QRect &);
+
+private:
+ KSVG::SVGMouseEventImpl *newMouseEvent(KSVG::SVGEvent::EventId id, QMouseEvent *event);
+
+ QPoint m_panningPos;
+ QPoint m_oldPanningPos;
+ KSVGPlugin *m_part;
+};
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvgplugin.desktop b/ksvg/plugin/ksvgplugin.desktop
new file mode 100644
index 00000000..9eaffdc7
--- /dev/null
+++ b/ksvg/plugin/ksvgplugin.desktop
@@ -0,0 +1,85 @@
+[Desktop Entry]
+Name=KSVGPlugin
+Name[ar]=برنامج KSVGPlugin
+Name[ca]=Connector KSVG
+Name[cy]=AtegynKSVG
+Name[el]=ΠÏόσθετο KSVG
+Name[eo]=Vektorgrafiko-kromaĵo
+Name[eu]=KSVGPlugina
+Name[fr]=Module SVG
+Name[hi]=के-à¤à¤¸à¤µà¥€à¤œà¥€-पà¥à¤²à¤—इन
+Name[hu]=KSVG bővítőmodul
+Name[is]=KSVGÃforrit
+Name[lv]=KSVGIespraudnis
+Name[ne]=KSVG पà¥à¤²à¤—इन
+Name[pl]=Wtyczka KSVG
+Name[ro]=Modul KSVG
+Name[sv]=KSVG-insticksprogram
+Name[ta]=KSVGசொரà¯à®•à¯à®ªà¯à®ªà¯Šà®°à¯à®³à¯
+Name[tr]=KSVG Eklentisi
+Name[xh]=Iplagi efakiweyo ye KSVG
+Name[zu]=Iplagi efakiweyo ye KSVG
+Icon=vectorgfx
+MimeType=image/svg+xml;image/svg
+Comment=Scalable Vector Graphics Viewer
+Comment[ar]=عارض الرسومات الثابتة القابلة للقياس
+Comment[az]=Miqyaslı Vektor Qrafikaları Nümayişçisi
+Comment[bs]=Scalable Vector Graphics preglednik
+Comment[ca]=Visualitzador de gràfics vectorials escalables (SVG)
+Comment[cs]=ProhlížeÄ pro formát Scalable Vector Graphics (SVG)
+Comment[cy]=Gwelydd Graffeg Fector Graddedig
+Comment[da]=Fremviser af skalerbar vektorgrafik
+Comment[de]=Betrachter für skalierbare Vektorgraphiken
+Comment[el]=ΠÏοβολέας διανυσματικών γÏαφικών
+Comment[eo]=Rigardilo por pligrandigeblaj vektorgrafikoj
+Comment[es]=Visor de gráficos vectoriales escalables (SVG)
+Comment[et]=Skaleeritava vektorgraafika (SVG) näitaja
+Comment[eu]=Scalable Vector Graphics ikustailua
+Comment[fa]=مشاهده‌گر نگاره‌‌‌‌‌سازی مقیاس‌پذیر برداری
+Comment[fi]=Scalable Vector Graphics -näytin
+Comment[fr]=Afficheur d'images au format Graphisme vectoriel échelonnable (SVG)
+Comment[ga]=Amharcán SVG (Scalable Vector Graphics)
+Comment[gl]=Visor de gráficos vectoriais escalables
+Comment[hi]=सà¥à¤•à¥‡à¤²à¥‡à¤¬à¤² वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ पà¥à¤°à¤¦à¤°à¥à¤¶à¤•
+Comment[hr]=Preglednik SVG datoteka
+Comment[hu]=SVG-megjelenítő
+Comment[is]=Scalable Vector Graphics (SVG) myndbirtir
+Comment[it]=Visore di file SVG
+Comment[ja]=SVG (スケーラブルベクトルグラフィックス) ビューア
+Comment[kk]=SVG файлдарды қарау
+Comment[km]=កម្មវិធី​មើល​ក្រាហ្វិក​វ៉ិចទáŸážšâ€‹áž˜áž¶áž“​មាážáŸ’រដ្ឋាន
+Comment[lt]=Kintamo dydžio vektorinė grafika
+Comment[lv]=MÄ“rogojamas Vektoru Grafikas SkatÄ«tÄjs
+Comment[ms]=Pemapar Grafik Vektor Boleh Skala
+Comment[mt]=Werrej tas-"Scalable Vector Graphics"
+Comment[nb]=Framvisningsprogram for SVG-bilde («Scalable Vector Graphics»)
+Comment[nds]=Kieker för skaleerbor Vektorgrafiken
+Comment[ne]=मापनयोगà¥à¤¯ भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ दरà¥à¤¶à¤•
+Comment[nl]=Scalable Vector Graphics-weergaveprogramma
+Comment[nn]=Framvisingsprogram for SVG-grafikk («Scalable Vector Graphics»)
+Comment[pl]=Przeglądarka dla plików SVG (skalowalnej grafiki wektorowej)
+Comment[pt]=Visualizador de Gráficos Vectoriais Escaláveis (SVG)
+Comment[pt_BR]=Visualizador de Vetores Escaláveis
+Comment[ro]=Vizualizor SVG
+Comment[ru]=ПроÑмотр SVG
+Comment[sk]=PrehliadaÄ pre Å¡kálovateľnú vektorovú grafiku SVG
+Comment[sl]=Pregledovalnik skalabilne vektorske grafike
+Comment[sr]=Приказивач Ñкалабилне векторÑке графике
+Comment[sr@Latn]=PrikazivaÄ skalabilne vektorske grafike
+Comment[sv]=Visning av skalbar vektorgrafik
+Comment[ta]=அளவிடகà¯à®•à¯‚டிய வெகà¯à®Ÿà®¾à®°à¯ சிதà¯à®¤à®¿à®°à®™à¯à®•à®³à¯ காடà¯à®šà®¿
+Comment[tg]=Ðамоиши SVG
+Comment[tr]=Boyutlandırılabilir Vektör Grafik Gösterici
+Comment[uk]=ПереглÑдач векторної графіки
+Comment[uz]=SVG koʻruvchi
+Comment[uz@cyrillic]=SVG кўрувчи
+Comment[ven]=Muvhono wa girafiki wa scalable vector
+Comment[xh]=Umboniseli wemizobo olinganiselwayo onesalathiso
+Comment[zh_CN]=å¯ç¼©æ”¾çŸ¢é‡å›¾æŸ¥çœ‹å™¨
+Comment[zh_HK]=å¯ç¸®æ”¾å‘é‡åœ–形(SVG)檢視器
+Comment[zh_TW]=å¯èª¿æ•´çš„å‘é‡åœ–形檢視器
+Comment[zu]=Umbonisi wemidwebo Onenani Elibalekayo
+Type=Service
+ServiceTypes=KParts/ReadOnlyPart,Browser/View
+X-KDE-Library=libksvgplugin
+InitialPreference=11
diff --git a/ksvg/plugin/ksvgplugin.rc b/ksvg/plugin/ksvgplugin.rc
new file mode 100644
index 00000000..a689f4d8
--- /dev/null
+++ b/ksvg/plugin/ksvgplugin.rc
@@ -0,0 +1,35 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="KSVGPlugin" version="2">
+<MenuBar>
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Separator/>
+ <Action name="view_zoom_in" />
+ <Action name="view_zoom_out" />
+ <Action name="stop_anims"/>
+ <Action name="view_source"/>
+ <Action name="font_kerning"/>
+ <Action name="rendering_backend"/>
+ <Action name="progressive"/>
+ </Menu>
+</MenuBar>
+<Toolbar name="ksvgToolBar">
+ <Action name="view_zoom_in" />
+ <Action name="view_zoom_out" />
+ <Action name="stop_anims"/>
+ <Action name="view_source"/>
+ <Action name="view_memory"/>
+ <Action name="font_kerning"/>
+</Toolbar>
+<Menu name="popupmenu">
+ <Action name="view_zoom_in" />
+ <Action name="view_zoom_out" />
+ <Action name="zoom_reset" />
+ <Action name="stop_anims"/>
+ <Action name="view_source"/>
+ <Separator weakSeparator="1" />
+ <Action name="view_memory"/>
+ <Action name="save_to_png"/>
+ <Separator weakSeparator="1" />
+ <Action name="help_about_app"/>
+</Menu>
+</kpartgui>
diff --git a/ksvg/plugin/svgcreator.cpp b/ksvg/plugin/svgcreator.cpp
new file mode 100644
index 00000000..c6689c9a
--- /dev/null
+++ b/ksvg/plugin/svgcreator.cpp
@@ -0,0 +1,92 @@
+/*
+ Copyright (c) 2001 Malte Starostik <malte@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+// $Id$
+
+#include <time.h>
+
+#include <qpixmap.h>
+#include <qimage.h>
+
+#include "KSVGCanvas.h"
+#include "CanvasFactory.h"
+
+#include <kapplication.h>
+
+#include "SVGSVGElementImpl.h"
+#include "SVGDocumentImpl.h"
+
+#include "svgcreator.moc"
+
+extern "C"
+{
+ ThumbCreator *new_creator()
+ {
+ return new SVGCreator;
+ }
+}
+
+SVGCreator::SVGCreator()
+{
+}
+
+SVGCreator::~SVGCreator()
+{
+}
+
+bool SVGCreator::create(const QString &path, int width, int height, QImage &img)
+{
+ KSVG::SVGDocumentImpl *doc = new KSVG::SVGDocumentImpl(false, true);
+ doc->ref();
+
+ QPixmap pix(width, height);
+ pix.fill(Qt::white);
+
+ KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height);
+ c->setup(&pix, &pix);
+
+ doc->attach(c);
+ connect(doc, SIGNAL(finishedRendering()), SLOT(slotFinished()));
+ doc->open( KURL::fromPathOrURL(path));
+
+ m_finished = false;
+
+ while(!m_finished)
+ kapp->processOneEvent();
+
+ doc->deref();
+
+ img = pix.convertToImage();
+
+ delete c;
+
+ return true;
+}
+
+void SVGCreator::slotFinished()
+{
+ m_finished = true;
+}
+
+ThumbCreator::Flags SVGCreator::flags() const
+{
+ return DrawFrame;
+}
+
+// vim: ts=4 sw=4 noet
diff --git a/ksvg/plugin/svgcreator.h b/ksvg/plugin/svgcreator.h
new file mode 100644
index 00000000..ad1b8f30
--- /dev/null
+++ b/ksvg/plugin/svgcreator.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (c) 2001 Malte Starostik <malte@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+// $Id$
+
+#ifndef __svgcreator_h__
+#define __svgcreator_h__
+
+#include <kio/thumbcreator.h>
+
+class SVGCreator : public QObject, public ThumbCreator
+{
+ Q_OBJECT
+public:
+ SVGCreator();
+ virtual ~SVGCreator();
+ virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual Flags flags() const;
+
+private slots:
+ void slotFinished();
+
+private:
+ bool m_finished;
+};
+
+#endif
+
+// vim: ts=4 sw=4 noet
diff --git a/ksvg/plugin/svgthumbnail.desktop b/ksvg/plugin/svgthumbnail.desktop
new file mode 100644
index 00000000..47fed23b
--- /dev/null
+++ b/ksvg/plugin/svgthumbnail.desktop
@@ -0,0 +1,52 @@
+[Desktop Entry]
+Type=Service
+Name=Scalable Vector Graphics
+Name[ar]=رسومات ثابتة قابلة للقياس
+Name[az]=Miqyaslı Vektor Qrafikaları
+Name[ca]=Gràfics vectorials escalables (SVG)
+Name[cy]=Graffeg Fector Graddedig
+Name[da]=Skalerbar vektorgrafik
+Name[de]=Skalierbare Vektorgraphiken
+Name[el]=Διανυσματικά γÏαφικά
+Name[eo]=Vektorgrafikoj
+Name[es]=Gráficos vectoriales escalables (SVG)
+Name[et]=Skaleeritav vektorgraafika (SVG)
+Name[fa]=نگاره‌سازی مقیاس‌پذیر برداری
+Name[fr]=Graphisme vectoriel échelonnable (SVG)
+Name[gl]=Gráficos vectoriais escalables
+Name[hi]=सà¥à¤•à¥‡à¤²à¥‡à¤¬à¤² वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸
+Name[hu]=SVG
+Name[it]=Grafica vettoriale riscalabile
+Name[ja]=SVG (スケーラブルベクトルグラフィックス)
+Name[kk]=SVG Ñызбалы Ñуреттер
+Name[km]=ក្រាហ្វិក​វ៉ិចទáŸážšâ€‹áž˜áž¶áž“​មាážáŸ’រដ្ឋាន
+Name[lt]=Kintamo dydžio vektorinė grafika
+Name[lv]=MÄ“rogojama Vektoru Grafika
+Name[ms]=Grafik Vektor Boleh Skala
+Name[nds]=Skaleerbor Vektorgrafiken
+Name[ne]=मापनयोगà¥à¤¯ भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸
+Name[pl]=Skalowalna Grafika Wektorowa
+Name[pt]=SVG - Gráficos Vectoriais Escaláveis
+Name[pt_BR]=Vetores Escaláveis
+Name[ro]=Grafică vectorială scalabilă (SVG)
+Name[ru]=Векторные риÑунки (.svg)
+Name[sl]=Skalabilna vektorska grafika
+Name[sr]=Скалабилна векторÑка графика (SVG)
+Name[sr@Latn]=Skalabilna vektorska grafika (SVG)
+Name[sv]=Skalbar vektorgrafik
+Name[ta]=அளவிடகà¯à®•à¯‚டிய வெகà¯à®Ÿà®¾à®°à¯ சிதà¯à®¤à®¿à®°à®™à¯à®•à®³à¯
+Name[tg]=РаÑмҳои вектории маÑштабкунанда (SVG)
+Name[tr]=Boyutlandırılabilir Vektör Grafiği
+Name[uk]=МаÑштабовна векторна графіка
+Name[ven]=Dzigirafiki ya vekitha ya Scalable
+Name[xh]=Imizobo elinganiselwayo enesalathisi
+Name[zh_CN]=å¯ç¼©æ”¾çŸ¢é‡å›¾
+Name[zh_HK]=å¯ç¸®æ”¾å‘é‡åœ–形(SVG)
+Name[zh_TW]=å¯èª¿æ•´çš„å‘é‡åœ–å½¢
+Name[zu]=Imidwebo Enenani Elibalekayo
+Icon=thumbnail
+MimeTypes=image/svg+xml
+X-KDE-Library=svgthumbnail
+ServiceTypes=ThumbCreator
+InitialPreference=5
+CacheThumbnail=true
diff --git a/ksvg/scripts/COPYRIGHTS b/ksvg/scripts/COPYRIGHTS
new file mode 100644
index 00000000..bcb24052
--- /dev/null
+++ b/ksvg/scripts/COPYRIGHTS
@@ -0,0 +1,19 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
diff --git a/ksvg/scripts/ECMACHECK b/ksvg/scripts/ECMACHECK
new file mode 100755
index 00000000..955ea81d
--- /dev/null
+++ b/ksvg/scripts/ECMACHECK
@@ -0,0 +1,25 @@
+#!/bin/bash
+TESTSUITE=test/official/1.0 # Nikos setting
+ECMATESTS=test/ecma
+konqueror $TESTSUITE/script-eventDom-BE-01.svg
+konqueror $TESTSUITE/script-uiEvents-BE-02.svg
+konqueror $TESTSUITE/dom-core-BE-01.svg
+konqueror $TESTSUITE/dom-eventListener-BE-04.svg
+konqueror $TESTSUITE/dom-featureString-BE-03.svg
+konqueror $TESTSUITE/dom-svg-BE-02.svg
+konqueror $TESTSUITE/extend-multiNS-BE-01.svg
+konqueror $TESTSUITE/interact-onload-BE-07.svg
+konqueror $TESTSUITE/interact-bubble-BE-04.svg
+konqueror $TESTSUITE/interact-pEvents-BE-05.svg
+konqueror $TESTSUITE/interact-pEvents-BE-06.svg
+konqueror $ECMATESTS/broken.svg
+konqueror $ECMATESTS/circle.svg
+konqueror $ECMATESTS/clock.svg
+konqueror $ECMATESTS/bbox/bbox-circle.svg
+konqueror $ECMATESTS/bbox/bbox-ellipse.svg
+konqueror $ECMATESTS/bbox/bbox-line.svg
+konqueror $ECMATESTS/bbox/bbox-path.svg
+konqueror $ECMATESTS/bbox/bbox-path2.svg
+konqueror $ECMATESTS/bbox/bbox-polygon.svg
+konqueror $ECMATESTS/bbox/bbox-polyline.svg
+konqueror $ECMATESTS/bbox/bbox-rect.svg
diff --git a/ksvg/scripts/OPENREF b/ksvg/scripts/OPENREF
new file mode 100755
index 00000000..f8fbecb0
--- /dev/null
+++ b/ksvg/scripts/OPENREF
@@ -0,0 +1,9 @@
+#!/bin/bash
+pid=`dcopstart konqueror --profile filemanagement`
+loc=`pwd`/$1
+sleep 1
+dcop $pid konqueror-mainwindow#1 openURL ${loc}svg
+sleep 1
+dcop $pid qt/KXMLGUILClient-KActionCollection/splitviewh activate
+sleep 1
+dcop $pid konqueror-mainwindow#1 openURL ${loc}png
diff --git a/ksvg/scripts/README b/ksvg/scripts/README
new file mode 100644
index 00000000..17130216
--- /dev/null
+++ b/ksvg/scripts/README
@@ -0,0 +1,16 @@
+This document explains how to generate a SVG C++ header/sourcefile pair :
+
+1. go to dir idl
+2. copy the svg.idl file to the classname you want to generate, for example SVGRect
+3. edit the newly created file to only include the class info, delete the rest
+4. run ../gen.sh classname (without extension) to generate the pair
+
+Caveats:
+1. all inheritance specification must be on the same line
+2. no support yet for exceptions, comments
+3. this works for mawk 1.3.3, with slight adjustments it should run for
+ other awk implementations
+
+07-07-2001
+Rob Buis.
+
diff --git a/ksvg/scripts/add_static.pl b/ksvg/scripts/add_static.pl
new file mode 100644
index 00000000..9a88c00f
--- /dev/null
+++ b/ksvg/scripts/add_static.pl
@@ -0,0 +1,42 @@
+# Add #include "ksvg_lookup.h", GENERATEDDATA and ELEMENTDATA to all headers passed as argument
+# Usage: perl -w -i.bak add_static.pl *.h
+my $added_ksvg_lookup = 0;
+#my $added_staticdata = 0;
+my $inclass=0;
+my $bracelevel=0;
+my $class_bracelevel;
+my $has_staticdata=0;
+while (<>) {
+ $added_ksvg_lookup=0 if (/\#ifndef/); # this while loop runs over multiple files...
+ $added_ksvg_lookup=1 if (/\#include \"ksvg_lookup.h\"/); # already there
+ if (!$added_ksvg_lookup) {
+ if (/^\s*\#\s*include/ || /^namespace/ || /^class/) {
+ $added_ksvg_lookup = 1;
+ print '#include "ksvg_lookup.h"' . "\n";
+ }
+ }
+ if ( /^class/ && !/;/ ) {
+ die if $inclass;
+ $inclass=1;
+ $class_bracelevel=$bracelevel;
+ $has_staticdata=0;
+ }
+ if ( /{/ ) {
+ $bracelevel++;
+ die if /{.*{/; # not handled currently
+ }
+ if ( /}/ ) {
+ $bracelevel--;
+ die if /}.*}/; # not handled currently
+ }
+ $has_staticdata = 1 if ( $inclass && /GENERATEDDATA/ );
+ if ( $inclass && ($class_bracelevel == $bracelevel) && /};/ ) {
+ print "public:\n\tGENERATEDDATA\n" if ( !$has_staticdata );
+ $inclass=0;
+ # $added_staticdata=1;
+ }
+ print;
+}
+die "still in class!" if ($inclass);
+die "bracelevel != 0!" if ($bracelevel);
+#die "found no class where to add GENERATEDDATA!" if (!$added_staticdata);
diff --git a/ksvg/scripts/check_hashtablesize.pl b/ksvg/scripts/check_hashtablesize.pl
new file mode 100755
index 00000000..d22e3f30
--- /dev/null
+++ b/ksvg/scripts/check_hashtablesize.pl
@@ -0,0 +1,224 @@
+# Script to check hashtable sizes.
+# Copyright 2002 Nikolas Zimmermann <wildfox@kde.org>
+
+my $input = shift;
+my $calcMode = 0;
+
+# Check incoming arguments
+if(length($input) > 0) {
+ $calcMode = $input;
+} else {
+ print "Usage:\n";
+ print "perl check_hashtablesize.pl [0/1/2]\n\n";
+ print "Show...\n";
+ print "0) all hashtables of prototype definitions\n";
+ print "1) all hashtables of non-prototype definitions\n";
+ print "2) all hashtables of svg*constructor definitions\n";
+ exit(-1);
+}
+
+# Test if a number is prime or not
+sub calcPrime
+{
+ my $start = shift;
+ my $dividecount = 0;
+
+ for(my $i = $start - 1; $i > 0; --$i)
+ {
+ my $result = $start / $i;
+
+ if($result == int($result)) {
+ $dividecount++;
+ }
+ }
+
+ if($dividecount == 1) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+# Find the next prime number
+sub findNextPrime
+{
+ my $start = shift;
+ my $i = $start + 1;
+ my $found = 0;
+
+ while($found == 0)
+ {
+ if(calcPrime($i)) {
+ $found = 1;
+ } else {
+ $i++;
+ }
+ }
+
+ return $i;
+}
+
+# Common routine for calculating hashtable sizes
+sub calcSize
+{
+ my $calc = shift;
+ my $save = shift;
+ my $minus = shift;
+
+ my @temp = split(/\n/, $calc);
+
+ foreach(@temp) {
+ my $process = $_;
+ $process =~ s/\s+/ /g;
+
+ my @line = split(/ /, $process);
+ my $class = substr($line[1], 0, index($line[1], ":") - $minus);
+
+ $$save{$class} = $line[2];
+ }
+}
+
+# Go to impl dir
+chdir "../impl";
+
+# Global counters
+my %counterwork;
+my %counter1;
+my %counter2;
+my %counter3;
+
+# Read hashtable size
+my $readSize1 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`;
+my $readSize2 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`;
+my $readSize3 = `find -type f | xargs grep -I DontDelete | grep KSVG::`;
+
+my @result1 = split(/.\//, $readSize1);
+my @result2 = split(/.\//, $readSize2);
+my @result3 = split(/.\//, $readSize3);
+
+# Calculate hashtable size
+# calcSize1 = print out all prototype hashtables
+# calcSize2 = print out all non-prototype hashtables
+# calcSize3 = print out all svg*constructors hashtables
+my $calcSize1 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`;
+my $calcSize2 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`;
+my $calcSize3 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`;
+
+# Bring in suitable form
+calcSize($calcSize1, \%counter1, 5);
+calcSize($calcSize2, \%counter2, 0);
+calcSize($calcSize3, \%counter3, 11);
+
+# Helper
+my $lastclass = "";
+
+print "Classname\t\t\t\t'H.S. File'\t\t'H.S. Calculated'\tIs 'H.S. File' prime?\tDo they differ?\n";
+print "-------------------------------------------------------------------------------------------------------------------------------\n";
+
+my @useresult;
+if($calcMode == 0) {
+ @useresult = @result1;
+} elsif($calcMode == 1) {
+ @useresult = @result2;
+} else {
+ @useresult = @result3;
+}
+
+foreach(@useresult) {
+ my $line = $_;
+ $line =~ s/\s+/ /g;
+
+ if($line ne "") {
+ my @middle = split(/ /, $line);
+ my $class = substr($middle[2], 0, index($middle[2], ":"));
+
+ # Special case for lists and svg*constructors
+ if($class eq "SVGListDefs" || $calcMode == 2)
+ {
+ my $temp = $middle[0];
+
+ if($calcMode != 2) {
+ $temp =~ s/.cc://;
+ $class = $temp;
+ } else {
+ $temp =~ s/.cc//;
+ $class = substr($temp, 0, index($temp, ":"));
+ }
+ }
+
+ if($class eq $lastclass) {
+ $counterwork{$class}++;
+ }
+ else {
+ $counterwork{$class} = 1;
+
+ if($lastclass ne "") {
+ my $len = length($lastclass);
+
+ my $string = $lastclass;
+
+ # Ugly hack with those numbers, anyone
+ # got a better idea?
+ if($len < 11) {
+ $string .= "\t\t\t\t\t";
+ } elsif($len < 16) {
+ $string .= "\t\t\t\t";
+ } elsif($len < 24) {
+ $string .= "\t\t\t";
+ } elsif($len < 32) {
+ $string .= "\t\t";
+ } else {
+ $string .= "\t";
+ }
+
+ my $combine;
+
+ if($calcMode == 0) {
+ $combine = $counter1{$lastclass};
+ } elsif($calcMode == 1) {
+ $combine = $counter2{$lastclass};
+ } else {
+ $combine = $counter3{$lastclass};
+ }
+
+ if($combine eq 0 || $combine eq "") {
+ $combine = "-";
+ }
+
+ $string .= $combine;
+ $string .= "\t\t\t";
+
+ # Find next prime
+ my $next = findNextPrime($counterwork{$lastclass});
+
+ $string .= $next;
+ $string .= "\t\t\t";
+
+ # Is 'H.S. File' a prime?
+ my $calc = calcPrime($combine);
+ if($calc == 0) {
+ $string .= "NO!";
+ } else {
+ $string .= "Yes";
+ }
+
+ $string .= "\t\t\t";
+
+ if($combine != $next) {
+ $string .= "YES!";
+ } else {
+ $string .= "No";
+ }
+
+ $string .= "\n";
+
+ print $string;
+ }
+ }
+
+ $lastclass = $class;
+ }
+}
+
+# Go back! :)
+chdir "../scripts";
diff --git a/ksvg/scripts/gen.sh b/ksvg/scripts/gen.sh
new file mode 100755
index 00000000..d608385b
--- /dev/null
+++ b/ksvg/scripts/gen.sh
@@ -0,0 +1,51 @@
+# try to find an appropriate awk interpreter
+if which mawk > /dev/null 2>&1; then
+ cmd_awk=`which mawk`;
+else
+ if which awk > /dev/null 2>&1; then
+ cmd_awk=`which awk`;
+ else
+ echo "No suitable AWK interpreter found. Aborting."
+ exit 1
+ fi
+fi
+
+# make them
+touch $1.h
+touch $1.cc
+
+#start with copyright notices
+cat ../COPYRIGHTS > $1.h
+cat ../COPYRIGHTS > $1.cc
+
+# add define for multiple include problem
+echo "" >> $1.h
+echo "#ifndef $1_H" >> $1.h
+echo "#define $1_H" >> $1.h
+echo "" >> $1.h
+echo "namespace KSVG" >> $1.h
+echo "{" >> $1.h
+echo "" >> $1.h
+
+#include in .cc + namespace
+echo "" >> $1.cc
+echo "#include \"$1.h\"" >> $1.cc
+echo "#include \"$1Impl.h\"" >> $1.cc
+echo "" >> $1.cc
+echo "using namespace KSVG;" >> $1.cc
+echo "" >> $1.cc
+
+#go go go
+$cmd_awk -f ../makeheader $1
+$cmd_awk -f ../makecc $1
+
+#add end of define
+echo "};" >> $1.h
+echo "" >> $1.h
+echo "#endif" >> $1.h
+echo "" >> $1.h
+
+echo "// vim:ts=4:noet" >> $1.h
+echo "// vim:ts=4:noet" >> $1.cc
+
+#done I hope
diff --git a/ksvg/scripts/generate.pl b/ksvg/scripts/generate.pl
new file mode 100755
index 00000000..a9419dcc
--- /dev/null
+++ b/ksvg/scripts/generate.pl
@@ -0,0 +1,69 @@
+#!/usr/bin/perl -w
+
+my $kalyptusdir = "../../../kdebindings/kalyptus";
+
+use File::Basename;
+
+my $here = `pwd`;
+chomp $here;
+my $outdir = $here . "/generate.pl.tmpdir";
+my $finaloutdir = $here;
+
+## Note: outdir and finaloutdir should NOT be the same dir!
+
+if (! -d $outdir) { mkdir $outdir; }
+
+mkdir $finaloutdir unless (-d $finaloutdir);
+
+
+# Need to cd to kalyptus's directory so that perl finds Ast.pm etc.
+chdir "$kalyptusdir" or die "Couldn't go to $kalyptusdir (edit script to change dir)\n";
+
+# Find out which header files we need to parse
+my %excludes = (
+);
+
+# List headers, and exclude the ones listed above
+my @headers = ();
+my $incdir=$here;
+opendir (INCS, $incdir) or die "Couldn't find $incdir";
+foreach $filename (readdir(INCS)) {
+ $entry = $incdir."/".$filename;
+ if ( ( -e $entry or -l $entry ) # A real file or a symlink
+ && ( ! -d _ ) ) # Not a symlink to a dir though
+ {
+ push(@headers, $entry)
+ if ( !defined $excludes{$filename} # Not excluded
+ && $filename =~ /\.h$/ ); # Not a backup file etc. Only headers.
+ }
+}
+closedir INCS;
+
+# Launch kalyptus
+system "perl kalyptus @ARGV -fECMA --name=ksvg --outputdir=$outdir @headers";
+my $exit = $? >> 8;
+exit $exit if ($exit);
+
+# Generate diff for generateddata.cpp
+if ( -e "$finaloutdir/generateddata.cpp" ) {
+ system "diff -u $finaloutdir/generateddata.cpp $outdir/generateddata.cpp > $outdir/generateddata.cpp.diff";
+}
+
+# Copy changed or new files to finaloutdir
+#opendir (OUT, $outdir) or die "Couldn't opendir $outdir";
+#foreach $filename (readdir(OUT)) {
+my $filename = "generateddata.cpp";
+ #next if ( -d "$outdir/$filename" ); # only files, not dirs
+ my $docopy = 1;
+ if ( -f "$finaloutdir/$filename" ) {
+ # How can I do a fast file compare in perl?
+ system "cmp -s $outdir/$filename $finaloutdir/$filename";
+ $docopy = ($?>>8); # 0 if files identical, 1 if different
+ }
+ if ($docopy) {
+ #print STDERR "Updating $filename...\n";
+ system "cp -f $outdir/$filename $finaloutdir/$filename";
+ }
+
+# Delete outdir
+system "rm -rf $outdir";
diff --git a/ksvg/scripts/genimpl.sh b/ksvg/scripts/genimpl.sh
new file mode 100755
index 00000000..5a0742d2
--- /dev/null
+++ b/ksvg/scripts/genimpl.sh
@@ -0,0 +1,49 @@
+# try to find an appropriate awk interpreter
+if which mawk > /dev/null 2>&1; then
+ cmd_awk=`which mawk`;
+else
+ if which awk > /dev/null 2>&1; then
+ cmd_awk=`which awk`;
+ else
+ echo "No suitable AWK interpreter found. Aborting."
+ exit 1
+ fi
+fi
+
+# you cant touch this
+touch $1Impl.h
+touch $1Impl.cc
+
+#start with copyright notices
+cat ../COPYRIGHTS > $1Impl.h
+cat ../COPYRIGHTS > $1Impl.cc
+
+# add define for multiple include problem
+echo "" >> $1Impl.h
+echo "#ifndef $1Impl_H" >> $1Impl.h
+echo "#define $1Impl_H" >> $1Impl.h
+
+# namespace
+echo "" >> $1Impl.h
+echo "namespace KSVG" >> $1Impl.h
+echo "{" >> $1Impl.h
+
+#include in .cc + namespace
+echo "" >> $1Impl.cc
+echo "#include \"$1Impl.h\"" >> $1Impl.cc
+echo "" >> $1Impl.cc
+echo "using namespace KSVG;" >> $1Impl.cc
+echo "" >> $1Impl.cc
+
+#go go go
+$cmd_awk -f ../makeimpl $1
+
+#add end of define
+echo "};" >> $1Impl.h
+echo "" >> $1Impl.h
+echo "#endif" >> $1Impl.h
+echo "" >> $1Impl.h
+echo "// vim:ts=4:noet" >> $1Impl.h
+
+echo "// vim:ts=4:noet" >> $1Impl.cc
+#done I hope
diff --git a/ksvg/scripts/getjs.php b/ksvg/scripts/getjs.php
new file mode 100755
index 00000000..5f300fe9
--- /dev/null
+++ b/ksvg/scripts/getjs.php
@@ -0,0 +1,390 @@
+#!/usr/local/bin/php
+<?
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+class ecma_class
+{
+ var $properties; // array of properties
+ var $functions; // array of functions $functions[0][0]="geturl"; $functions[0][1]="2";
+ var $constants; // array of functions
+ var $class; // classname
+ var $params;
+ var $readonly;
+
+ function ecma_class($name)
+ {
+ $this->class=$name;
+ $this->functions=array();
+ $this->properties=array();
+ $this->constants=array();
+ $this->parmas=array();
+ }
+
+ function add_content($content)
+ {
+ if ($content->type==0)
+ {
+ if (!in_array($content->name,$this->properties))
+ {
+ $this->properties[]=$content->name;
+ $this->readonly[$content->name]=$content->readonly;
+ }
+ }
+ elseif ($content->type==1)
+ {
+ if (!in_array($content->name,$this->functions))
+ {
+ $this->functions[]=$content->name;
+ $this->params[$content->name]=$content->params;
+ }
+ }
+ elseif ($content->type==2)
+ {
+ if (!in_array($content->name,$this->constants))
+ $this->constants[]=$content->name;
+ }
+ }
+
+ function to_text()
+ {
+ $headline=$this->class." (".(sizeof($this->properties))." Properties and ".(sizeof($this->functions))." Functions and ".(sizeof($this->constants))." Constants)";
+ echo($headline."\n");
+ echo("====================");
+ echo("\n\n");
+
+
+ echo("Properties\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ echo($this->properties[$i]."\n");
+ }
+
+ echo("\n");
+ echo("Functions\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo($this->functions[$i]."\n");
+ }
+
+ echo("\n");
+ echo("Constants\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo($this->constants[$i]."\n");
+ }
+
+ echo("\n%%%%%%%%%%%%%%%%%%%%%%%%\n\n");
+ }
+
+ function to_html()
+ {
+ echo("<a name=\"".$this->class."\"></a>");
+ echo("<a href=\"#toc\">Back to Index</a>");
+ echo("<table border=\"1\" style=\"border-width: medium; border-collapse: collapse\">\n");
+ echo("<tr><td colspan=\"3\"><h2 style=\"text-align: left\">".$this->class."</h2></td></tr>\n");
+
+ if (sizeof($this->functions)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Functions</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->functions[$i]."</td><td>".$this->params[$this->functions[$i]]." Parameter(s)</td></tr>\n");
+ }
+ }
+
+ if (sizeof($this->properties)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Properties</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ if ($this->readonly[$this->properties[$i]])
+ $readonly="Property is ReadOnly";
+ else
+ $readonly="Property is ReadWrite";
+
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->properties[$i]."</td><td>$readonly</td></tr>\n");
+ }
+ }
+
+ if (sizeof($this->constants)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Constants</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->constants[$i]."</td></tr>\n");
+ }
+ }
+ echo("</table><br><br>");
+ }
+
+ function to_svg(&$x,&$y)
+ {
+ $xtemp=$x+50;
+ $ytemp=$y+50;
+
+ echo("<text x=\"$xtemp\" y=\"$ytemp\">".$this->class."</text>");
+
+ $ytemp+=10;
+
+ if (sizeof($this->functions)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".($ytemp)."\">Functions</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo("<text x=\"".($xtemp+20)."\" y=\"".($ytemp)."\">".$this->functions[$i]." with ".$this->params[$this->functions[$i]]." Parameter(s)</text>\n");
+ $ytemp+=10;
+ }
+ }
+
+ if (sizeof($this->properties)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".($ytemp)."\">Properties</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ if ($this->readonly[$this->properties[$i]])
+ $readonly="Property is ReadOnly";
+ else
+ $readonly="Property is ReadWrite";
+
+ echo("<text x=\"".($xtemp+20)."\" y=\"".$ytemp."\">".$this->properties[$i]." $readonly</text>\n");
+ $ytemp+=10;
+ }
+ }
+
+ if (sizeof($this->constants)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".$ytemp."\">Constants</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo("<text x=\"".($xtemp+20)."\" y=\"".$ytemp."\">".$this->constants[$i]."</text>\n");
+ $ytemp+=10;
+ }
+ }
+ $x=$xtemp+200;
+ }
+}
+
+class kalyptus_result
+{
+ var $class;
+ var $type; // 0 = Property ; 1 = Function ; 2 = Constant
+ var $name;
+ var $params;
+ var $readonly;
+
+ function kalyptus_result($class,$type,$name,$params=0)
+ {
+ $this->class=$class;
+ $this->type=$type;
+ $this->name=$name;
+ $this->params=$params;
+ }
+
+ function setReadOnly($value)
+ {
+ $this->readonly=$value;
+ }
+}
+
+function parse_kalyptus($line,&$fp,&$last_constructor)
+{
+ if (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*KSVG::.*DontDelete/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Constant ".$match[1]." in class ".$match[2]."\n");
+ return new kalyptus_result($last_constructor,2,$match[1]);
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*Function ([0-9])/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Function ".$match[1]." in class ".$match[2]."\n");
+ return new kalyptus_result($match[2],1,$match[1],$match[3]);
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*DontDelete\|ReadOnly/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Property ".$match[1]." in class ".$match[2]."\n");
+ $property=new kalyptus_result($match[2],0,$match[1]);
+ $property->setReadOnly(true);
+ return $property;
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*DontDelete/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Property ".$match[1]." in class ".$match[2]."\n");
+ $property=new kalyptus_result($match[2],0,$match[1]);
+ $property->setReadOnly(false);
+ return $property;
+ }
+ elseif (preg_match("/^[ \t@begin^#]*([a-zA-Z_]*)Constructor::s_hashTable.*/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"Constructor => ".$match[1]."\n");
+ $last_constructor=$match[1];
+ return false;
+ }
+ else
+ {
+ if (DEBUG) fputs($fp,"Ignored => ".$line."\n");
+ return false;
+ }
+}
+
+function do_output($output,$ecma_classes)
+{
+ ksort($ecma_classes);
+
+ reset($ecma_classes);
+
+ switch($output)
+ {
+ case "txt":
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_text();
+ }
+ break;
+ case "svg":
+ echo("<svg width=\"100%\" height=\"100%\">\n");
+
+ $x=0;
+ $y=0;
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_svg($x,$y);
+ }
+ echo("</svg>");
+ break;
+ default:
+ echo("<html>\n<body>\n");
+
+ echo("<a name=\"toc\"><h1>Contents</h1></a><br>\n");
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ echo("<a href=\"#".$classname."\">$classname</a><br>\n");
+ }
+
+ echo("<hr>\n");
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_html();
+ }
+ echo("</body>\n</html>");
+ }
+}
+
+function searchKalyptusCode($file,&$fp)
+{
+ global $ecma_classes;
+
+ ob_start();
+ readfile($file);
+ $content=ob_get_contents();
+ ob_end_clean();
+
+ if (preg_match("/@begin(.*)@end/s",$content,$matches)) // FIXME broken....if several @end's are there it takes always the last
+ {
+ if (DEBUG) fputs($fp,"Found ".(sizeof($matches)-1)." Matches in ".$file."\n");
+ for ($i=1;$i<sizeof($matches);$i++)
+ {
+ if (DEBUG) fputs($fp,"Checking ".$i.". Match\n");
+ $lines=explode("\n",$matches[$i]);
+ for ($j=0;$j<sizeof($lines);$j++)
+ {
+ $result=parse_kalyptus($lines[$j],$fp,$last_constructor);
+ if ($result)
+ $results[]=$result;
+ }
+ }
+
+ for ($i=0;$i<sizeof($results);$i++)
+ {
+ if ($ecma_classes[$results[$i]->class])
+ $ecma_classes[$results[$i]->class]->add_content($results[$i]);
+ else
+ {
+ $ecma_classes[$results[$i]->class]=new ecma_class($results[$i]->class);
+ $ecma_classes[$results[$i]->class]->add_content($results[$i]);
+ }
+ }
+ }
+}
+
+function crawlFiles($path)
+{
+ global $ecma_classes;
+
+ $fp=fopen("php://stderr","w+");
+
+ if ($dir = @opendir($path))
+ {
+ while (($file = readdir($dir)) !== false)
+ {
+ if (($file!=".") && ($file!=".."))
+ {
+ if (is_dir($path."/".$file))
+ {
+ fputs($fp,"Entering directory ".$file."\n");
+ crawlFiles($path."/".$file);
+ fputs($fp,"Leaving directory ".$file."\n");
+ }
+ elseif (is_file($path."/".$file) && preg_match("/^[A-Za-z0-9_]+(\.cc|\.cpp|\.h|\.hpp)$/",$file))
+ {
+ fputs($fp,"\tchecking $file\n");
+ searchKalyptusCode($path."/".$file,$fp);
+ }
+ }
+ }
+ closedir($dir);
+ }
+}
+
+define(DEBUG,0);
+
+$ecma_classes=array();
+
+$ksvg_path="../";
+
+$path=basename(realpath($ksvg_path));
+
+if ($path!="ksvg")
+{
+ echo "Execute it in base ksvg dir please :S\n";
+ return false;
+}
+
+crawlFiles($ksvg_path);
+
+do_output($argv[1],$ecma_classes);
+?>
diff --git a/ksvg/scripts/idl/svg.idl b/ksvg/scripts/idl/svg.idl
new file mode 100644
index 00000000..9b5ea3db
--- /dev/null
+++ b/ksvg/scripts/idl/svg.idl
@@ -0,0 +1,1756 @@
+// File: svg.idl
+#ifndef _SVG_IDL_
+#define _SVG_IDL_
+
+
+// For access to DOM2 core
+#include "dom.idl"
+
+// For access to DOM2 events
+#include "events.idl"
+
+// For access to those parts from DOM2 CSS OM used by SVG DOM.
+#include "css.idl"
+
+// For access to those parts from DOM2 Views OM used by SVG DOM.
+#include "views.idl"
+
+// For access to the SMIL OM used by SVG DOM.
+#include "smil.idl"
+
+#pragma prefix "dom.w3c.org"
+#pragma javaPackage "org.w3c.dom"
+module svg
+{
+ typedef dom::DOMString DOMString;
+ typedef dom::DOMException DOMException;
+ typedef dom::Element Element;
+ typedef dom::Document Document;
+ typedef dom::NodeList NodeList;
+
+ // Predeclarations
+ interface SVGElement;
+ interface SVGLangSpace;
+ interface SVGExternalResourcesRequired;
+ interface SVGTests;
+ interface SVGFitToViewBox;
+ interface SVGZoomAndPan;
+ interface SVGViewSpec;
+ interface SVGURIReference;
+ interface SVGPoint;
+ interface SVGMatrix;
+ interface SVGPreserveAspectRatio;
+ interface SVGAnimatedPreserveAspectRatio;
+ interface SVGTransformList;
+ interface SVGAnimatedTransformList;
+ interface SVGTransform;
+ interface SVGICCColor;
+ interface SVGColor;
+ interface SVGPaint;
+ interface SVGTransformable;
+ interface SVGDocument;
+ interface SVGSVGElement;
+ interface SVGElementInstance;
+ interface SVGElementInstanceList;
+
+
+ exception SVGException {
+ unsigned short code;
+ };
+
+ // SVGExceptionCode
+ const unsigned short SVG_WRONG_TYPE_ERR = 0;
+ const unsigned short SVG_INVALID_VALUE_ERR = 1;
+ const unsigned short SVG_MATRIX_NOT_INVERTABLE = 2;
+
+ interface SVGElement : Element {
+ attribute DOMString id;
+ // raises DOMException on setting
+ attribute DOMString xmlbase;
+ // raises DOMException on setting
+ readonly attribute SVGSVGElement ownerSVGElement;
+ readonly attribute SVGElement viewportElement;
+ };
+
+ interface SVGAnimatedBoolean {
+
+ attribute boolean baseVal;
+ // raises DOMException on setting
+ readonly attribute boolean animVal;
+ };
+
+ interface SVGAnimatedString {
+
+ attribute DOMString baseVal;
+ // raises DOMException on setting
+ readonly attribute DOMString animVal;
+ };
+
+ interface SVGStringList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ DOMString initialize ( in DOMString newItem )
+ raises( DOMException, SVGException );
+ DOMString getItem ( in unsigned long index )
+ raises( DOMException );
+ DOMString insertItemBefore ( in DOMString newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ DOMString replaceItem ( in DOMString newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ DOMString removeItem ( in unsigned long index )
+ raises( DOMException );
+ DOMString appendItem ( in DOMString newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedEnumeration {
+
+ attribute unsigned short baseVal;
+ // raises DOMException on setting
+ readonly attribute unsigned short animVal;
+ };
+
+ interface SVGAnimatedInteger {
+
+ attribute long baseVal;
+ // raises DOMException on setting
+ readonly attribute long animVal;
+ };
+
+ interface SVGNumber {
+
+ attribute float value;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedNumber {
+
+ attribute float baseVal;
+ // raises DOMException on setting
+ readonly attribute float animVal;
+ };
+
+ interface SVGNumberList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGNumber initialize ( in SVGNumber newItem )
+ raises( DOMException, SVGException );
+ SVGNumber getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGNumber insertItemBefore ( in SVGNumber newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGNumber replaceItem ( in SVGNumber newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGNumber removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGNumber appendItem ( in SVGNumber newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedNumberList {
+
+ readonly attribute SVGNumberList baseVal;
+ readonly attribute SVGNumberList animVal;
+ };
+
+ interface SVGLength {
+
+ // Length Unit Types
+ const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
+ const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
+ const unsigned short SVG_LENGTHTYPE_EMS = 3;
+ const unsigned short SVG_LENGTHTYPE_EXS = 4;
+ const unsigned short SVG_LENGTHTYPE_PX = 5;
+ const unsigned short SVG_LENGTHTYPE_CM = 6;
+ const unsigned short SVG_LENGTHTYPE_MM = 7;
+ const unsigned short SVG_LENGTHTYPE_IN = 8;
+ const unsigned short SVG_LENGTHTYPE_PT = 9;
+ const unsigned short SVG_LENGTHTYPE_PC = 10;
+
+ readonly attribute unsigned short unitType;
+ attribute float value;
+ // raises DOMException on setting
+ attribute float valueInSpecifiedUnits;
+ // raises DOMException on setting
+ attribute DOMString valueAsString;
+ // raises DOMException on setting
+
+ void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
+ void convertToSpecifiedUnits ( in unsigned short unitType );
+ };
+
+ interface SVGAnimatedLength {
+
+ readonly attribute SVGLength baseVal;
+ readonly attribute SVGLength animVal;
+ };
+
+ interface SVGLengthList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGLength initialize ( in SVGLength newItem )
+ raises( DOMException, SVGException );
+ SVGLength getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGLength insertItemBefore ( in SVGLength newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGLength replaceItem ( in SVGLength newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGLength removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGLength appendItem ( in SVGLength newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedLengthList {
+
+ readonly attribute SVGLengthList baseVal;
+ readonly attribute SVGLengthList animVal;
+ };
+
+ interface SVGAngle {
+
+ // Angle Unit Types
+ const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
+ const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
+ const unsigned short SVG_ANGLETYPE_DEG = 2;
+ const unsigned short SVG_ANGLETYPE_RAD = 3;
+ const unsigned short SVG_ANGLETYPE_GRAD = 4;
+
+ readonly attribute unsigned short unitType;
+ attribute float value;
+ // raises DOMException on setting
+ attribute float valueInSpecifiedUnits;
+ // raises DOMException on setting
+ attribute DOMString valueAsString;
+ // raises DOMException on setting
+
+ void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
+ void convertToSpecifiedUnits ( in unsigned short unitType );
+ };
+
+ interface SVGAnimatedAngle {
+
+ readonly attribute SVGAngle baseVal;
+ readonly attribute SVGAngle animVal;
+ };
+
+ interface SVGColor : css::CSSValue {
+ // Color Types
+ const unsigned short SVG_COLORTYPE_UNKNOWN = 0;
+ const unsigned short SVG_COLORTYPE_RGBCOLOR = 1;
+ const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
+ const unsigned short SVG_COLORTYPE_CURRENTCOLOR = 3;
+
+ readonly attribute unsigned short colorType;
+ readonly attribute css::RGBColor rgbColor;
+ readonly attribute SVGICCColor iccColor;
+
+ void setRGBColor ( in DOMString rgbColor )
+ raises( SVGException );
+ void setRGBColorICCColor ( in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ void setColor ( in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ };
+
+ interface SVGICCColor {
+
+ attribute DOMString colorProfile;
+ // raises DOMException on setting
+ readonly attribute SVGNumberList colors;
+ };
+
+ interface SVGRect {
+
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float width;
+ // raises DOMException on setting
+ attribute float height;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedRect {
+
+ readonly attribute SVGRect baseVal;
+ readonly attribute SVGRect animVal;
+ };
+
+ interface SVGUnitTypes {
+
+ // Unit Types
+ const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+ const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+ };
+
+ interface SVGStylable {
+
+ readonly attribute SVGAnimatedString className;
+ readonly attribute css::CSSStyleDeclaration style;
+
+ css::CSSValue getPresentationAttribute ( in DOMString name );
+ };
+
+ interface SVGLocatable {
+
+ readonly attribute SVGElement nearestViewportElement;
+ readonly attribute SVGElement farthestViewportElement;
+
+ SVGRect getBBox ( );
+ SVGMatrix getCTM ( );
+ SVGMatrix getScreenCTM ( );
+ SVGMatrix getTransformToElement ( in SVGElement element )
+ raises( SVGException );
+ };
+
+ interface SVGTransformable : SVGLocatable {
+ readonly attribute SVGAnimatedTransformList transform;
+ };
+
+ interface SVGTests {
+
+ readonly attribute SVGStringList requiredFeatures;
+ readonly attribute SVGStringList requiredExtensions;
+ readonly attribute SVGStringList systemLanguage;
+
+ boolean hasExtension ( in DOMString extension );
+ };
+
+ interface SVGLangSpace {
+
+ attribute DOMString xmllang;
+ // raises DOMException on setting
+ attribute DOMString xmlspace;
+ // raises DOMException on setting
+ };
+
+ interface SVGExternalResourcesRequired {
+
+ readonly attribute SVGAnimatedBoolean externalResourcesRequired;
+ };
+
+ interface SVGFitToViewBox {
+
+ readonly attribute SVGAnimatedRect viewBox;
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+ };
+
+ interface SVGZoomAndPan {
+
+ // Zoom and Pan Types
+ const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
+ const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
+ const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
+
+ attribute unsigned short zoomAndPan;
+ // raises DOMException on setting
+ };
+
+ interface SVGViewSpec :
+ SVGZoomAndPan,
+ SVGFitToViewBox {
+
+ readonly attribute SVGTransformList transform;
+ readonly attribute SVGElement viewTarget;
+ readonly attribute DOMString viewBoxString;
+ readonly attribute DOMString preserveAspectRatioString;
+ readonly attribute DOMString transformString;
+ readonly attribute DOMString viewTargetString;
+ };
+
+ interface SVGURIReference {
+
+ readonly attribute SVGAnimatedString href;
+ };
+
+ interface SVGCSSRule : css::CSSRule {
+ // Additional CSS RuleType to support ICC color specifications
+ const unsigned short COLOR_PROFILE_RULE = 7;
+ };
+
+ interface SVGRenderingIntent {
+
+ // Rendering Intent Types
+ const unsigned short RENDERING_INTENT_UNKNOWN = 0;
+ const unsigned short RENDERING_INTENT_AUTO = 1;
+ const unsigned short RENDERING_INTENT_PERCEPTUAL = 2;
+ const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
+ const unsigned short RENDERING_INTENT_SATURATION = 4;
+ const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
+ };
+
+ interface SVGDocument :
+ Document,
+ events::DocumentEvent {
+
+ readonly attribute DOMString title;
+ readonly attribute DOMString referrer;
+ readonly attribute DOMString domain;
+ readonly attribute DOMString URL;
+ readonly attribute SVGSVGElement rootElement;
+ };
+
+ interface SVGSVGElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGLocatable,
+ SVGFitToViewBox,
+ SVGZoomAndPan,
+ events::EventTarget,
+ events::DocumentEvent,
+ css::ViewCSS,
+ css::DocumentCSS {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ attribute DOMString contentScriptType;
+ // raises DOMException on setting
+ attribute DOMString contentStyleType;
+ // raises DOMException on setting
+ readonly attribute SVGRect viewport;
+ readonly attribute float pixelUnitToMillimeterX;
+ readonly attribute float pixelUnitToMillimeterY;
+ readonly attribute float screenPixelToMillimeterX;
+ readonly attribute float screenPixelToMillimeterY;
+ attribute boolean useCurrentView;
+ // raises DOMException on setting
+ readonly attribute SVGViewSpec currentView;
+ attribute float currentScale;
+ // raises DOMException on setting
+ readonly attribute SVGPoint currentTranslate;
+
+ unsigned long suspendRedraw ( in unsigned long max_wait_milliseconds );
+ void unsuspendRedraw ( in unsigned long suspend_handle_id )
+ raises( DOMException );
+ void unsuspendRedrawAll ( );
+ void forceRedraw ( );
+ void pauseAnimations ( );
+ void unpauseAnimations ( );
+ boolean animationsPaused ( );
+ float getCurrentTime ( );
+ void setCurrentTime ( in float seconds );
+ NodeList getIntersectionList ( in SVGRect rect, in SVGElement referenceElement );
+ NodeList getEnclosureList ( in SVGRect rect, in SVGElement referenceElement );
+ boolean checkIntersection ( in SVGElement element, in SVGRect rect );
+ boolean checkEnclosure ( in SVGElement element, in SVGRect rect );
+ void deselectAll ( );
+ SVGNumber createSVGNumber ( );
+ SVGLength createSVGLength ( );
+ SVGAngle createSVGAngle ( );
+ SVGPoint createSVGPoint ( );
+ SVGMatrix createSVGMatrix ( );
+ SVGRect createSVGRect ( );
+ SVGTransform createSVGTransform ( );
+ SVGTransform createSVGTransformFromMatrix ( in SVGMatrix matrix );
+ Element getElementById ( in DOMString elementId );
+ };
+
+ interface SVGGElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface SVGDefsElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface SVGDescElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGStylable {};
+
+ interface SVGTitleElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGStylable {};
+
+ interface SVGSymbolElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox,
+ events::EventTarget {};
+
+ interface SVGUseElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGElementInstance instanceRoot;
+ readonly attribute SVGElementInstance animatedInstanceRoot;
+ };
+
+ interface SVGElementInstance : events::EventTarget {
+ readonly attribute SVGElement correspondingElement;
+ readonly attribute SVGUseElement correspondingUseElement;
+ readonly attribute SVGElementInstance parentNode;
+ readonly attribute SVGElementInstanceList childNodes;
+ readonly attribute SVGElementInstance firstChild;
+ readonly attribute SVGElementInstance lastChild;
+ readonly attribute SVGElementInstance previousSibling;
+ readonly attribute SVGElementInstance nextSibling;
+ };
+
+ interface SVGElementInstanceList {
+
+ readonly attribute unsigned long length;
+
+ SVGElementInstance item ( in unsigned long index );
+ };
+
+ interface SVGImageElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+ };
+
+ interface SVGSwitchElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface GetSVGDocument {
+
+ SVGDocument getSVGDocument ( )
+ raises( DOMException );
+ };
+
+ interface SVGStyleElement : SVGElement {
+ attribute DOMString xmlspace;
+ // raises DOMException on setting
+ attribute DOMString type;
+ // raises DOMException on setting
+ attribute DOMString media;
+ // raises DOMException on setting
+ attribute DOMString title;
+ // raises DOMException on setting
+ };
+
+ interface SVGPoint {
+
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+
+ SVGPoint matrixTransform ( in SVGMatrix matrix );
+ };
+
+ interface SVGPointList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGPoint initialize ( in SVGPoint newItem )
+ raises( DOMException, SVGException );
+ SVGPoint getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPoint insertItemBefore ( in SVGPoint newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPoint replaceItem ( in SVGPoint newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPoint removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPoint appendItem ( in SVGPoint newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGMatrix {
+
+ attribute float a;
+ // raises DOMException on setting
+ attribute float b;
+ // raises DOMException on setting
+ attribute float c;
+ // raises DOMException on setting
+ attribute float d;
+ // raises DOMException on setting
+ attribute float e;
+ // raises DOMException on setting
+ attribute float f;
+ // raises DOMException on setting
+
+ SVGMatrix multiply ( in SVGMatrix secondMatrix );
+ SVGMatrix inverse ( )
+ raises( SVGException );
+ SVGMatrix translate ( in float x, in float y );
+ SVGMatrix scale ( in float scaleFactor );
+ SVGMatrix scaleNonUniform ( in float scaleFactorX, in float scaleFactorY );
+ SVGMatrix rotate ( in float angle );
+ SVGMatrix rotateFromVector ( in float x, in float y )
+ raises( SVGException );
+ SVGMatrix flipX ( );
+ SVGMatrix flipY ( );
+ SVGMatrix skewX ( in float angle );
+ SVGMatrix skewY ( in float angle );
+ };
+
+ interface SVGTransform {
+
+ // Transform Types
+ const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
+ const unsigned short SVG_TRANSFORM_MATRIX = 1;
+ const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
+ const unsigned short SVG_TRANSFORM_SCALE = 3;
+ const unsigned short SVG_TRANSFORM_ROTATE = 4;
+ const unsigned short SVG_TRANSFORM_SKEWX = 5;
+ const unsigned short SVG_TRANSFORM_SKEWY = 6;
+
+ readonly attribute unsigned short type;
+ readonly attribute SVGMatrix matrix;
+ readonly attribute float angle;
+
+ void setMatrix ( in SVGMatrix matrix );
+ void setTranslate ( in float tx, in float ty );
+ void setScale ( in float sx, in float sy );
+ void setRotate ( in float angle, in float cx, in float cy );
+ void setSkewX ( in float angle );
+ void setSkewY ( in float angle );
+ };
+
+ interface SVGTransformList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGTransform initialize ( in SVGTransform newItem )
+ raises( DOMException, SVGException );
+ SVGTransform getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGTransform insertItemBefore ( in SVGTransform newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGTransform replaceItem ( in SVGTransform newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGTransform removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGTransform appendItem ( in SVGTransform newItem )
+ raises( DOMException, SVGException );
+ SVGTransform createSVGTransformFromMatrix ( in SVGMatrix matrix );
+ SVGTransform consolidate ( );
+ };
+
+ interface SVGAnimatedTransformList {
+
+ readonly attribute SVGTransformList baseVal;
+ readonly attribute SVGTransformList animVal;
+ };
+
+ interface SVGPreserveAspectRatio {
+
+ // Alignment Types
+ const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+ const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+ // Meet-or-slice Types
+ const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
+ const unsigned short SVG_MEETORSLICE_MEET = 1;
+ const unsigned short SVG_MEETORSLICE_SLICE = 2;
+
+ attribute unsigned short align;
+ // raises DOMException on setting
+ attribute unsigned short meetOrSlice;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedPreserveAspectRatio {
+
+ readonly attribute SVGPreserveAspectRatio baseVal;
+ readonly attribute SVGPreserveAspectRatio animVal;
+ };
+
+ interface SVGPathSeg {
+
+ // Path Segment Types
+ const unsigned short PATHSEG_UNKNOWN = 0;
+ const unsigned short PATHSEG_CLOSEPATH = 1;
+ const unsigned short PATHSEG_MOVETO_ABS = 2;
+ const unsigned short PATHSEG_MOVETO_REL = 3;
+ const unsigned short PATHSEG_LINETO_ABS = 4;
+ const unsigned short PATHSEG_LINETO_REL = 5;
+ const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6;
+ const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9;
+ const unsigned short PATHSEG_ARC_ABS = 10;
+ const unsigned short PATHSEG_ARC_REL = 11;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13;
+ const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14;
+ const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+
+ readonly attribute unsigned short pathSegType;
+ readonly attribute DOMString pathSegTypeAsLetter;
+ };
+
+ interface SVGPathSegClosePath : SVGPathSeg {};
+
+ interface SVGPathSegMovetoAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegMovetoRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegArcAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float r1;
+ // raises DOMException on setting
+ attribute float r2;
+ // raises DOMException on setting
+ attribute float angle;
+ // raises DOMException on setting
+ attribute boolean largeArcFlag;
+ // raises DOMException on setting
+ attribute boolean sweepFlag;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegArcRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float r1;
+ // raises DOMException on setting
+ attribute float r2;
+ // raises DOMException on setting
+ attribute float angle;
+ // raises DOMException on setting
+ attribute boolean largeArcFlag;
+ // raises DOMException on setting
+ attribute boolean sweepFlag;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoHorizontalRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoVerticalAbs : SVGPathSeg {
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoVerticalRel : SVGPathSeg {
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGPathSeg initialize ( in SVGPathSeg newItem )
+ raises( DOMException, SVGException );
+ SVGPathSeg getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPathSeg insertItemBefore ( in SVGPathSeg newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPathSeg replaceItem ( in SVGPathSeg newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPathSeg removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPathSeg appendItem ( in SVGPathSeg newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedPathData {
+
+ readonly attribute SVGPathSegList pathSegList;
+ readonly attribute SVGPathSegList normalizedPathSegList;
+ readonly attribute SVGPathSegList animatedPathSegList;
+ readonly attribute SVGPathSegList animatedNormalizedPathSegList;
+ };
+
+ interface SVGPathElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPathData {
+
+ readonly attribute SVGAnimatedNumber pathLength;
+
+ float getTotalLength ( );
+ SVGPoint getPointAtLength ( in float distance );
+ unsigned long getPathSegAtLength ( in float distance );
+ SVGPathSegClosePath createSVGPathSegClosePath ( );
+ SVGPathSegMovetoAbs createSVGPathSegMovetoAbs ( in float x, in float y );
+ SVGPathSegMovetoRel createSVGPathSegMovetoRel ( in float x, in float y );
+ SVGPathSegLinetoAbs createSVGPathSegLinetoAbs ( in float x, in float y );
+ SVGPathSegLinetoRel createSVGPathSegLinetoRel ( in float x, in float y );
+ SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs ( in float x, in float y, in float x1, in float y1, in float x2, in float y2 );
+ SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel ( in float x, in float y, in float x1, in float y1, in float x2, in float y2 );
+ SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs ( in float x, in float y, in float x1, in float y1 );
+ SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel ( in float x, in float y, in float x1, in float y1 );
+ SVGPathSegArcAbs createSVGPathSegArcAbs ( in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag );
+ SVGPathSegArcRel createSVGPathSegArcRel ( in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag );
+ SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs ( in float x );
+ SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel ( in float x );
+ SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs ( in float y );
+ SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel ( in float y );
+ SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs ( in float x, in float y, in float x2, in float y2 );
+ SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel ( in float x, in float y, in float x2, in float y2 );
+ SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs ( in float x, in float y );
+ SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel ( in float x, in float y );
+ };
+
+ interface SVGRectElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedLength rx;
+ readonly attribute SVGAnimatedLength ry;
+ };
+
+ interface SVGCircleElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength r;
+ };
+
+ interface SVGEllipseElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength rx;
+ readonly attribute SVGAnimatedLength ry;
+ };
+
+ interface SVGLineElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x1;
+ readonly attribute SVGAnimatedLength y1;
+ readonly attribute SVGAnimatedLength x2;
+ readonly attribute SVGAnimatedLength y2;
+ };
+
+ interface SVGAnimatedPoints {
+
+ readonly attribute SVGPointList points;
+ readonly attribute SVGPointList animatedPoints;
+ };
+
+ interface SVGPolylineElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPoints {};
+
+ interface SVGPolygonElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPoints {};
+
+ interface SVGTextContentElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ events::EventTarget {
+
+ // lengthAdjust Types
+ const unsigned short LENGTHADJUST_UNKNOWN = 0;
+ const unsigned short LENGTHADJUST_SPACING = 1;
+ const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
+
+ readonly attribute SVGAnimatedLength textLength;
+ readonly attribute SVGAnimatedEnumeration lengthAdjust;
+
+ long getNumberOfChars ( );
+ float getComputedTextLength ( );
+ float getSubStringLength ( in unsigned long charnum, in unsigned long nchars )
+ raises( DOMException );
+ SVGPoint getStartPositionOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ SVGPoint getEndPositionOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ SVGRect getExtentOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ float getRotationOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ long getCharNumAtPosition ( in SVGPoint point );
+ void selectSubString ( in unsigned long charnum, in unsigned long nchars )
+ raises( DOMException );
+ };
+
+ interface SVGTextPositioningElement : SVGTextContentElement {
+ readonly attribute SVGAnimatedLengthList x;
+ readonly attribute SVGAnimatedLengthList y;
+ readonly attribute SVGAnimatedLengthList dx;
+ readonly attribute SVGAnimatedLengthList dy;
+ readonly attribute SVGAnimatedNumberList rotate;
+ };
+
+ interface SVGTextElement :
+ SVGTextPositioningElement,
+ SVGTransformable {};
+
+ interface SVGTSpanElement : SVGTextPositioningElement {};
+
+ interface SVGTRefElement :
+ SVGTextPositioningElement,
+ SVGURIReference {};
+
+ interface SVGTextPathElement :
+ SVGTextContentElement,
+ SVGURIReference {
+
+ // textPath Method Types
+ const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
+ const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
+ // textPath Spacing Types
+ const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
+ const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
+
+ readonly attribute SVGAnimatedLength startOffset;
+ readonly attribute SVGAnimatedEnumeration method;
+ readonly attribute SVGAnimatedEnumeration spacing;
+ };
+
+ interface SVGAltGlyphElement :
+ SVGTextPositioningElement,
+ SVGURIReference {
+
+ attribute DOMString glyphRef;
+ // raises DOMException on setting
+ attribute DOMString format;
+ // raises DOMException on setting
+ };
+
+ interface SVGAltGlyphDefElement : SVGElement {};
+
+ interface SVGAltGlyphItemElement : SVGElement {};
+
+ interface SVGGlyphRefElement :
+ SVGElement,
+ SVGURIReference,
+ SVGStylable {
+
+ attribute DOMString glyphRef;
+ // raises DOMException on setting
+ attribute DOMString format;
+ // raises DOMException on setting
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float dx;
+ // raises DOMException on setting
+ attribute float dy;
+ // raises DOMException on setting
+ };
+
+ interface SVGPaint : SVGColor {
+ // Paint Types
+ const unsigned short SVG_PAINTTYPE_UNKNOWN = 0;
+ const unsigned short SVG_PAINTTYPE_RGBCOLOR = 1;
+ const unsigned short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
+ const unsigned short SVG_PAINTTYPE_NONE = 101;
+ const unsigned short SVG_PAINTTYPE_CURRENTCOLOR = 102;
+ const unsigned short SVG_PAINTTYPE_URI_NONE = 103;
+ const unsigned short SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
+ const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR = 105;
+ const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
+ const unsigned short SVG_PAINTTYPE_URI = 107;
+
+ readonly attribute unsigned short paintType;
+ readonly attribute DOMString uri;
+
+ void setUri ( in DOMString uri );
+ void setPaint ( in unsigned short paintType, in DOMString uri, in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ };
+
+ interface SVGMarkerElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox {
+
+ // Marker Unit Types
+ const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
+ const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
+ const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
+ // Marker Orientation Types
+ const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
+ const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
+ const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
+
+ readonly attribute SVGAnimatedLength refX;
+ readonly attribute SVGAnimatedLength refY;
+ readonly attribute SVGAnimatedEnumeration markerUnits;
+ readonly attribute SVGAnimatedLength markerWidth;
+ readonly attribute SVGAnimatedLength markerHeight;
+ readonly attribute SVGAnimatedEnumeration orientType;
+ readonly attribute SVGAnimatedAngle orientAngle;
+
+ void setOrientToAuto ( );
+ void setOrientToAngle ( in SVGAngle angle );
+ };
+
+ interface SVGColorProfileElement :
+ SVGElement,
+ SVGURIReference,
+ SVGRenderingIntent {
+
+ attribute DOMString local;
+ // raises DOMException on setting
+ attribute DOMString name;
+ // raises DOMException on setting
+ attribute unsigned short renderingIntent;
+ // raises DOMException on setting
+ };
+
+ interface SVGColorProfileRule :
+ SVGCSSRule,
+ SVGRenderingIntent {
+
+ attribute DOMString src;
+ // raises DOMException on setting
+ attribute DOMString name;
+ // raises DOMException on setting
+ attribute unsigned short renderingIntent;
+ // raises DOMException on setting
+ };
+
+ interface SVGGradientElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ // Spread Method Types
+ const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
+ const unsigned short SVG_SPREADMETHOD_PAD = 1;
+ const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
+ const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
+
+ readonly attribute SVGAnimatedEnumeration gradientUnits;
+ readonly attribute SVGAnimatedTransformList gradientTransform;
+ readonly attribute SVGAnimatedEnumeration spreadMethod;
+ };
+
+ interface SVGLinearGradientElement : SVGGradientElement {
+ readonly attribute SVGAnimatedLength x1;
+ readonly attribute SVGAnimatedLength y1;
+ readonly attribute SVGAnimatedLength x2;
+ readonly attribute SVGAnimatedLength y2;
+ };
+
+ interface SVGRadialGradientElement : SVGGradientElement {
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength r;
+ readonly attribute SVGAnimatedLength fx;
+ readonly attribute SVGAnimatedLength fy;
+ };
+
+ interface SVGStopElement :
+ SVGElement,
+ SVGStylable {
+
+ readonly attribute SVGAnimatedNumber offset;
+ };
+
+ interface SVGPatternElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration patternUnits;
+ readonly attribute SVGAnimatedEnumeration patternContentUnits;
+ readonly attribute SVGAnimatedTransformList patternTransform;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+ interface SVGClipPathElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration clipPathUnits;
+ };
+
+ interface SVGMaskElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration maskUnits;
+ readonly attribute SVGAnimatedEnumeration maskContentUnits;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+ interface SVGFilterElement :
+ SVGElement,
+ SVGURIReference,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration filterUnits;
+ readonly attribute SVGAnimatedEnumeration primitiveUnits;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedInteger filterResX;
+ readonly attribute SVGAnimatedInteger filterResY;
+
+ void setFilterRes ( in unsigned long filterResX, in unsigned long filterResY );
+ };
+
+ interface SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedString result;
+ };
+
+ interface SVGFEBlendElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Blend Mode Types
+ const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
+ const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
+ const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
+ const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
+ const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
+ const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedEnumeration mode;
+ };
+
+ interface SVGFEColorMatrixElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Color Matrix Types
+ const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedEnumeration type;
+ readonly attribute SVGAnimatedNumberList values;
+ };
+
+ interface SVGFEComponentTransferElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGComponentTransferFunctionElement : SVGElement {
+ // Component Transfer Types
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+ readonly attribute SVGAnimatedEnumeration type;
+ readonly attribute SVGAnimatedNumberList tableValues;
+ readonly attribute SVGAnimatedNumber slope;
+ readonly attribute SVGAnimatedNumber intercept;
+ readonly attribute SVGAnimatedNumber amplitude;
+ readonly attribute SVGAnimatedNumber exponent;
+ readonly attribute SVGAnimatedNumber offset;
+ };
+
+ interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFECompositeElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Composite Operators
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedEnumeration operator;
+ readonly attribute SVGAnimatedNumber k1;
+ readonly attribute SVGAnimatedNumber k2;
+ readonly attribute SVGAnimatedNumber k3;
+ readonly attribute SVGAnimatedNumber k4;
+ };
+
+ interface SVGFEConvolveMatrixElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Edge Mode Values
+ const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
+ const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
+ const unsigned short SVG_EDGEMODE_WRAP = 2;
+ const unsigned short SVG_EDGEMODE_NONE = 3;
+
+ readonly attribute SVGAnimatedInteger orderX;
+ readonly attribute SVGAnimatedInteger orderY;
+ readonly attribute SVGAnimatedNumberList kernelMatrix;
+ readonly attribute SVGAnimatedNumber divisor;
+ readonly attribute SVGAnimatedNumber bias;
+ readonly attribute SVGAnimatedInteger targetX;
+ readonly attribute SVGAnimatedInteger targetY;
+ readonly attribute SVGAnimatedEnumeration edgeMode;
+ readonly attribute SVGAnimatedLength kernelUnitLengthX;
+ readonly attribute SVGAnimatedLength kernelUnitLengthY;
+ readonly attribute SVGAnimatedBoolean preserveAlpha;
+ };
+
+ interface SVGFEDiffuseLightingElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ readonly attribute SVGAnimatedNumber diffuseConstant;
+ };
+
+ interface SVGFEDistantLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber azimuth;
+ readonly attribute SVGAnimatedNumber elevation;
+ };
+
+ interface SVGFEPointLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber x;
+ readonly attribute SVGAnimatedNumber y;
+ readonly attribute SVGAnimatedNumber z;
+ };
+
+ interface SVGFESpotLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber x;
+ readonly attribute SVGAnimatedNumber y;
+ readonly attribute SVGAnimatedNumber z;
+ readonly attribute SVGAnimatedNumber pointsAtX;
+ readonly attribute SVGAnimatedNumber pointsAtY;
+ readonly attribute SVGAnimatedNumber pointsAtZ;
+ readonly attribute SVGAnimatedNumber specularExponent;
+ readonly attribute SVGAnimatedNumber limitingConeAngle;
+ };
+
+ interface SVGFEDisplacementMapElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Channel Selectors
+ const unsigned short SVG_CHANNEL_UNKNOWN = 0;
+ const unsigned short SVG_CHANNEL_R = 1;
+ const unsigned short SVG_CHANNEL_G = 2;
+ const unsigned short SVG_CHANNEL_B = 3;
+ const unsigned short SVG_CHANNEL_A = 4;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedNumber scale;
+ readonly attribute SVGAnimatedEnumeration xChannelSelector;
+ readonly attribute SVGAnimatedEnumeration yChannelSelector;
+ };
+
+ interface SVGFEFloodElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFEGaussianBlurElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber stdDeviationX;
+ readonly attribute SVGAnimatedNumber stdDeviationY;
+
+ void setStdDeviation ( in float stdDeviationX, in float stdDeviationY );
+ };
+
+ interface SVGFEImageElement :
+ SVGElement,
+ SVGURIReference,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {};
+
+ interface SVGFEMergeElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {};
+
+ interface SVGFEMergeNodeElement : SVGElement {
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFEMorphologyElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Morphology Operators
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedEnumeration operator;
+ readonly attribute SVGAnimatedLength radiusX;
+ readonly attribute SVGAnimatedLength radiusY;
+ };
+
+ interface SVGFEOffsetElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber dx;
+ readonly attribute SVGAnimatedNumber dy;
+ };
+
+ interface SVGFESpecularLightingElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ readonly attribute SVGAnimatedNumber specularConstant;
+ readonly attribute SVGAnimatedNumber specularExponent;
+ };
+
+ interface SVGFETileElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFETurbulenceElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Turbulence Types
+ const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
+ const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
+ // Stitch Options
+ const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_STITCHTYPE_STITCH = 1;
+ const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
+
+ readonly attribute SVGAnimatedNumber baseFrequencyX;
+ readonly attribute SVGAnimatedNumber baseFrequencyY;
+ readonly attribute SVGAnimatedInteger numOctaves;
+ readonly attribute SVGAnimatedNumber seed;
+ readonly attribute SVGAnimatedEnumeration stitchTiles;
+ readonly attribute SVGAnimatedEnumeration type;
+ };
+
+ interface SVGCursorElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGExternalResourcesRequired {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ };
+
+ interface SVGAElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedString target;
+ };
+
+ interface SVGViewElement :
+ SVGElement,
+ SVGExternalResourcesRequired,
+ SVGFitToViewBox,
+ SVGZoomAndPan {
+
+ readonly attribute SVGStringList viewTarget;
+ };
+
+ interface SVGScriptElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired {
+
+ attribute DOMString type;
+ // raises DOMException on setting
+ };
+
+ interface SVGEvent : events::Event {};
+
+ interface SVGZoomEvent : events::UIEvent {
+ readonly attribute SVGRect zoomRectScreen;
+ readonly attribute float previousScale;
+ readonly attribute SVGPoint previousTranslate;
+ readonly attribute float newScale;
+ readonly attribute SVGPoint newTranslate;
+ };
+
+ interface SVGAnimationElement :
+ SVGElement,
+ SVGTests,
+ SVGExternalResourcesRequired,
+ smil::ElementTimeControl,
+ events::EventTarget {
+
+ readonly attribute SVGElement targetElement;
+
+ float getStartTime ( );
+ float getCurrentTime ( );
+ float getSimpleDuration ( )
+ raises( DOMException );
+ };
+
+ interface SVGAnimateElement : SVGAnimationElement {};
+
+ interface SVGSetElement : SVGAnimationElement {};
+
+ interface SVGAnimateMotionElement : SVGAnimationElement {};
+
+ interface SVGMPathElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired {};
+
+ interface SVGAnimateColorElement : SVGAnimationElement {};
+
+ interface SVGAnimateTransformElement : SVGAnimationElement {};
+
+ interface SVGFontElement :
+ SVGElement,
+ SVGExternalResourcesRequired,
+ SVGStylable {};
+
+ interface SVGGlyphElement :
+ SVGElement,
+ SVGStylable {};
+
+ interface SVGMissingGlyphElement :
+ SVGElement,
+ SVGStylable {};
+
+ interface SVGHKernElement : SVGElement {};
+
+ interface SVGVKernElement : SVGElement {};
+
+ interface SVGFontFaceElement : SVGElement {};
+
+ interface SVGFontFaceSrcElement : SVGElement {};
+
+ interface SVGFontFaceUriElement : SVGElement {};
+
+ interface SVGFontFaceFormatElement : SVGElement {};
+
+ interface SVGFontFaceNameElement : SVGElement {};
+
+ interface SVGDefinitionSrcElement : SVGElement {};
+
+ interface SVGMetadataElement : SVGElement {};
+
+ interface SVGForeignObjectElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+
+};
+
+#endif // _SVG_IDL_ \ No newline at end of file
diff --git a/ksvg/scripts/makecc b/ksvg/scripts/makecc
new file mode 100644
index 00000000..29a28b93
--- /dev/null
+++ b/ksvg/scripts/makecc
@@ -0,0 +1,211 @@
+function printg( a )
+{
+ printf a >> FILENAME ".cc"
+}
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ # do method
+ i = 1
+ nrparams = 0
+ rettype = b[1]
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ printg( b[i++] )
+ printg( " " )
+ }
+ printg( clas "::" )
+ method = b[i]
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if( b[i + 1] != "float" && match( b[i + 1], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ printg( b[i++] " " )
+ }
+ param[nrparams++] = b[i]
+ if( float == "ok" )
+ printg( "&" b[i++] )
+ else
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ")\n{\n" );
+ if( rettype != "void" )
+ {
+ printg( "\tif(!impl) return ; // FIXME\n" )
+ printg( "\treturn impl->" method "(" )
+ }
+ else
+ printg( "\tif(impl)\n\t\timpl->" method "(" )
+ k = 0
+ while( k < nrparams )
+ {
+ printg( param[k++] )
+ if( k < nrparams ) printg( " " )
+ }
+ printg( ");\n" )
+ printg( "}\n\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "void " clas "::set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if( b[i] != "float" && match( b[i], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ while ( i < nr )
+ {
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( " &" b[nr] ")\n{\n" )
+ else
+ printg( " " b[nr] ")\n{\n" )
+ printg( "\tif(impl)\n\t\timpl->set")
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ printg( b[nr] ");\n}\n\n" )
+
+ # do get method
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ $temp = b[nr]
+ printg( clas "::" $temp "() const\n{\n" )
+ printg( "\tif(!impl) return ; // FIXME\n\treturn impl->" )
+ printg( substr( b[nr], 1) "(" )
+ printg( ");\n}\n\n" )
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( clas "::" $temp "() const\n{\n" )
+ printg( "\tif(!impl) return ; // FIXME\n\treturn impl->" )
+ printg( substr( b[nr], 1) "(" )
+ printg( ");\n}\n\n" )
+}
+{
+ sub("boolean", "bool", $0)
+ if(/interface /)
+ {
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ nr = split($0, b, " ")
+ clas = b[1]
+ #printg( "// " clas " specification\n\n\n" )
+ printg( clas "::" clas "()" )
+ if( nr > 2 )
+ {
+ i = 2
+ sub( ":", " : ", b[i] )
+ while ( i < nr )
+ {
+ sub( "public", "", b[i] )
+ sub( ",", "(), ", b[i] )
+ printg( b[i++] )
+ }
+ printg( "()" )
+ }
+ printg( "\n{\n\timpl = new " clas "Impl();\n\timpl->ref();\n}\n\n" )
+ printg( clas "::" clas "(const " clas " &other)" )
+ if( nr > 2 )
+ {
+ i = 2
+ while ( i < nr )
+ printg( b[i++] )
+
+ printg( "(), impl(0)" )
+ }
+ else
+ printg( " : impl(0)" )
+ printg( "\n{\n\t(*this) = other;\n}\n\n" )
+ printg( clas " &" clas "::operator =(const " clas " &other)\n{\n\tif(impl == other.impl)\n\t\treturn *this;\n\n\tif(impl)\n\t\timpl->deref();\n\n\timpl = other.impl;\n\n\tif(impl)\n\t\timpl->ref();\n\n\treturn *this;\n}\n\n" )
+ printg( clas "::" clas "(" clas "Impl *other)" )
+ if( nr > 2 )
+ {
+ i = 2
+ while ( i < nr )
+ printg( b[i++] )
+
+ printg( "()" )
+ }
+ printg( "\n{\n\timpl = other;\n\tif(impl)\n\t\timpl->ref();\n}\n\n" )
+ printg( clas "::~" clas "()\n{\n\tif(impl)\n\t\timpl->deref();\n}\n\n" )
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ }
+ else if(/ = /)
+ {
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }
diff --git a/ksvg/scripts/makeheader b/ksvg/scripts/makeheader
new file mode 100644
index 00000000..f8594690
--- /dev/null
+++ b/ksvg/scripts/makeheader
@@ -0,0 +1,164 @@
+function printg( a )
+{
+ printf a >> FILENAME ".h"
+}
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ printg( "\t" )
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ printg( b[i++] )
+ printg( " " )
+ }
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if( b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ printg( b[i++] " " )
+ #if( b[ i ] != ");" ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( "&" b[i++] )
+ else
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ");\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "\tvoid set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if( b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ #if( b[i] != "float" && match( b[i], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ while ( i < nr )
+ {
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( " &" )
+ else
+ printg( " " )
+
+ printg( b[nr] ");\n" )
+
+ # do get method
+ printg("\t")
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ $temp = b[nr]
+ printg( $temp "() const;" )
+ printg( "\n\n" )
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method
+ i = 1
+ printg("\t")
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;" )
+ printg( "\n" )
+}
+{
+ sub("boolean", "bool", $0); # to shut up frerich :P
+ if(/interface /)
+ {
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ nr = split($0, b, " ")
+ clas = b[1]
+ printg( "class " clas "Impl;" )
+ printg( "\nclass " )
+ printg( $0 )
+ printg( "\npublic:\n" )
+ printg( "\t" clas "();\n" )
+ printg( "\t" clas "(const " clas " &other);\n" )
+ printg( "\t" clas " &operator=(const " clas " &other);\n" )
+ printg( "\t" clas "(" clas "Impl *other);\n" )
+ printg( "\tvirtual ~" clas "();\n\n" )
+ #printg( "\tbool isNull() const { return !impl; }\n" )
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ printg( "private:\n\t" clas "Impl *impl;\n};\n\n" );
+ }
+ else if(/ = /)
+ {
+ sub( "\r", "", $0 )
+ printg( $0 "\n" );
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }
diff --git a/ksvg/scripts/makeimpl b/ksvg/scripts/makeimpl
new file mode 100644
index 00000000..fb5ab8f5
--- /dev/null
+++ b/ksvg/scripts/makeimpl
@@ -0,0 +1,440 @@
+function printtoctor( aa )
+{
+ ctor = ctor aa
+}
+function printtodtor( aa )
+{
+ dtor = dtor aa
+}
+function printtofunc( aa )
+{
+ fun = fun aa
+}
+function printp( a )
+{
+ #printf a >> "PRIVATE"
+ private = private a
+}
+function printg( a )
+{
+ printf a >> FILENAME "Impl.h"
+}
+function printh( a )
+{
+ printf a >> FILENAME "Impl.cc"
+}
+function doFuncCC( a, class )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl " )
+ else
+ printtofunc( var " " )
+ }
+ printtofunc( class "::" );
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if(b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ #if(b[i + 1] != "float" && match(b[i + 1], "unsigned") == 0)
+ {
+ float = "ok"
+ printtofunc( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl " )
+ else
+ printtofunc( var " " )
+ }
+ if( float == "ok")
+ {
+ printtofunc( "&" b[i++] )
+ }
+ else
+ {
+ printtofunc( b[i++] )
+ }
+ if( i < nr ) printtofunc( " " )
+ }
+ else
+ printtofunc( b[i++] )
+ }
+ printtofunc( ")\n{\n}\n\n" );
+}
+
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ printg( "\t" )
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl " )
+ else
+ printg( var " " )
+ }
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if(b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl " )
+ else
+ printg( var " " )
+ }
+ if( float == "ok")
+ {
+ if( b[ i ] != "in" ) printg( "&" b[i++] )
+ }
+ else
+ {
+ if( b[ i ] != "in" ) printg( b[i++] )
+ }
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ");\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "\tvoid set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if(b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl" )
+ else
+ printg( var )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok")
+ printg( " &" )
+ else
+ printg( " " )n
+ printg( b[nr] ");\n" )
+
+ # do put method .cc
+ printtofunc( "void " clas "::set" )
+ printtofunc( toupper( substr( b[nr], 1, 1) ) )
+ printtofunc( substr( b[nr], 2) "(" )
+ i = 1
+ if(b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ {
+ float = "ok"
+ printtofunc( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl" )
+ else
+ printtofunc( var )
+ if( i < nr ) printtofunc( " " )
+ }
+ if( float == "ok")
+ printtofunc( " &" )
+ else
+ printtofunc( " " )
+ printtofunc( b[nr] ")\n{\n\tm_" b[nr] " = " b[nr] ";\n}\n\n" )
+
+
+ # do get method .h
+ i = 1
+ printg( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl *" )
+ else
+ printg( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;\n" )
+
+ # do get method .cc
+ i = 1
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl *" )
+ else
+ printtofunc( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printtofunc( clas "::" $temp "() const\n{\n\treturn m_" $temp )
+ printtofunc( ";\n}\n\n" )
+
+ # do var
+ i = 1
+ printp( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ {
+ var = var "Impl"
+ printp( var " *" )
+ }
+ else
+ printp( var " " )
+ }
+ printp( "m_" )
+ #printp( toupper( substr( b[nr], 1, 1) ) )
+ printp( substr( b[nr], 1) ";\n" )
+
+ #add to ctor + dtor
+ if(match(var, "SVG") != 0)
+ {
+ printtoctor("\tm_" substr( b[nr], 1) " = new " var "();\n" )
+ printtoctor("\tm_" substr( b[nr], 1) "->ref();\n\n" )
+ printtodtor("\tif(m_" substr( b[nr], 1) ")\n" )
+ printtodtor("\t\tm_" substr( b[nr], 1) "->deref();\n\n" )
+ }
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method .h
+ i = 1
+ printg( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl *" )
+ else
+ printg( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;\n" )
+
+ # do get method .cc
+ i = 1
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl *" )
+ else
+ printtofunc( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printtofunc( clas "::" $temp "() const\n{\n\treturn m_" $temp )
+ printtofunc( ";\n}\n\n" )
+
+ # do var
+ i = 1
+ printp( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ {
+ var = var "Impl"
+ printp( var " *" )
+ }
+ else
+ printp( var " " )
+ }
+ printp( "m_" )
+ printp( substr( b[nr], 1) ";\n" )
+
+ #add to ctor + dtor
+ if(match(var, "SVG") != 0)
+ {
+ printtoctor("\tm_" substr( b[nr], 1) " = new " var "();\n" )
+ printtoctor("\tm_" substr( b[nr], 1) "->ref();\n\n" )
+ printtodtor("\tif(m_" substr( b[nr], 1) ")\n" )
+ printtodtor("\t\tm_" substr( b[nr], 1) "->deref();\n\n" )
+ }
+}
+{
+ sub("boolean", "bool", $0); # to shut up frerich :P
+ # Frerich: Thank you :-)
+ if(/interface /)
+ {
+ private = "\nprivate:\n";
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ printg( "\nclass " )
+ #printg( $0 )
+ #printg( "\npublic:\n" )
+ nr = split($0, b, " ")
+ clas = b[1] "Impl"
+ printg( clas " " )
+ i = 2
+ while ( i < nr )
+ {
+ if(match(b[i], "SVG") != 0 )
+ {
+ if(match(b[i], ",") != 0)
+ sub( ",", "Impl," , b[i])
+ else
+ b[i] = b[i] "Impl"
+ }
+ printg( b[i++] " " )
+ }
+ printg( "\n{\npublic:\n" )
+ printg( "\t" clas "();\n" )
+ #printg( "\t" clas "(const " clas " &other)" )
+ #if( nr > 2 )
+ #{
+ # i = 2
+ # sub( ":", " : ", b[i] )
+ # while ( i < nr )
+ # {
+ # sub( "public", "", b[i] )
+ # sub( ",", "(), ", b[i] )
+ # printg( b[i++] )
+ # }
+ # printg( "()" )
+ #}
+ #printg( " { *this = other; }\n" )
+
+ printg( "\tvirtual ~" clas "();\n\n" )
+ #printg( "\t" clas " &operator=(const " clas " &other);\n\n" )
+
+ # CC part
+ #printh( "// " b[1] " implementation \n\n" )
+ printtoctor( clas "::" clas "()" )
+ if( nr > 2 )
+ {
+ i = 2
+ sub( ":", " : ", b[i] )
+ while ( i < nr )
+ {
+ sub( "public", "",b[i] )
+ sub( ",", "(), ", b[i] )
+ printtoctor( b[i++] )
+ }
+
+ printtoctor( "()" )
+ }
+ printtoctor( "\n{\n" )
+
+ printtodtor( clas "::~" clas "()\n{\n" )
+ #printh( clas " &" clas "::operator =(const " clas " &other)\n{\n\treturn *this;\n}\n\n" )
+
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFuncCC( $0, clas );
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ printg(private)
+ printg( "};\n\n" );
+
+ printh( "\n" ctor )
+ printh( "}\n\n" )
+ ctor = ""
+
+ printh( dtor )
+ printh( "}\n\n" )
+ dtor = ""
+
+ printh( fun )
+ fun = ""
+ }
+ else if(/ = /)
+ {
+# sub( "\r", "", $0 )
+# printg( $0 "\n" );
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }
diff --git a/ksvg/test/Makefile.am b/ksvg/test/Makefile.am
new file mode 100644
index 00000000..7b2d8286
--- /dev/null
+++ b/ksvg/test/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = external
diff --git a/ksvg/test/Units.svg b/ksvg/test/Units.svg
new file mode 100644
index 00000000..f3a8569b
--- /dev/null
+++ b/ksvg/test/Units.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="400px" height="200px" viewBox="0 0 4000 2000"
+xmlns="http://www.w3.org/2000/svg">
+<title>Example Units</title>
+<desc>Illustrates various units options</desc>
+
+<!-- Frame the picture -->
+<rect x="5" y="5" width="3990" height="1990"
+fill="none" stroke="blue" stroke-width="10"/>
+<g fill="blue" stroke="red" font-family="Verdana" font-size="150">
+<!-- Absolute unit specifiers -->
+<g transform="translate(400,0)">
+<text x="-50" y="300" fill="black" stroke="none">Abs. units:</text>
+<rect x="0" y="400" width="4in" height="2in" stroke-width=".4in"/>
+<rect x="0" y="750" width="384" height="192" stroke-width="38.4"/>
+<g transform="scale(2)">
+<rect x="0" y="600" width="4in" height="2in" stroke-width=".4in"/>
+</g>
+</g>
+
+<!-- Relative unit specifiers -->
+<g transform="translate(1600,0)">
+<text x="-50" y="300" fill="black" stroke="none">Rel. units:</text>
+<rect x="0" y="400" width="2.5em" height="1.25em" stroke-width=".25em"/>
+<rect x="0" y="750" width="375" height="187.5" stroke-width="37.5"/>
+<g transform="scale(2)">
+<rect x="0" y="600" width="2.5em" height="1.25em" stroke-width=".25em"/>
+</g>
+</g>
+<!-- Percentages -->
+<g transform="translate(2800,0)">
+<text x="-50" y="300" fill="black" stroke="none">Percentages:</text>
+<rect x="0" y="400" width="10%" height="10%" stroke-width="1%"/>
+<rect x="0" y="750" width="400" height="200" stroke-width="31.62"/>
+<g transform="scale(2)">
+<rect x="0" y="600" width="10%" height="10%" stroke-width="1%"/>
+</g>
+</g>
+</g>
+</svg>
+
diff --git a/ksvg/test/W3C_TESTSUITE_1.1 b/ksvg/test/W3C_TESTSUITE_1.1
new file mode 100644
index 00000000..b0766355
--- /dev/null
+++ b/ksvg/test/W3C_TESTSUITE_1.1
@@ -0,0 +1,227 @@
+Testsuite-Check v1.1 FULL
+-----------------
+
+http://www.w3.org/Graphics/SVG/Test/20021112/htmlframe/full-index.html
+
+- = none working
+o = half working
+x = fully working
+c = crashed
+p = could not check
+e = crash on destruction
+
+[ANIMATION]
+animate-elem-02-t -
+animate-elem-03-t -
+animate-elem-04-t -
+animate-elem-05-t -
+animate-elem-06-t -
+animate-elem-07-t -
+animate-elem-08-t -
+animate-elem-09-t -
+animate-elem-10-t -
+animate-elem-11-t -
+animate-elem-12-t -
+animate-elem-13-t -
+animate-elem-14-t -
+animate-elem-15-t -
+animate-elem-16-t -
+animate-elem-17-t -
+animate-elem-18-t -
+animate-elem-19-t -
+animate-elem-20-t -
+animate-elem-21-t -
+animate-elem-22-b -
+animate-elem-23-t -
+animate-elem-24-t -
+animate-elem-25-t -
+animate-elem-26-t -
+animate-elem-27-t -
+animate-elem-28-t -
+animate-elem-29-b -
+
+[COLOR]
+color-prof-01-f x crashes when embedded
+color-prop-01-b x
+color-prop-02-f x
+color-prop-03-t x
+
+[COORDS]
+coords-trans-01-b x
+coords-trans-02-t x
+coords-trans-03-t x
+coords-trans-04-t x
+coords-trans-05-t x
+coords-trans-06-t x
+coords-units-01-b x Pattern is a bit off but size is ok
+coords-units-02-b o
+coords-units-03-b x
+coords-viewattr-01-b x
+
+[EXTEND]
+extend-namespace-01-f x
+
+[FILTERS]
+filters-blend-01-b -
+filters-color-01-b -
+filters-composite-01-b -
+filters-comptran-01-b -
+filters-conv-01-f -
+filters-diffuse-01-f -
+filters-displace-01-f -
+filters-example-01-b -
+filters-gauss-01-b -
+filters-image-01-b -
+filters-light-01-f -
+filters-morph-01-f -
+filters-offset-01-b -
+filters-specular-01-f -
+filters-tile-01-b -
+
+[FONTS]
+fonts-elem-01-t o SVG Font doesn't work
+fonts-elem-02-t - looks really strange
+fonts-elem-03-t o SVG Font doesn't work
+fonts-elem-04-t o SVG Font doesn't work
+
+[INTERACT]
+interact-cursor-01-b o
+interact-dom-01-t x
+interact-events-01-t x
+interact-order-01-t x
+interact-order-02-t o same as above
+interact-order-03-t o
+interact-zoom-01-t -
+
+[LINKING]
+linking-a-01-b x doesn't work when embedded?!
+linking-a-02-b x "
+linking-a-03-t x "
+linking-a-04-t x
+linking-uri-01-b -
+linking-uri-02-b -
+linking-uri-03-t x
+
+[MASKING]
+masking-mask-01-b -
+masking-opacity-01-b o
+masking-path-01-b x
+masking-path-02-b x
+masking-path-03-t x
+masking-path-04-b o
+masking-path-05-f x
+
+[METADATA]
+metadata-example-01-b x
+
+[PAINTING]
+painting-fill-01-t x
+painting-fill-02-t x
+painting-fill-03-t x
+painting-fill-04-t x
+painting-marker-01-f o Not every element drawn...hmm
+painting-marker-02-f o same
+painting-render-01-b o linearRGB wrong
+painting-stroke-01-t x
+painting-stroke-02-t x
+painting-stroke-03-t x
+painting-stroke-04-t x
+
+[PATHS]
+paths-data-01-t x
+paths-data-02-t x
+paths-data-03-f x
+paths-data-04-t x
+paths-data-05-t x
+paths-data-06-t x
+paths-data-07-t x
+
+[PSERVERS]
+pservers-grad-01-b x
+pservers-grad-02-b x
+pservers-grad-03-b x
+pservers-grad-04-b x
+pservers-grad-05-b o partially wrong colors
+pservers-grad-06-b o no transformations to the pattern
+pservers-grad-07-b x
+pservers-grad-08-b x
+pservers-grad-09-b x
+pservers-grad-10-b x
+pservers-grad-11-b x
+pservers-grad-12-b x
+pservers-pattern-01-b o patternpositioning
+
+[RENDER]
+render-elems-01-t x
+render-elems-02-t x
+render-elems-03-t x
+render-elems-06-t x
+render-elems-07-t x
+render-elems-08-t x
+render-groups-01-b - badly broken..
+render-groups-03-t o SVG font
+render-groups-04-b -
+
+[SCRIPT]
+script-handle-01-t x
+script-handle-02-t x
+script-handle-03-t x
+script-handle-04-t x
+
+[SHAPES]
+shapes-circle-01-t x
+shapes-ellipse-01-t x
+shapes-line-01-t x
+shapes-polygon-01-t x
+shapes-polyline-01-t x
+shapes-rect-01-t x
+
+[STRUCT]
+struct-cond-01-t x
+struct-cond-02-t x
+struct-defs-01-t x
+struct-dom-01-t x Reference PNG wrong?!
+struct-dom-02-t x everything false. but text says thats ok
+struct-dom-03-t x same
+struct-dom-04-t x same
+struct-dom-05-t x same
+struct-dom-06-t x
+struct-frag-01-t x empty image
+struct-group-01-t x
+struct-group-02-t x
+struct-image-01-t o SVG Image dimensions wrong
+struct-image-02-t x
+struct-image-03-t o no gamma correction
+struct-symbol-01-b -
+
+[STYLING]
+styling-css-01-t - no <style> supported
+styling-css-02-t -
+styling-css-03-t -
+styling-inherit-01-b o
+styling-pres-01-t -
+
+[TEXT]
+text-align-01-b x
+text-align-02-b o STRANGE (!)
+text-align-03-b x
+text-align-04-b o "end text on path" displays
+text-align-05-b - wrong for vertical text
+text-align-06-b -
+text-altglyph-01-b -
+text-deco-01-b o Colors of lines
+text-fonts-01-t c
+text-fonts-02-t c
+text-intro-01-t o just polish? missing fonts?
+text-intro-02-b o ltr doesn't work + font missing?
+text-intro-03-b - looks more than strange
+text-intro-04-t o see 1
+text-path-01-b - no textpath
+text-spacing-01-b x
+text-text-01-b o textlength mostly wrong
+text-text-03-b x
+text-tref-01-b -
+text-tselect-01-b - no textselection
+text-tspan-01-b x
+text-ws-01-t c
+text-ws-02-t c
diff --git a/ksvg/test/ZVON-TEST-PASSED b/ksvg/test/ZVON-TEST-PASSED
new file mode 100644
index 00000000..81cb6d52
--- /dev/null
+++ b/ksvg/test/ZVON-TEST-PASSED
@@ -0,0 +1,168 @@
+Testsuite-Check
+-----------------
+
+- = none working
+o = half working
+x = fully working
+c = crashed
+p = could not check
+e = crash on destruction
+
+http://www.zvon.org/HowTo/Output/category_SVG.html
+
+Group 1: [Animation]
+animation-add-BE-09.svg: -
+animation-extRef-BE-13.svg: -
+animation-href-BE-02.svg: -
+animation-inherit-BE-10.svg: -
+animation-motion-BE-11.svg: -
+animation-motion-BE-12.svg: -
+animation-overall-BE-01.svg: -
+animation-targAtt-BE-04.svg: -
+animation-targElt-BE-03.svg: -
+animation-timing-BE-05.svg: -
+animation-values-BE-06.svg: -
+animation-values-BE-07.svg: -
+animation-values-BE-08.svg: -
+
+Group 2: [Color] - 21.09.2003
+color-colorProf-BE-03.svg: x
+color-datatypes-BE-01.svg: x
+color-property-BE-02.svg: x
+
+Group 3: [Coordinates] - 21.09.2003
+coords-transforms-BE-02.svg: x
+coords-units-BE-01.svg: x
+coords-unitsProc-BE-04.svg: x
+coords-unitsProc-BE-05.svg: x
+coords-viewBox-BE-03.svg: x
+
+Group 4: [DOM] - 21.09.2003
+dom-core-BE-01.svg: x
+dom-eventListener-BE-04.svg: x
+dom-featureString-BE-03.svg: x
+dom-svg-BE-02.svg: x
+
+Group 5: [Extending SVG] - 21.09.2003
+extend-multiNS-BE-01.svg: x
+
+Group 6: [Filters]
+TODO
+
+Group 7: [Fonts] - 21.09.2003
+fonts-fontElement-BE-01.svg: o FONTS SUPPORT MISSING
+
+Group 8: [Gradient Patterns] - 21.09.2003
+gradPatt-linearGr-BE-01.svg: x
+gradPatt-linearGr-BE-02.svg: x
+gradPatt-linearGr-BE-03.svg: x
+gradPatt-pattern-BE-07.svg: x
+gradPatt-radialGr-BE-04.svg: x
+gradPatt-radialGr-BE-05.svg: x
+gradPatt-referenc-BE-08.svg: x
+gradPatt-stop-BE-06.svg: x
+gradPatt-stop-BE-10.svg: x
+gradPatt-transfrm-BE-09.svg: x
+
+Group 9: [Interactive] - 21.09.2003
+interact-onload-BE-07.svg: x
+interact-bubble-BE-04.svg: o
+interact-cursor-BE-08.svg: o CSS
+interact-pEvents-BE-05.svg: x
+interact-pEvents-BE-06.svg: x
+interact-zoomPan-BE-01.svg: x
+interact-zoomPan-BE-02.svg: x
+
+Group 10: [Linking] - 21.09.2003
+linking-inBound-BE-03.svg x
+linking-outBound-BE-01.svg o
+linking-view-BE-04.svg o
+linking-view-BE-05.svg o
+linking-xlinkAttr-BE-02.svg x
+
+Group 11: [Masking] - 21.09.2003
+masking-clipPath-BE-01.svg: x
+masking-clipPath-BE-02.svg: x
+masking-clipPath-BE-08.svg: x
+masking-clipRule-BE-03.svg: x
+masking-groupOpac-BE-04.svg: x
+masking-mask-BE-05.svg: x
+masking-mask-BE-06.svg: x
+masking-property-BE-07.svg: x
+masking-vportClip-BE-09.svg: x
+
+Group 12: [Metadata] - 21.09.2003
+metadata-sample-BE-01.svg: x PLANE REFERENCE IMAGE LOOKS WRONG - WE MATCH BATIK'S OUTPUT
+
+Group 13: [Misc] - 21.09.2003
+
+Group 14: [Paint] - 21.09.2003
+paint-colIntProp-BE-05.svg: x
+paint-fill-BE-01.svg: x
+paint-inherit-BE-06.svg: x
+paint-markers-BE-03.svg: x
+paint-markers-BE-04.svg: x
+paint-stroke-BE-02.svg: x
+
+Group 15: [Paths] - 21.09.2003
+path-curves-BE-02.svg: x
+path-curves-BE-03.svg: x
+path-curves-BE-04.svg: x
+path-lines-BE-01.svg: x
+
+Group 16: [Rendering] - 21.09.2003
+rendering-orderGr-BE-01.svg: x
+rendering-shape-BE-03.svg: x
+rendering-text-BE-02.svg: x
+
+Group 17: [Script] - 21.09.2003
+script-eventDom-BE-01.svg: x
+script-uiEvents-BE-02.svg: x
+
+Group 18: [Shapes] - 21.09.2003
+shapes-circle-BE-03.svg: x
+shapes-ellipse-BE-02.svg: x
+shapes-line-BE-04.svg: x
+shapes-polygon-BE-05.svg: x
+shapes-polyline-BE-06.svg: x
+shapes-rect-BE-01.svg: x
+
+Group 19: [Structure] - 21.09.2003
+structure-allElem-BE-09.svg: x
+structure-basicG-BE-03.svg: x
+structure-empty-BE-01.svg: x
+structure-defs-BE-04.svg: x
+structure-extRef-BE-10.svg: o CSS SUPPORT MISSING
+structure-image-BE-06.svg: x
+structure-imggamma-BE-11.svg: x
+structure-lang-BE-08.svg: x
+structure-nested-BE-02.svg: x
+structure-switch-BE-07.svg: x
+structure-symbol-BE-05.svg: x
+
+Group 20: [Style] - 21.09.2003
+style-selector-BE-01.svg: o
+style-selector-BE-02.svg: o
+style-selector-BE-03.svg: o
+
+Group 21: [Text] - 29.09.2003
+text-alignment-BE-10.svg: x
+text-alignment-BE-11.svg: x
+text-altGlyph-BE-07.svg: o FONTS SUPPORT MISSING
+text-decoration-BE-12.svg: x
+text-extTref-BE-18.svg: x
+text-font-BE-15.svg: x
+text-font-BE-16.svg: x
+text-i18n-BE-09.svg: x
+text-selection-BE-13.svg: o SELECTION NOT DONE YET
+text-spacing-BE-14.svg: x
+text-textAnchor-BE-05.svg: x BROKEN BECAUSE OF TEXT ON PATH
+text-text-BE-01.svg: x
+text-textLength-BE-17.svg: x
+text-textOnPath-BE-03.svg: x IN GENERAL TEXTPATH GLYPHS CAN BE BETTER ALIGNED
+text-tref-BE-04.svg: x
+text-tspan-BE-02.svg: x
+text-whiteSpace-BE-06.svg: x
+
+Group 22: [Transformations]
+TODO
diff --git a/ksvg/test/amflag.svg b/ksvg/test/amflag.svg
new file mode 100644
index 00000000..83e6dddb
--- /dev/null
+++ b/ksvg/test/amflag.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<svg viewBox="0 0 2000 600" width="10cm" height="5cm">
+<g transform="translate(10 60)">
+ <defs>
+ <rect id="r" width="900" height="40" style="fill:#dd0000"/>
+ <rect id="w" width="900" height="40" style="fill:white"/>
+ <polygon id="s" style="fill:white;fill-rule:nonzero;"
+ points="0,-14 8.229,11.326 -13.315,-4.326 13.315,-4.326 -8.229,11.326">
+ <animateTransform attributeName="transform" type="rotate" values="0;360" dur="3s" repeatDur="indefinite" />
+ </polygon>
+ <g id="6">
+ <use xlink:href="#s" x="20"/>
+ <use xlink:href="#s" x="90"/>
+ <use xlink:href="#s" x="150"/>
+ <use xlink:href="#s" x="210"/>
+ <use xlink:href="#s" x="270"/>
+ <use xlink:href="#s" x="330"/>
+ </g>
+ <g id="5">
+ <use xlink:href="#s" x="60"/>
+ <use xlink:href="#s" x="120"/>
+ <use xlink:href="#s" x="180"/>
+ <use xlink:href="#s" x="240"/>
+ <use xlink:href="#s" x="300"/>
+ </g>
+ </defs>
+ <use xlink:href="#r"/>
+ <use xlink:href="#w" y="40"/>
+ <use xlink:href="#r" y="80"/>
+ <use xlink:href="#w" y="120"/>
+ <use xlink:href="#r" y="160"/>
+ <use xlink:href="#w" y="200"/>
+ <use xlink:href="#r" y="240"/>
+ <use xlink:href="#w" y="280"/>
+ <use xlink:href="#r" y="320"/>
+ <use xlink:href="#w" y="360"/>
+ <use xlink:href="#r" y="400"/>
+ <use xlink:href="#w" y="440"/>
+ <use xlink:href="#r" y="480"/>
+ <rect id="b" width="360" height="280" style="fill:#000088"/>
+ <rect id="border" width="900" height="520" style="fill:none;stroke:black;stroke-width:0.85"/>
+ <g transform="translate(4.5 0)">
+ <use xlink:href="#6" y="20"/>
+ <use xlink:href="#5" y="50"/>
+ <use xlink:href="#6" y="80"/>
+ <use xlink:href="#5" y="110"/>
+ <use xlink:href="#6" y="140"/>
+ <use xlink:href="#5" y="170"/>
+ <use xlink:href="#6" y="200"/>
+ <use xlink:href="#5" y="230"/>
+ <use xlink:href="#6" y="260"/>
+ </g>
+</g>
+</svg>
diff --git a/ksvg/test/animskew.svg b/ksvg/test/animskew.svg
new file mode 100644
index 00000000..ab2a13f9
--- /dev/null
+++ b/ksvg/test/animskew.svg
@@ -0,0 +1,44 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
+ "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
+<svg width="10cm" height="5cm">
+ <desc>Animated skew + animated attributes ksvg-testcase</desc>
+
+ <g style="stroke:black; stroke-width:5" id="animskewg">
+ <line id="l1" x1="3cm" x2="6cm" y1="-1cm" y2="-1cm"/>
+
+ <line id="l2" x1="-1cm" x2="-1cm" y1="0.5cm" y2="4.5cm"/>
+ <line id="l3" x1="11cm" x2="11cm" y1="0.5cm" y2="4.5cm"/>
+
+ <line id="l4" x1="3cm" x2="6cm" y1="6cm" y2="6cm"/>
+ </g>
+
+ <animate xlink:href="#l1" attributeName="y1" begin="1s"
+ dur="5s" from="-1cm" to="0.5cm"/>
+ <animate xlink:href="#l1" attributeName="y2" begin="1s"
+ dur="5s" from="-1cm" to="0.5cm"/>
+
+ <animate xlink:href="#l2" attributeName="x1" begin="1s"
+ dur="5s" from="-1cm" to="3cm"/>
+ <animate xlink:href="#l2" attributeName="x2" begin="1s"
+ dur="5s" from="-1cm" to="3cm"/>
+
+ <animate xlink:href="#l3" attributeName="x1" begin="1s"
+ dur="5s" from="11cm" to="6cm"/>
+ <animate xlink:href="#l3" attributeName="x2" begin="1s"
+ dur="5s" from="11cm" to="6cm"/>
+
+ <animate xlink:href="#l4" attributeName="y1" begin="1s"
+ dur="5s" from="6cm" to="4.5cm"/>
+ <animate xlink:href="#l4" attributeName="y2" begin="1s"
+ dur="5s" from="6cm" to="4.5cm"/>
+
+ <animateTransform xlink:href="#animskewg" attributeName="transform" begin="7s"
+ dur="2s" type="skewX" from="0" to="10"/>
+ <animateTransform xlink:href="#animskewg" attributeName="transform" begin="9s"
+ dur="2s" type="skewX" from="10" to="0"/>
+ <animateTransform xlink:href="#animskewg" attributeName="transform" begin="11s"
+ dur="2s" type="skewX" from="0" to="-10"/>
+ <animateTransform xlink:href="#animskewg" attributeName="transform" begin="13s"
+ dur="2s" type="skewX" from="-10" to="0"/>
+</svg>
diff --git a/ksvg/test/arabic.svg b/ksvg/test/arabic.svg
new file mode 100644
index 00000000..71bbe0e6
--- /dev/null
+++ b/ksvg/test/arabic.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="10000" height="100">
+<text x="10" y="10">
+Big string of Arabic:
+</text>
+<text x="10" y="80" font-family="Arial" font-size="72">
+وقد بدأ ثلاث من أكثر المؤسسات تقدما ÙÙŠ شبكة اكسيون برامجها كمنظمات لاتسعى للربح، ثم تحولت ÙÙŠ السنوات الخمسالماضية إلى مؤسسات مالية منظمة، وباتتجزءا من النظام المالي ÙÙŠ بلدانها،ولكنها تتخصص ÙÙŠ خدمة قطاع المشروعاتالصغيرة. وأحد أكثر هذه المؤسسات نجاحاهو »بانكوسول« ÙÙŠ بوليÙيا.
+</text>
+</svg>
diff --git a/ksvg/test/butterfly.svg b/ksvg/test/butterfly.svg
new file mode 100644
index 00000000..eca71841
--- /dev/null
+++ b/ksvg/test/butterfly.svg
@@ -0,0 +1,11 @@
+<!-- This is a slightly modified version of a sample that shipped with
+ JASC's WebDraw (www.jasc.com) -->
+<svg xmlns="http://www.w3.org/2000/svg">
+ <path style="stroke-width:1;fill:rgb(246,127,0);stroke:none"
+ d="M204.33 139.83 C196.33 133.33 206.68 132.82 206.58 132.58 C192.33 97.08 169.35 81.41 167.58 80.58 C162.12 78.02 159.48 78.26 160.45 76.97 C161.41 75.68 167.72 79.72 168.58 80.33 C193.83 98.33 207.58 132.33 207.58 132.33 C207.58 132.33 209.33 133.33 209.58 132.58 C219.58 103.08 239.58 87.58 246.33 81.33 C253.08 75.08 256.63 74.47 247.33 81.58 C218.58 103.58 210.34 132.23 210.83 132.33 C222.33 134.83 211.33 140.33 211.83 139.83 C214.85 136.81 214.83 145.83 214.83 145.83 C214.83 145.83 231.83 110.83 298.33 66.33 C302.43 63.59 445.83 -14.67 395.83 80.83 C393.24 85.79 375.83 105.83 375.83 105.83 C375.83 105.83 377.33 114.33 371.33 121.33 C370.3 122.53 367.83 134.33 361.83 140.83 C360.14 142.67 361.81 139.25 361.83 140.83 C362.33 170.83 337.76 170.17 339.33 170.33 C348.83 171.33 350.19 183.66 350.33 183.83 C355.83 190.33 353.83 191.83 355.83 194.83 C366.63 211.02 355.24 210.05 356.83 212.83 C360.83 219.83 355.99 222.72 357.33 224.83 C360.83 230.33 354.75 233.84 354.83 235.33 C355.33 243.83 349.67 240.73 349.83 244.33 C350.33 255.33 346.33 250.83 343.83 254.83 C336.33 266.83 333.46 262.38 332.83 263.83 C329.83 270.83 325.81 269.15 324.33 270.83 C320.83 274.83 317.33 274.83 315.83 276.33 C308.83 283.33 304.86 278.39 303.83 278.83 C287.83 285.83 280.33 280.17 277.83 280.33 C270.33 280.83 271.48 279.67 269.33 277.83 C237.83 250.83 219.33 211.83 215.83 206.83 C214.4 204.79 211.35 193.12 212.33 195.83 C214.33 201.33 213.33 250.33 207.83 250.33 C202.33 250.33 201.83 204.33 205.33 195.83 C206.43 193.16 204.4 203.72 201.79 206.83 C196.33 213.33 179.5 250.83 147.59 277.83 C145.42 279.67 146.58 280.83 138.98 280.33 C136.46 280.17 128.85 285.83 112.65 278.83 C111.61 278.39 107.58 283.33 100.49 276.33 C98.97 274.83 95.43 274.83 91.88 270.83 C90.39 269.15 86.31 270.83 83.27 263.83 C82.64 262.38 79.73 266.83 72.13 254.83 C69.6 250.83 65.54 255.33 66.05 244.33 C66.22 240.73 60.48 243.83 60.99 235.33 C61.08 233.84 54.91 230.33 58.45 224.83 C59.81 222.72 54.91 219.83 58.96 212.83 C60.57 210.05 49.04 211.02 59.97 194.83 C62 191.83 59.97 190.33 65.54 183.83 C65.69 183.66 67.06 171.33 76.69 170.33 C78.28 170.17 53.39 170.83 53.9 140.83 C53.92 139.25 55.61 142.67 53.9 140.83 C47.82 134.33 45.32 122.53 44.27 121.33 C38.19 114.33 39.71 105.83 39.71 105.83 C39.71 105.83 22.08 85.79 19.46 80.83 C-31.19 -14.67 114.07 63.59 118.22 66.33 C185.58 110.83 202 145.83 202 145.83 C202 145.83 202.36 143.28 203 141.83 C203.64 140.39 204.56 140.02 204.33 139.83 z"/>
+ <path style="stroke-width:1;fill:rgb(0,0,0);stroke:none"
+ d="M203.62 139.62 C195.62 133.12 205.96 132.6 205.87 132.37 C191.62 96.87 168.64 81.2 166.87 80.37 C161.41 77.81 158.77 78.05 159.73 76.76 C160.69 75.47 167.01 79.51 167.87 80.12 C193.12 98.12 206.87 132.12 206.87 132.12 C206.87 132.12 208.62 133.12 208.87 132.37 C218.87 102.87 238.87 87.37 245.62 81.12 C252.37 74.87 255.92 74.26 246.62 81.37 C217.87 103.37 209.63 132.01 210.12 132.12 C221.62 134.62 210.62 140.12 211.12 139.62 C214.14 136.6 214.12 145.62 214.12 145.62 C214.12 145.62 231.12 110.62 297.62 66.12 C301.71 63.38 445.12 -14.88 395.12 80.62 C392.53 85.57 375.12 105.62 375.12 105.62 C375.12 105.62 376.62 114.12 370.62 121.12 C369.59 122.32 367.12 134.12 361.12 140.62 C359.43 142.46 361.09 139.04 361.12 140.62 C361.62 170.62 337.05 169.96 338.62 170.12 C348.12 171.12 349.47 183.45 349.62 183.62 C355.12 190.12 353.12 191.62 355.12 194.62 C365.91 210.81 354.53 209.84 356.12 212.62 C360.12 219.62 355.28 222.51 356.62 224.62 C360.12 230.12 354.03 233.62 354.12 235.12 C354.62 243.62 348.96 240.52 349.12 244.12 C349.62 255.12 345.62 250.62 343.12 254.62 C335.62 266.62 332.74 262.17 332.12 263.62 C329.12 270.62 325.09 268.94 323.62 270.62 C320.12 274.62 316.62 274.62 315.12 276.12 C308.12 283.12 304.15 278.17 303.12 278.62 C287.12 285.62 279.62 279.95 277.12 280.12 C269.62 280.62 270.77 279.46 268.62 277.62 C237.12 250.62 218.62 211.62 215.12 206.62 C213.69 204.57 210.63 192.91 211.62 195.62 C213.62 201.12 212.62 250.12 207.12 250.12 C201.62 250.12 201.12 204.12 204.62 195.62 C205.72 192.95 203.69 203.5 201.08 206.62 C195.62 213.12 178.79 250.62 146.88 277.62 C144.71 279.46 145.87 280.62 138.27 280.12 C135.75 279.95 128.14 285.62 111.94 278.62 C110.9 278.17 106.87 283.12 99.78 276.12 C98.26 274.62 94.72 274.62 91.17 270.62 C89.68 268.94 85.6 270.62 82.56 263.62 C81.93 262.17 79.01 266.62 71.42 254.62 C68.88 250.62 64.83 255.12 65.34 244.12 C65.51 240.52 59.77 243.62 60.27 235.12 C60.36 233.62 54.2 230.12 57.74 224.62 C59.1 222.51 54.2 219.62 58.25 212.62 C59.86 209.84 48.33 210.81 59.26 194.62 C61.29 191.62 59.26 190.12 64.83 183.62 C64.98 183.45 66.35 171.12 75.98 170.12 C77.57 169.96 52.68 170.62 53.18 140.62 C53.21 139.04 54.9 142.46 53.18 140.62 C47.11 134.12 44.6 122.32 43.56 121.12 C37.48 114.12 39 105.62 39 105.62 C39 105.62 21.37 85.57 18.74 80.62 C-31.9 -14.88 113.36 63.38 117.51 66.12 C184.87 110.62 201.29 145.62 201.29 145.62 C201.29 145.62 201.65 143.07 202.29 141.62 C202.93 140.18 203.85 139.81 203.62 139.62 zM242.12 153.12 C245.16 153.02 251.35 156.17 255.12 155.12 C280.55 148.06 328.44 154.56 331.62 155.62 C343.62 159.62 351.62 131.12 326.12 131.12 C294.59 131.12 301.12 129.12 280.12 126.12 C278.34 125.87 252.6 135.42 228.62 149.12 C225.12 151.12 227.12 153.62 242.12 153.12 zM223.12 148.12 C225.66 148.4 238.12 139.62 277.12 124.12 C279.49 123.18 279.62 118.12 300.62 108.62 C301.99 108 300.12 104.62 314.62 92.62 C321.79 86.69 297.12 87.62 291.62 88.62 C286.12 89.62 272.62 100.62 272.62 100.62 C272.62 100.62 287.8 88.55 282.62 90.12 C271.12 93.62 241.12 126.62 231.12 140.62 C221.12 154.62 247.62 116.62 254.12 110.62 C260.62 104.62 204.62 146.12 223.12 148.12 zM335.62 128.62 C350.14 131.53 348.62 110.12 341.12 109.12 C329.55 107.58 307.51 108.3 301.12 110.62 C284.62 116.62 280.29 122.65 281.62 123.12 C310.12 133.12 330.62 127.62 335.62 128.62 zM335.12 106.62 C341.04 107.36 351.12 109.62 351.62 101.62 C351.87 97.6 365.62 104.62 368.62 105.12 C371.1 105.53 358.12 100.33 353.62 97.12 C350.12 94.62 349.51 91.76 349.12 91.62 C317.12 80.12 303.62 107.12 303.62 107.12 C303.62 107.12 331.12 106.12 335.12 106.62 zM400.62 62.62 C395.62 54.62 386.66 57.08 383.62 53.62 C369.12 37.12 335.54 58.28 363.12 56.12 C395.12 53.62 401.21 63.57 400.62 62.62 zM376.62 66.62 C390.13 66.62 396.12 72.62 395.12 71.62 C388.12 64.62 382.12 66.12 380.62 64.12 C371.7 52.23 345.12 64.62 347.12 67.62 C349.12 70.62 373.12 66.62 376.62 66.62 zM330.12 76.12 C309.12 81.12 318.12 88.62 320.62 88.12 C340.05 84.24 334.5 75.08 330.12 76.12 zM340.62 52.12 C331.12 53.12 330.48 70.43 335.12 67.12 C342.12 62.12 350.12 51.12 340.62 52.12 zM315.62 75.62 C329.62 70.12 319.12 67.62 314.62 68.12 C310.12 68.62 306.79 75.45 308.12 78.12 C311.12 84.12 312.91 76.69 315.62 75.62 zM359.62 121.12 C364.12 118.62 358.62 112.62 354.62 115.12 C350.62 117.62 355.12 123.62 359.62 121.12 zM350.12 78.62 C361.89 90.39 366.62 84.12 369.12 83.12 C377.24 79.87 386.12 88.62 384.62 87.12 C377.34 79.84 372.62 81.12 371.62 79.62 C364.01 68.2 352.66 75.44 350.12 75.62 C343.12 76.12 334.43 81.03 337.62 80.12 C341.12 79.12 348.62 77.12 350.12 78.62 zM383.62 44.12 C390.62 39.12 381.4 37.85 379.62 38.12 C373.12 39.12 376.62 49.12 383.62 44.12 zM224.62 181.12 C230.12 187.62 291.62 285.12 282.12 252.62 C280.83 248.2 285.62 266.12 291.12 256.12 C292.66 253.32 301.27 253.03 274.62 208.62 C273.12 206.12 252.62 198.12 232.12 175.62 C229.02 172.21 220.05 175.72 224.62 181.12 zM280.12 215.62 C284.62 222.62 295.81 246.07 296.62 249.62 C299.12 260.62 306.12 248.12 307.62 248.62 C320.78 253.01 311.12 241.12 310.12 238.12 C300.95 210.62 279.62 213.12 279.62 213.12 C279.62 213.12 275.62 208.62 280.12 215.62 zM253.62 256.12 C266.26 274.09 271.12 267.12 273.62 265.12 C281.32 258.96 232.34 196.14 229.12 192.12 C225.12 187.12 225.12 215.62 253.62 256.12 zM300.12 219.12 C306.62 224.12 313.86 245.19 317.62 244.62 C327.62 243.12 321.62 234.62 324.12 236.12 C326.62 237.62 331.62 234.95 330.12 232.12 C317.62 208.62 298.12 216.12 298.12 216.12 C298.12 216.12 293.62 214.12 300.12 219.12 zM235.62 168.62 C216.12 168.62 282.12 222.62 301.12 212.12 C305.06 209.94 296.12 208.62 297.62 197.12 C297.9 195.02 284.12 191.12 284.12 178.12 C284.12 173.88 276.2 172.12 251.12 172.12 C246.62 172.12 256.03 168.62 235.62 168.62 zM307.62 213.62 C325.89 215.65 330.23 229.8 332.62 228.12 C361.12 208.12 309.89 199.96 300.62 201.12 C296.62 201.62 303.12 213.12 307.62 213.62 zM238.62 164.12 C242.12 166.62 254.12 176.62 292.62 168.12 C294.09 167.8 263.62 167.62 259.62 166.62 C255.62 165.62 236.25 162.43 238.62 164.12 zM305.12 198.62 C342.62 207.62 332.72 201.36 334.12 200.62 C342.62 196.12 333.33 195.23 334.62 193.62 C338.83 188.36 327.62 185.12 304.12 182.62 C298.56 182.03 287.54 179.27 287.12 180.12 C283.62 187.12 300.33 197.47 305.12 198.62 zM311.12 182.12 C343.62 187.62 323.23 177.43 323.62 177.12 C335.12 168.12 297.12 168.12 297.12 168.12 C297.12 168.12 280.79 172 281.12 172.62 C285.62 181.12 307.15 181.45 311.12 182.12 zM249.62 253.62 C249.62 253.62 220.62 207.12 226.62 188.12 C227.83 184.31 213.62 165.62 220.12 197.12 C220.22 197.61 218.89 190.43 216.62 187.12 C214.35 183.81 211.18 184.9 213.12 194.62 C218.01 219.05 249.62 253.62 249.62 253.62 zM289.12 83.62 C296.62 81.62 293.12 79.12 288.62 78.12 C284.12 77.12 281.62 85.62 289.12 83.62 zM187.4 149.12 C163.12 135.42 137.04 125.87 135.23 126.12 C113.96 129.12 120.58 131.12 88.64 131.12 C62.81 131.12 70.91 159.62 83.07 155.62 C86.29 154.56 134.8 148.06 160.56 155.12 C164.37 156.17 170.65 153.02 173.73 153.12 C188.92 153.62 190.95 151.12 187.4 149.12 zM161.57 110.62 C168.15 116.62 195 154.62 184.87 140.62 C174.74 126.62 144.35 93.62 132.7 90.12 C127.46 88.55 142.83 100.62 142.83 100.62 C142.83 100.62 129.16 89.62 123.58 88.62 C118.01 87.62 93.03 86.69 100.29 92.62 C114.97 104.62 113.08 108 114.47 108.62 C135.74 118.12 135.87 123.18 138.27 124.12 C177.78 139.62 190.4 148.4 192.97 148.12 C211.71 146.12 154.99 104.62 161.57 110.62 zM133.71 123.12 C135.07 122.65 130.68 116.62 113.96 110.62 C107.49 108.3 85.16 107.58 73.44 109.12 C65.85 110.12 64.31 131.53 79.01 128.62 C84.08 127.62 104.84 133.12 133.71 123.12 zM111.43 107.12 C111.43 107.12 97.75 80.12 65.34 91.62 C64.95 91.76 64.33 94.62 60.78 97.12 C56.23 100.33 43.08 105.53 45.59 105.12 C48.63 104.62 62.55 97.6 62.81 101.62 C63.31 109.62 73.53 107.36 79.52 106.62 C83.57 106.12 111.43 107.12 111.43 107.12 zM51.16 56.12 C79.09 58.28 45.08 37.12 30.39 53.62 C27.31 57.08 18.24 54.62 13.17 62.62 C12.57 63.57 18.74 53.62 51.16 56.12 zM67.37 67.62 C69.39 64.62 42.47 52.23 33.43 64.12 C31.91 66.12 25.83 64.62 18.74 71.62 C17.73 72.62 23.8 66.62 37.48 66.62 C41.03 66.62 65.34 70.62 67.37 67.62 zM84.59 76.12 C105.86 81.12 96.74 88.62 94.21 88.12 C74.53 84.24 80.15 75.08 84.59 76.12 zM79.52 67.12 C84.22 70.43 83.57 53.12 73.95 52.12 C64.33 51.12 72.43 62.12 79.52 67.12 zM106.87 78.12 C108.22 75.45 104.84 68.62 100.29 68.12 C95.73 67.62 85.09 70.12 99.27 75.62 C102.02 76.69 103.83 84.12 106.87 78.12 zM59.77 115.12 C55.72 112.62 50.14 118.62 54.7 121.12 C59.26 123.62 63.82 117.62 59.77 115.12 zM76.99 80.12 C80.22 81.03 71.42 76.12 64.33 75.62 C61.75 75.44 50.26 68.2 42.55 79.62 C41.53 81.12 36.75 79.84 29.38 87.12 C27.86 88.62 36.85 79.87 45.08 83.12 C47.61 84.12 52.41 90.39 64.33 78.62 C65.85 77.12 73.44 79.12 76.99 80.12 zM34.44 38.12 C32.64 37.85 23.3 39.12 30.39 44.12 C37.48 49.12 41.03 39.12 34.44 38.12 zM183.86 175.62 C163.09 198.12 142.32 206.12 140.8 208.62 C113.81 253.03 122.53 253.32 124.09 256.12 C129.66 266.12 134.52 248.2 133.21 252.62 C123.58 285.12 185.88 187.62 191.45 181.12 C196.08 175.72 187 172.21 183.86 175.62 zM135.74 213.12 C135.74 213.12 114.13 210.62 104.84 238.12 C103.83 241.12 94.05 253.01 107.38 248.62 C108.9 248.12 115.99 260.62 118.52 249.62 C119.34 246.07 130.68 222.62 135.23 215.62 C139.79 208.62 135.74 213.12 135.74 213.12 zM186.89 192.12 C183.64 196.14 134.02 258.96 141.82 265.12 C144.35 267.12 149.27 274.09 162.08 256.12 C190.95 215.62 190.95 187.12 186.89 192.12 zM117 216.12 C117 216.12 97.25 208.62 84.59 232.12 C83.06 234.95 88.13 237.62 90.66 236.12 C93.2 234.62 87.12 243.12 97.25 244.62 C101.06 245.19 108.39 224.12 114.97 219.12 C121.56 214.12 117 216.12 117 216.12 zM164.61 172.12 C139.2 172.12 131.18 173.88 131.18 178.12 C131.18 191.12 117.23 195.02 117.51 197.12 C119.03 208.62 109.97 209.94 113.96 212.12 C133.21 222.62 200.06 168.62 180.31 168.62 C159.64 168.62 169.17 172.12 164.61 172.12 zM114.47 201.12 C105.08 199.96 53.18 208.12 82.05 228.12 C84.47 229.8 88.87 215.65 107.38 213.62 C111.94 213.12 118.52 201.62 114.47 201.12 zM156 166.62 C151.95 167.62 121.09 167.8 122.57 168.12 C161.57 176.62 173.73 166.62 177.27 164.12 C179.67 162.43 160.05 165.62 156 166.62 zM128.14 180.12 C127.71 179.27 116.55 182.03 110.92 182.62 C87.12 185.12 75.76 188.36 80.03 193.62 C81.33 195.23 71.92 196.12 80.53 200.62 C81.95 201.36 71.92 207.62 109.91 198.62 C114.76 197.47 131.69 187.12 128.14 180.12 zM134.22 172.62 C134.56 172 118.01 168.12 118.01 168.12 C118.01 168.12 79.52 168.12 91.17 177.12 C91.57 177.43 70.91 187.62 103.83 182.12 C107.86 181.45 129.66 181.12 134.22 172.62 zM203.1 194.62 C205.07 184.9 201.85 183.81 199.56 187.12 C197.26 190.43 195.91 197.61 196.01 197.12 C202.6 165.62 188.21 184.31 189.43 188.12 C195.5 207.12 166.13 253.62 166.13 253.62 C166.13 253.62 198.15 219.05 203.1 194.62 zM126.62 78.12 C122.06 79.12 118.52 81.62 126.12 83.62 C133.71 85.62 131.18 77.12 126.62 78.12 z"/>
+ <path style="stroke-width:1;fill:rgb(255,246,227);stroke:none"
+ d="M363.73 85.73 C359.27 86.29 355.23 86.73 354.23 81.23 C353.23 75.73 355.73 73.73 363.23 75.73 C370.73 77.73 375.73 84.23 363.73 85.73 zM327.23 89.23 C327.23 89.23 308.51 93.65 325.73 80.73 C333.73 74.73 334.23 79.73 334.73 82.73 C335.48 87.2 327.23 89.23 327.23 89.23 zM384.23 48.73 C375.88 47.06 376.23 42.23 385.23 40.23 C386.7 39.91 389.23 49.73 384.23 48.73 zM389.23 48.73 C391.73 48.23 395.73 49.23 396.23 52.73 C396.73 56.23 392.73 58.23 390.23 56.23 C387.73 54.23 386.73 49.23 389.23 48.73 zM383.23 59.73 C385.73 58.73 393.23 60.23 392.73 63.23 C392.23 66.23 386.23 66.73 383.73 65.23 C381.23 63.73 380.73 60.73 383.23 59.73 zM384.23 77.23 C387.23 74.73 390.73 77.23 391.73 78.73 C392.73 80.23 387.73 82.23 386.23 82.73 C384.73 83.23 381.23 79.73 384.23 77.23 zM395.73 40.23 C395.73 40.23 399.73 40.23 398.73 41.73 C397.73 43.23 394.73 43.23 394.73 43.23 zM401.73 49.23 C401.73 49.23 405.73 49.23 404.73 50.73 C403.73 52.23 400.73 52.23 400.73 52.23 zM369.23 97.23 C369.23 97.23 374.23 99.23 373.23 100.73 C372.23 102.23 370.73 104.73 367.23 101.23 C363.73 97.73 369.23 97.23 369.23 97.23 zM355.73 116.73 C358.73 114.23 362.23 116.73 363.23 118.23 C364.23 119.73 359.23 121.73 357.73 122.23 C356.23 122.73 352.73 119.23 355.73 116.73 zM357.73 106.73 C360.73 104.23 363.23 107.73 364.23 109.23 C365.23 110.73 361.23 111.73 359.73 112.23 C358.23 112.73 354.73 109.23 357.73 106.73 zM340.73 73.23 C337.16 73.43 331.23 71.73 340.23 65.73 C348.55 60.19 348.23 61.73 348.73 64.73 C349.48 69.2 344.3 73.04 340.73 73.23 zM310.23 82.23 C310.23 82.23 306.73 79.23 313.73 73.23 C321.33 66.73 320.23 69.23 320.73 72.23 C321.48 76.7 310.23 82.23 310.23 82.23 zM341.23 55.73 C341.23 55.73 347.23 54.73 346.23 56.23 C345.23 57.73 342.73 63.23 339.23 59.73 C335.73 56.23 341.23 55.73 341.23 55.73 zM374.73 86.23 C376.11 86.23 377.23 87.36 377.23 88.73 C377.23 90.11 376.11 91.23 374.73 91.23 C373.36 91.23 372.23 90.11 372.23 88.73 C372.23 87.36 373.36 86.23 374.73 86.23 zM369.73 110.73 C371.11 110.73 372.23 111.86 372.23 113.23 C372.23 114.61 371.11 115.73 369.73 115.73 C368.36 115.73 367.23 114.61 367.23 113.23 C367.23 111.86 368.36 110.73 369.73 110.73 zM365.73 120.73 C367.11 120.73 368.23 121.86 368.23 123.23 C368.23 124.61 367.11 125.73 365.73 125.73 C364.36 125.73 363.23 124.61 363.23 123.23 C363.23 121.86 364.36 120.73 365.73 120.73 zM349.73 127.23 C351.11 127.23 352.23 128.36 352.23 129.73 C352.23 131.11 351.11 132.23 349.73 132.23 C348.36 132.23 347.23 131.11 347.23 129.73 C347.23 128.36 348.36 127.23 349.73 127.23 zM358.23 128.73 C359.61 128.73 362.23 130.86 362.23 132.23 C362.23 133.61 359.61 133.73 358.23 133.73 C356.86 133.73 355.73 132.61 355.73 131.23 C355.73 129.86 356.86 128.73 358.23 128.73 zM382.23 89.73 C383.61 89.73 384.73 90.86 384.73 92.23 C384.73 93.61 383.61 94.73 382.23 94.73 C380.86 94.73 379.73 93.61 379.73 92.23 C379.73 90.86 380.86 89.73 382.23 89.73 zM395.73 66.23 C397.11 66.23 398.23 67.36 398.23 68.73 C398.23 70.11 397.11 71.23 395.73 71.23 C394.36 71.23 393.23 70.11 393.23 68.73 C393.23 67.36 394.36 66.23 395.73 66.23 zM300.73 74.23 C303.05 75.16 314.23 67.73 310.73 66.73 C307.23 65.73 298.23 73.23 300.73 74.23 zM319.73 61.23 C322.23 61.73 329.73 58.73 326.23 57.73 C322.73 56.73 317.09 60.71 319.73 61.23 zM271.73 91.73 C277.23 88.73 292.73 81.23 285.23 82.23 C277.73 83.23 267.01 94.31 271.73 91.73 zM364.23 42.23 C366.73 42.73 374.23 39.73 370.73 38.73 C367.23 37.73 361.59 41.71 364.23 42.23 zM292.23 78.73 C294.73 79.23 299.73 76.73 296.23 75.73 C292.73 74.73 289.59 78.21 292.23 78.73 zM355.23 141.23 C356.61 141.23 357.73 142.86 357.73 144.23 C357.73 145.61 357.11 145.73 355.73 145.73 C354.36 145.73 353.23 144.61 353.23 143.23 C353.23 141.86 353.86 141.23 355.23 141.23 zM347.73 140.73 C349.11 140.73 351.23 141.36 351.23 142.73 C351.23 144.11 348.61 143.73 347.23 143.73 C345.86 143.73 344.73 142.61 344.73 141.23 C344.73 139.86 346.36 140.73 347.73 140.73 zM349.73 155.23 C351.11 155.23 353.73 157.36 353.73 158.73 C353.73 160.11 351.11 160.23 349.73 160.23 C348.36 160.23 347.23 159.11 347.23 157.73 C347.23 156.36 348.36 155.23 349.73 155.23 zM337.73 175.73 C341.73 174.73 341.73 176.73 342.73 180.23 C343.73 183.73 350.8 195.11 339.23 181.23 C336.73 178.23 333.73 176.73 337.73 175.73 zM349.73 187.73 C351.11 187.73 352.23 188.86 352.23 190.23 C352.23 191.61 351.11 192.73 349.73 192.73 C348.36 192.73 347.23 191.61 347.23 190.23 C347.23 188.86 348.36 187.73 349.73 187.73 zM352.23 196.73 C353.61 196.73 354.73 197.86 354.73 199.23 C354.73 200.61 353.61 201.73 352.23 201.73 C350.86 201.73 349.73 200.61 349.73 199.23 C349.73 197.86 350.86 196.73 352.23 196.73 zM352.4 205.73 C353.77 205.73 355.73 208.86 355.73 210.23 C355.73 211.61 354.61 212.73 353.23 212.73 C351.86 212.73 349.07 211.11 349.07 209.73 C349.07 208.36 351.02 205.73 352.4 205.73 zM353.73 221.73 C355.11 221.73 354.73 221.86 354.73 223.23 C354.73 224.61 354.61 223.73 353.23 223.73 C351.86 223.73 352.23 224.61 352.23 223.23 C352.23 221.86 352.36 221.73 353.73 221.73 zM340.23 188.73 C341.61 188.73 341.23 188.86 341.23 190.23 C341.23 191.61 341.11 190.73 339.73 190.73 C338.36 190.73 338.73 191.61 338.73 190.23 C338.73 188.86 338.86 188.73 340.23 188.73 zM343.23 201.23 C344.61 201.23 344.23 201.36 344.23 202.73 C344.23 204.11 344.44 207.73 343.07 207.73 C341.69 207.73 341.73 204.11 341.73 202.73 C341.73 201.36 341.86 201.23 343.23 201.23 zM346.73 215.23 C348.11 215.23 347.73 215.36 347.73 216.73 C347.73 218.11 347.61 217.23 346.23 217.23 C344.86 217.23 345.23 218.11 345.23 216.73 C345.23 215.36 345.36 215.23 346.73 215.23 zM340.57 228.73 C341.94 228.73 341.73 228.86 341.73 230.23 C341.73 231.61 341.44 230.73 340.07 230.73 C338.69 230.73 339.23 231.61 339.23 230.23 C339.23 228.86 339.19 228.73 340.57 228.73 zM349.4 232.07 C350.77 232.07 352.07 234.02 352.07 235.4 C352.07 236.77 349.11 239.23 347.73 239.23 C346.36 239.23 346.73 240.11 346.73 238.73 C346.73 237.36 348.02 232.07 349.4 232.07 zM343.73 246.4 C345.11 246.4 347.4 246.02 347.4 247.4 C347.4 248.77 344.11 251.23 342.73 251.23 C341.36 251.23 341.73 252.11 341.73 250.73 C341.73 249.36 342.36 246.4 343.73 246.4 zM335.23 239.23 C336.61 239.23 336.23 239.36 336.23 240.73 C336.23 242.11 336.11 241.23 334.73 241.23 C333.36 241.23 333.73 242.11 333.73 240.73 C333.73 239.36 333.86 239.23 335.23 239.23 zM332.73 258.4 C334.11 258.4 335.4 260.02 335.4 261.4 C335.4 262.77 333.11 262.23 331.73 262.23 C330.36 262.23 330.73 263.11 330.73 261.73 C330.73 260.36 331.36 258.4 332.73 258.4 zM324.4 263.73 C325.77 263.73 325.07 265.36 325.07 266.73 C325.07 268.11 320.11 271.23 318.73 271.23 C317.36 271.23 317.73 272.11 317.73 270.73 C317.73 269.36 323.02 263.73 324.4 263.73 zM325.23 247.73 C326.61 247.73 326.23 247.86 326.23 249.23 C326.23 250.61 326.11 249.73 324.73 249.73 C323.36 249.73 323.73 250.61 323.73 249.23 C323.73 247.86 323.86 247.73 325.23 247.73 zM313.23 256.23 C314.61 256.23 319.07 258.02 319.07 259.4 C319.07 260.77 313.44 263.07 312.07 263.07 C310.69 263.07 309.73 260.77 309.73 259.4 C309.73 258.02 311.86 256.23 313.23 256.23 zM300.23 260.73 C301.61 260.73 301.23 260.86 301.23 262.23 C301.23 263.61 301.11 262.73 299.73 262.73 C298.36 262.73 298.73 263.61 298.73 262.23 C298.73 260.86 298.86 260.73 300.23 260.73 zM308.23 272.73 C309.61 272.73 309.23 272.86 309.23 274.23 C309.23 275.61 309.11 274.73 307.73 274.73 C306.36 274.73 306.73 275.61 306.73 274.23 C306.73 272.86 306.86 272.73 308.23 272.73 zM305.23 273.73 C306.61 273.73 306.23 273.86 306.23 275.23 C306.23 276.61 306.11 275.73 304.73 275.73 C303.36 275.73 303.73 276.61 303.73 275.23 C303.73 273.86 303.86 273.73 305.23 273.73 zM293.73 274.07 C294.65 274.07 295.73 275.48 295.73 276.4 C295.73 277.32 295.65 276.73 294.73 276.73 C293.82 276.73 291.4 277.98 291.4 277.07 C291.4 276.15 292.82 274.07 293.73 274.07 zM296.73 276.73 C297.65 276.73 297.4 276.82 297.4 277.73 C297.4 278.65 297.32 278.07 296.4 278.07 C295.48 278.07 295.73 278.65 295.73 277.73 C295.73 276.82 295.82 276.73 296.73 276.73 zM291.4 263.73 C292.32 263.73 293.73 267.15 293.73 268.07 C293.73 268.98 290.65 268.73 289.73 268.73 C288.82 268.73 287.4 265.98 287.4 265.07 C287.4 264.15 290.48 263.73 291.4 263.73 zM280.07 274.73 C281.44 274.73 281.23 274.86 281.23 276.23 C281.23 277.61 280.94 276.73 279.57 276.73 C278.19 276.73 278.73 277.61 278.73 276.23 C278.73 274.86 278.69 274.73 280.07 274.73 zM277.07 267.73 C278.44 267.73 276.4 271.02 276.4 272.4 C276.4 273.77 271.94 274.23 270.57 274.23 C269.19 274.23 271.73 272.44 271.73 271.07 C271.73 269.69 275.69 267.73 277.07 267.73 zM52.23 84.9 C56.7 85.46 60.73 85.9 61.73 80.4 C62.73 74.9 60.23 72.9 52.73 74.9 C45.23 76.9 40.23 83.4 52.23 84.9 zM88.73 88.4 C88.73 88.4 107.45 92.81 90.23 79.9 C82.23 73.9 81.73 78.9 81.23 81.9 C80.49 86.37 88.73 88.4 88.73 88.4 zM31.73 47.9 C40.08 46.23 39.73 41.4 30.73 39.4 C29.27 39.07 26.73 48.9 31.73 47.9 zM26.73 47.9 C24.23 47.4 20.23 48.4 19.73 51.9 C19.23 55.4 23.23 57.4 25.73 55.4 C28.23 53.4 29.23 48.4 26.73 47.9 zM32.73 58.9 C30.23 57.9 22.73 59.4 23.23 62.4 C23.73 65.4 29.73 65.9 32.23 64.4 C34.73 62.9 35.23 59.9 32.73 58.9 zM31.73 76.4 C28.73 73.9 25.23 76.4 24.23 77.9 C23.23 79.4 28.23 81.4 29.73 81.9 C31.23 82.4 34.73 78.9 31.73 76.4 zM20.23 39.4 C20.23 39.4 16.23 39.4 17.23 40.9 C18.23 42.4 21.23 42.4 21.23 42.4 zM14.23 48.4 C14.23 48.4 10.23 48.4 11.23 49.9 C12.23 51.4 15.23 51.4 15.23 51.4 zM46.73 96.4 C46.73 96.4 41.73 98.4 42.73 99.9 C43.73 101.4 45.23 103.9 48.73 100.4 C52.23 96.9 46.73 96.4 46.73 96.4 zM60.23 115.9 C57.23 113.4 53.73 115.9 52.73 117.4 C51.73 118.9 56.73 120.9 58.23 121.4 C59.73 121.9 63.23 118.4 60.23 115.9 zM58.23 105.9 C55.23 103.4 52.73 106.9 51.73 108.4 C50.73 109.9 54.73 110.9 56.23 111.4 C57.73 111.9 61.23 108.4 58.23 105.9 zM75.23 72.4 C78.8 72.6 84.73 70.9 75.73 64.9 C67.41 59.35 67.73 60.9 67.23 63.9 C66.49 68.37 71.66 72.2 75.23 72.4 zM105.73 81.4 C105.73 81.4 109.23 78.4 102.23 72.4 C94.64 65.89 95.73 68.4 95.23 71.4 C94.49 75.87 105.73 81.4 105.73 81.4 zM74.73 54.9 C74.73 54.9 68.73 53.9 69.73 55.4 C70.73 56.9 73.23 62.4 76.73 58.9 C80.23 55.4 74.73 54.9 74.73 54.9 zM41.23 85.4 C39.86 85.4 38.73 86.53 38.73 87.9 C38.73 89.28 39.86 90.4 41.23 90.4 C42.61 90.4 43.73 89.28 43.73 87.9 C43.73 86.53 42.61 85.4 41.23 85.4 zM46.23 109.9 C44.86 109.9 43.73 111.03 43.73 112.4 C43.73 113.78 44.86 114.9 46.23 114.9 C47.61 114.9 48.73 113.78 48.73 112.4 C48.73 111.03 47.61 109.9 46.23 109.9 zM50.23 119.9 C48.86 119.9 47.73 121.03 47.73 122.4 C47.73 123.78 48.86 124.9 50.23 124.9 C51.61 124.9 52.73 123.78 52.73 122.4 C52.73 121.03 51.61 119.9 50.23 119.9 zM66.23 126.4 C64.86 126.4 63.73 127.53 63.73 128.9 C63.73 130.28 64.86 131.4 66.23 131.4 C67.61 131.4 68.73 130.28 68.73 128.9 C68.73 127.53 67.61 126.4 66.23 126.4 zM57.73 127.9 C56.36 127.9 53.73 130.03 53.73 131.4 C53.73 132.78 56.36 132.9 57.73 132.9 C59.11 132.9 60.23 131.78 60.23 130.4 C60.23 129.03 59.11 127.9 57.73 127.9 zM33.73 88.9 C32.36 88.9 31.23 90.03 31.23 91.4 C31.23 92.78 32.36 93.9 33.73 93.9 C35.11 93.9 36.23 92.78 36.23 91.4 C36.23 90.03 35.11 88.9 33.73 88.9 zM20.23 65.4 C18.86 65.4 17.73 66.53 17.73 67.9 C17.73 69.28 18.86 70.4 20.23 70.4 C21.61 70.4 22.73 69.28 22.73 67.9 C22.73 66.53 21.61 65.4 20.23 65.4 zM115.23 73.4 C112.91 74.33 101.73 66.9 105.23 65.9 C108.73 64.9 117.73 72.4 115.23 73.4 zM96.23 60.4 C93.73 60.9 86.23 57.9 89.73 56.9 C93.23 55.9 98.87 59.87 96.23 60.4 zM144.23 90.9 C138.73 87.9 123.23 80.4 130.73 81.4 C138.23 82.4 148.96 93.48 144.23 90.9 zM51.73 41.4 C49.23 41.9 41.73 38.9 45.23 37.9 C48.73 36.9 54.37 40.87 51.73 41.4 zM123.73 77.9 C121.23 78.4 116.23 75.9 119.73 74.9 C123.23 73.9 126.37 77.37 123.73 77.9 zM60.73 140.4 C59.36 140.4 58.23 142.03 58.23 143.4 C58.23 144.78 58.86 144.9 60.23 144.9 C61.61 144.9 62.73 143.78 62.73 142.4 C62.73 141.03 62.11 140.4 60.73 140.4 zM68.23 139.9 C66.86 139.9 64.73 140.53 64.73 141.9 C64.73 143.28 67.36 142.9 68.73 142.9 C70.11 142.9 71.23 141.78 71.23 140.4 C71.23 139.03 69.61 139.9 68.23 139.9 zM66.23 154.4 C64.86 154.4 62.23 156.53 62.23 157.9 C62.23 159.28 64.86 159.4 66.23 159.4 C67.61 159.4 68.73 158.28 68.73 156.9 C68.73 155.53 67.61 154.4 66.23 154.4 zM78.23 174.9 C74.23 173.9 74.23 175.9 73.23 179.4 C72.23 182.9 65.17 194.28 76.73 180.4 C79.23 177.4 82.23 175.9 78.23 174.9 zM66.23 186.9 C64.86 186.9 63.73 188.02 63.73 189.4 C63.73 190.77 64.86 191.9 66.23 191.9 C67.61 191.9 68.73 190.77 68.73 189.4 C68.73 188.02 67.61 186.9 66.23 186.9 zM63.73 195.9 C62.36 195.9 61.23 197.02 61.23 198.4 C61.23 199.77 62.36 200.9 63.73 200.9 C65.11 200.9 66.23 199.77 66.23 198.4 C66.23 197.02 65.11 195.9 63.73 195.9 zM63.57 204.9 C62.19 204.9 60.23 208.02 60.23 209.4 C60.23 210.77 61.36 211.9 62.73 211.9 C64.11 211.9 66.9 210.27 66.9 208.9 C66.9 207.52 64.94 204.9 63.57 204.9 zM62.23 220.9 C60.86 220.9 61.23 221.02 61.23 222.4 C61.23 223.77 61.36 222.9 62.73 222.9 C64.11 222.9 63.73 223.77 63.73 222.4 C63.73 221.02 63.61 220.9 62.23 220.9 zM75.73 187.9 C74.36 187.9 74.73 188.02 74.73 189.4 C74.73 190.77 74.86 189.9 76.23 189.9 C77.61 189.9 77.23 190.77 77.23 189.4 C77.23 188.02 77.11 187.9 75.73 187.9 zM72.73 200.4 C71.36 200.4 71.73 200.52 71.73 201.9 C71.73 203.27 71.53 206.9 72.9 206.9 C74.28 206.9 74.23 203.27 74.23 201.9 C74.23 200.52 74.11 200.4 72.73 200.4 zM69.23 214.4 C67.86 214.4 68.23 214.52 68.23 215.9 C68.23 217.27 68.36 216.4 69.73 216.4 C71.11 216.4 70.73 217.27 70.73 215.9 C70.73 214.52 70.61 214.4 69.23 214.4 zM75.4 227.9 C74.03 227.9 74.23 228.02 74.23 229.4 C74.23 230.77 74.53 229.9 75.9 229.9 C77.28 229.9 76.73 230.77 76.73 229.4 C76.73 228.02 76.78 227.9 75.4 227.9 zM66.57 231.23 C65.19 231.23 63.9 233.19 63.9 234.57 C63.9 235.94 66.86 238.4 68.23 238.4 C69.61 238.4 69.23 239.27 69.23 237.9 C69.23 236.52 67.94 231.23 66.57 231.23 zM72.23 245.57 C70.86 245.57 68.57 245.19 68.57 246.57 C68.57 247.94 71.86 250.4 73.23 250.4 C74.61 250.4 74.23 251.27 74.23 249.9 C74.23 248.52 73.61 245.57 72.23 245.57 zM80.73 238.4 C79.36 238.4 79.73 238.52 79.73 239.9 C79.73 241.27 79.86 240.4 81.23 240.4 C82.61 240.4 82.23 241.27 82.23 239.9 C82.23 238.52 82.11 238.4 80.73 238.4 zM83.23 257.57 C81.86 257.57 80.57 259.19 80.57 260.57 C80.57 261.94 82.86 261.4 84.23 261.4 C85.61 261.4 85.23 262.27 85.23 260.9 C85.23 259.52 84.61 257.57 83.23 257.57 zM91.57 262.9 C90.19 262.9 90.9 264.52 90.9 265.9 C90.9 267.27 95.86 270.4 97.23 270.4 C98.61 270.4 98.23 271.27 98.23 269.9 C98.23 268.52 92.94 262.9 91.57 262.9 zM90.73 246.9 C89.36 246.9 89.73 247.02 89.73 248.4 C89.73 249.77 89.86 248.9 91.23 248.9 C92.61 248.9 92.23 249.77 92.23 248.4 C92.23 247.02 92.11 246.9 90.73 246.9 zM102.73 255.4 C101.36 255.4 96.9 257.19 96.9 258.57 C96.9 259.94 102.53 262.23 103.9 262.23 C105.28 262.23 106.23 259.94 106.23 258.57 C106.23 257.19 104.11 255.4 102.73 255.4 zM115.73 259.9 C114.36 259.9 114.73 260.02 114.73 261.4 C114.73 262.77 114.86 261.9 116.23 261.9 C117.61 261.9 117.23 262.77 117.23 261.4 C117.23 260.02 117.11 259.9 115.73 259.9 zM107.73 271.9 C106.36 271.9 106.73 272.02 106.73 273.4 C106.73 274.77 106.86 273.9 108.23 273.9 C109.61 273.9 109.23 274.77 109.23 273.4 C109.23 272.02 109.11 271.9 107.73 271.9 zM110.73 272.9 C109.36 272.9 109.73 273.02 109.73 274.4 C109.73 275.77 109.86 274.9 111.23 274.9 C112.61 274.9 112.23 275.77 112.23 274.4 C112.23 273.02 112.11 272.9 110.73 272.9 zM122.23 273.23 C121.32 273.23 120.23 274.65 120.23 275.57 C120.23 276.48 120.32 275.9 121.23 275.9 C122.15 275.9 124.57 277.15 124.57 276.23 C124.57 275.32 123.15 273.23 122.23 273.23 zM119.23 275.9 C118.32 275.9 118.57 275.98 118.57 276.9 C118.57 277.82 118.65 277.23 119.57 277.23 C120.48 277.23 120.23 277.82 120.23 276.9 C120.23 275.98 120.15 275.9 119.23 275.9 zM124.57 262.9 C123.65 262.9 122.23 266.32 122.23 267.23 C122.23 268.15 125.32 267.9 126.23 267.9 C127.15 267.9 128.57 265.15 128.57 264.23 C128.57 263.32 125.48 262.9 124.57 262.9 zM135.9 273.9 C134.53 273.9 134.73 274.02 134.73 275.4 C134.73 276.77 135.03 275.9 136.4 275.9 C137.78 275.9 137.23 276.77 137.23 275.4 C137.23 274.02 137.28 273.9 135.9 273.9 zM138.9 266.9 C137.53 266.9 139.57 270.19 139.57 271.57 C139.57 272.94 144.03 273.4 145.4 273.4 C146.78 273.4 144.23 271.61 144.23 270.23 C144.23 268.86 140.28 266.9 138.9 266.9 zM211 134.8 C209.63 134.8 209.83 134.93 209.83 136.3 C209.83 137.68 210.13 136.8 211.5 136.8 C212.88 136.8 212.33 137.68 212.33 136.3 C212.33 134.93 212.38 134.8 211 134.8 zM205.5 134.8 C204.13 134.8 204.33 134.93 204.33 136.3 C204.33 137.68 204.63 136.8 206 136.8 C207.38 136.8 206.83 137.68 206.83 136.3 C206.83 134.93 206.88 134.8 205.5 134.8 zM211 143.8 C209.63 143.8 209.83 143.93 209.83 145.3 C209.83 146.68 210.13 145.8 211.5 145.8 C212.88 145.8 212.33 146.68 212.33 145.3 C212.33 143.93 212.38 143.8 211 143.8 zM204.9 143.7 C203.53 143.7 203.73 143.83 203.73 145.2 C203.73 146.58 204.03 145.7 205.4 145.7 C206.78 145.7 206.23 146.58 206.23 145.2 C206.23 143.83 206.28 143.7 204.9 143.7 zM213 154.3 C211.63 154.3 212 155.43 212 156.8 C212 158.18 212.42 161.3 213.8 161.3 C215.17 161.3 214.33 157.18 214.33 155.8 C214.33 154.43 214.38 154.3 213 154.3 zM204 154.3 C202.63 154.3 202.6 155.53 202.6 156.9 C202.6 158.28 201.63 161.5 203 161.5 C204.38 161.5 204.8 157.68 204.8 156.3 C204.8 154.93 205.38 154.3 204 154.3 z"/>
+<!-- Generated by Jasc WebDraw PR4(tm) on 06/07/01 12:18:39 -->
+</svg>
diff --git a/ksvg/test/chem1.svg b/ksvg/test/chem1.svg
new file mode 100644
index 00000000..3ce82439
--- /dev/null
+++ b/ksvg/test/chem1.svg
@@ -0,0 +1,189 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG December 1999//EN" "http://www.w3.org/Graphics/SVG/SVG-19991203.dtd" [
+ <!ENTITY st0 "fill:#8C1788;stroke:none;">
+ <!ENTITY st1 "fill:#202020;">
+ <!ENTITY st2 "font-size:0.5;">
+ <!ENTITY st3 "fill:#FF00FF;">
+ <!ENTITY st4 "fill-rule:nonzero;fill:#FFFFFF;stroke:#000000;stroke-width:0.11677;stroke-miterlimit:10;">
+ <!ENTITY st5 "fill:#CF4629;">
+ <!ENTITY st6 "fill:none;stroke:none;">
+ <!ENTITY st7 "font-family:'Helvetica';">
+ <!ENTITY st8 "fill:#727272;">
+ <!ENTITY st9 "fill:#0FF0FF;">
+]>
+
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml" >
+ <g id="Layer_x0020_1" transform="translate(20,20) scale(4)">
+ <g style="&st4;">
+ <g>
+ <!--path id="clip1" style="&st6;" d="M0,144.99951V0h117v144.99951H0z"/-->
+ <!--g style="clip-path:url(#clip1);"-->
+ <g>
+ <path style="&st9;" d="M68.37207,6.72461c0-0.96582-0.78418-1.74951-1.75-1.74951s-1.75,0.78369-1.75,1.74951c0,0.96631,0.78418,1.75,1.75,1.75s1.75-0.78369,1.75-1.75z"/>
+ <path d="M67.49805,7.30713c-0.0459-0.04053-0.12402-0.02832-0.17383,0.02832c-0.05078,0.05615-0.05371,0.13525-0.00879,0.17578l2.00684,2.08496l0.47363-0.53125l-2.29785-1.75781z"/>
+ <path style="&st9;" d="M57.05566,134.40479c0-1.01172-0.82129-1.83301-1.8335-1.83301c-1.01172,0-1.83301,0.82129-1.83301,1.83301s0.82129,1.83301,1.83301,1.83301c1.01221,0,1.8335-0.82129,1.8335-1.83301z"/>
+ <path d="M56.08496,133.62451c-0.0498,0.03809-0.04883,0.12305,0.00244,0.18945c0.05078,0.06641,0.13281,0.08887,0.18262,0.05078l2.64746-1.76562l-0.43896-0.57324l-2.39355,2.09863z"/>
+ <path style="&st9;" d="M88.39062,2.28467c0-1.02002-0.82812-1.84814-1.84863-1.84814c-1.01953,0-1.84766,0.82812-1.84766,1.84814c0,1.02051,0.82812,1.84863,1.84766,1.84863c1.02051,0,1.84863-0.82812,1.84863-1.84863z"/>
+ <path d="M85.7041,3.48047c0.03711-0.04297,0.00977-0.12793-0.06152-0.18994s-0.15918-0.07764-0.19629-0.03467l-2.63672,2.77246l0.51074,0.44531l2.38379-2.99316z"/>
+ <path style="&st9;" d="M23.02002,91.68506c0-1.03711-0.84131-1.87793-1.87793-1.87793c-1.03613,0-1.87744,0.84082-1.87744,1.87793c0,1.03613,0.84131,1.87695,1.87744,1.87695c1.03662,0,1.87793-0.84082,1.87793-1.87695z"/>
+ <path d="M20.74463,91.28857c0.03662,0.05664,0.11572,0.07227,0.17627,0.0332c0.06055-0.03809,0.07959-0.11621,0.04297-0.17383l-0.54785-1.36328l-0.68018,0.43652l1.00879,1.06738z"/>
+ <path style="&st8;" d="M72.99902,10.20459c0-1.3335-1.08301-2.41602-2.41699-2.41602s-2.41602,1.08252-2.41602,2.41602c0,1.33398,1.08203,2.4165,2.41602,2.4165s2.41699-1.08252,2.41699-2.4165z"/>
+ <path d="M72.83887,9.51709c-0.02637,0.00537-0.02441,0.10938,0.00293,0.23145s0.07129,0.2168,0.09668,0.21094l6.54395-1.41309l-0.12793-0.5625l-6.51562,1.5332z"/>
+ <path d="M69.47461,11.83203c0.03809-0.04492,0.00879-0.13232-0.06543-0.1958c-0.07324-0.06396-0.16504-0.0791-0.20312-0.03467l-3.63867,3.96191l0.54102,0.46533l3.36621-4.19678z"/>
+ <path style="&st9;" d="M99.99707,82.92529c0-1.06836-0.86621-1.93555-1.93457-1.93555s-1.93555,0.86719-1.93555,1.93555c0,1.06738,0.86719,1.93457,1.93555,1.93457s1.93457-0.86719,1.93457-1.93457z"/>
+ <path d="M98.41504,83.6958c-0.01953-0.06738-0.09473-0.10449-0.16895-0.08398c-0.07422,0.02148-0.11816,0.09375-0.09863,0.16113l0.24609,1.84863l0.78809-0.22559l-0.7666-1.7002z"/>
+ <path style="&st9;" d="M75.6582,142.68506c0-1.08008-0.87598-1.95605-1.95605-1.95605c-1.0791,0-1.95605,0.87598-1.95605,1.95605c0,1.0791,0.87695,1.95605,1.95605,1.95605c1.08008,0,1.95605-0.87695,1.95605-1.95605z"/>
+ <path d="M72.75391,141.15967c0.02148,0.04785,0.11914,0.05078,0.21777,0.00586c0.09863-0.04395,0.16113-0.11914,0.13965-0.16699l-1.51172-3.70898l-0.61621,0.27734l1.77051,3.59277z"/>
+ <path style="&st8;" d="M84.22949,7.68506c0-1.37305-1.11426-2.4873-2.4873-2.4873s-2.4873,1.11426-2.4873,2.4873c0,1.37256,1.11426,2.4873,2.4873,2.4873s2.4873-1.11475,2.4873-2.4873z"/>
+ <path d="M82.93945,8.58936c-0.05176-0.04688-0.13965-0.03418-0.19727,0.02881s-0.0625,0.15186-0.01074,0.19873l2.6123,2.72949l0.5498-0.60205l-2.9541-2.35498z"/>
+ <path style="&st8;" d="M62.40918,130.80518c0-1.38379-1.12305-2.50684-2.50684-2.50684s-2.50635,1.12305-2.50635,2.50684c0,1.38281,1.12256,2.50586,2.50635,2.50586s2.50684-1.12305,2.50684-2.50586z"/>
+ <path d="M62.30273,131.57373c-0.03027-0.01367-0.0957,0.07031-0.14648,0.18555s-0.06738,0.21973-0.03809,0.23242l5.85156,2.66406l0.24805-0.56152l-5.91504-2.52051z"/>
+ <path d="M58.9292,128.90186c0.02197,0.04883,0.12061,0.05273,0.2207,0.00781s0.16309-0.12109,0.14111-0.16992l-2.21924-5.30664l-0.63574,0.28516l2.49316,5.18359z"/>
+ <path style="&st9;" d="M113.86035,98.04443c0-1.10254-0.89453-1.99805-1.99805-1.99805s-1.99805,0.89551-1.99805,1.99805c0,1.10352,0.89453,1.99902,1.99805,1.99902s1.99805-0.89551,1.99805-1.99902z"/>
+ <path d="M110.7041,97.55322c0.05957,0.03516,0.14551,0.00195,0.19043-0.0752c0.0459-0.07715,0.03418-0.16797-0.02539-0.20312l-2.26562-1.62012l-0.40527,0.68262l2.50586,1.21582z"/>
+ <path style="&st9;" d="M57.85059,19.20459c0-1.11963-0.90869-2.02832-2.02832-2.02832s-2.02832,0.90869-2.02832,2.02832c0,1.12012,0.90869,2.02881,2.02832,2.02881s2.02832-0.90869,2.02832-2.02881z"/>
+ <path d="M57.68164,18.58301c-0.02979,0.00635-0.03174,0.11572-0.00439,0.24365c0.02734,0.12744,0.07373,0.22607,0.10352,0.21973l4.29736-0.84814l-0.12891-0.59961l-4.26758,0.98438z"/>
+ <path style="&st8;" d="M72.93555,135.36475c0-1.43164-1.16211-2.59277-2.59277-2.59277c-1.43164,0-2.59375,1.16113-2.59375,2.59277s1.16211,2.59375,2.59375,2.59375c1.43066,0,2.59277-1.16211,2.59277-2.59375z"/>
+ <path d="M71.625,134.17725c-0.05469,0.04297-0.05273,0.13867,0.00586,0.21289s0.15039,0.09961,0.20508,0.05664l3.47168-2.41797l-0.50586-0.64453l-3.17676,2.79297z"/>
+ <path style="&st9;" d="M49.8418,118.08447c0-1.13672-0.92285-2.05859-2.05957-2.05859s-2.05957,0.92188-2.05957,2.05859s0.92285,2.05957,2.05957,2.05957s2.05957-0.92285,2.05957-2.05957z"/>
+ <path d="M49.67188,118.56982c-0.0332-0.01465-0.10205,0.06934-0.15283,0.18848c-0.05127,0.11816-0.06543,0.22559-0.03174,0.24023l3.85693,1.75586l0.25244-0.58789l-3.9248-1.59668z"/>
+ <path style="&st9;" d="M102.2832,55.20459c0-1.1377-0.92285-2.06104-2.06055-2.06104s-2.06152,0.92334-2.06152,2.06104c0,1.13818,0.92383,2.06152,2.06152,2.06152s2.06055-0.92334,2.06055-2.06152z"/>
+ <path style="&st8;" d="M22.31787,89.40479c0-1.44434-1.17188-2.61523-2.61572-2.61523s-2.61572,1.1709-2.61572,2.61523S18.2583,92.021,19.70215,92.021s2.61572-1.17188,2.61572-2.61621z"/>
+ <path style="&st9;" d="M34.979,77.16455c0-1.14648-0.93018-2.07617-2.07666-2.07617s-2.07715,0.92969-2.07715,2.07617s0.93066,2.07715,2.07715,2.07715s2.07666-0.93066,2.07666-2.07715z"/>
+ <path d="M31.479,78.20459c0.05176-0.03027,0.04834-0.13184-0.00781-0.22754c-0.05566-0.0957-0.14307-0.14844-0.19434-0.11816l-3.21875,1.69141l0.37158,0.63379l3.04932-1.97949z"/>
+ <path d="M20.94287,87.3501c-0.03174,0.04004,0.01807,0.13281,0.11084,0.20605c0.09277,0.07422,0.19385,0.10254,0.22559,0.0625l3.7085-4.43262l-0.54932-0.43848l-3.49561,4.60254z"/>
+ <path d="M17.84473,90.65283c0.0498-0.03027,0.04346-0.13184-0.01465-0.22754s-0.14551-0.14941-0.19531-0.11914l-4.71777,2.66797l0.38184,0.62988l4.5459-2.95117z"/>
+ <path style="&st8;" d="M67.20117,17.40479c0-1.4458-1.17285-2.61914-2.61914-2.61914c-1.44531,0-2.61914,1.17334-2.61914,2.61914s1.17383,2.61914,2.61914,2.61914c1.44629,0,2.61914-1.17334,2.61914-2.61914z"/>
+ <path d="M65.69141,18.29102c-0.05273-0.05078-0.14648-0.03906-0.20801,0.02588c-0.0625,0.06543-0.06934,0.15918-0.01562,0.20947l2.45117,2.69922l0.58984-0.62061l-2.81738-2.31396z"/>
+ <path style="&st8;" d="M58.49414,121.44482c0-1.47461-1.19727-2.67188-2.67188-2.67188s-2.67139,1.19727-2.67139,2.67188s1.19678,2.67188,2.67139,2.67188s2.67188-1.19727,2.67188-2.67188z"/>
+ <path d="M57.06348,120.23389c-0.05664,0.0459-0.05371,0.14355,0.00684,0.21777c0.06006,0.0752,0.15479,0.09961,0.21143,0.05371l3.3374-2.36133l-0.5293-0.65918l-3.02637,2.74902z"/>
+ <path style="&st9;" d="M8.02734,100.92529c0-1.17383-0.95166-2.12598-2.125-2.12598s-2.12549,0.95215-2.12549,2.12598c0,1.17285,0.95215,2.125,2.12549,2.125s2.125-0.95215,2.125-2.125z"/>
+ <path d="M6.94287,99.27393c-0.03271,0.04004,0.01709,0.13477,0.11182,0.21191c0.09424,0.07617,0.19727,0.10547,0.23047,0.06543l2.50293-2.87012l-0.55225-0.44727l-2.29297,3.04004z"/>
+ <path style="&st8;" d="M101.82227,86.5249c0-1.47949-1.2002-2.67969-2.67969-2.67969s-2.68066,1.2002-2.68066,2.67969s1.20117,2.67969,2.68066,2.67969s2.67969-1.2002,2.67969-2.67969z"/>
+ <path d="M101.0625,88.31689c-0.0127-0.01367-0.10938,0.05469-0.2168,0.15234c-0.10742,0.09863-0.18359,0.18945-0.1709,0.20312l4.23047,4.68164l0.44824-0.41016l-4.29102-4.62695z"/>
+ <path d="M97.52441,85.80322c0.06348,0.03809,0.1543,0.00195,0.2041-0.08008c0.0498-0.08105,0.03906-0.17871-0.02344-0.2168L94.43457,83.229l-0.44238,0.73047l3.53223,1.84375z"/>
+ <path style="&st5;" d="M71.26758,89.76514c0-2.03418-1.65137-3.68555-3.68555-3.68555s-3.68457,1.65137-3.68457,3.68555s1.65039,3.68457,3.68457,3.68457s3.68555-1.65039,3.68555-3.68457z"/>
+ <path d="M69.43164,86.68994c-0.02051,0.0293,0.05273,0.11523,0.16309,0.19336c0.11035,0.07715,0.21582,0.11719,0.23633,0.08789l9.1748-12.85645l-0.55664-0.3916l-9.01758,12.9668z"/>
+ <path d="M65.94727,91.87061c0.04688-0.05176,0.02148-0.14941-0.05469-0.2168c-0.07715-0.06738-0.17676-0.08008-0.22266-0.02734l-7.76562,8.41016l0.66699,0.58984l7.37598-8.75586z"/>
+ <path style="&st8;" d="M109.66602,95.16455c0-1.50293-1.2207-2.72266-2.72363-2.72266s-2.72363,1.21973-2.72363,2.72266c0,1.50391,1.2207,2.72363,2.72363,2.72363s2.72363-1.21973,2.72363-2.72363z"/>
+ <path d="M107.43359,96.19775c-0.02344-0.0752-0.1084-0.11523-0.19141-0.08984s-0.13184,0.10645-0.1084,0.18164l0.46387,2.55176l0.88281-0.27051l-1.04688-2.37305z"/>
+ <path style="&st5;" d="M71.94629,50.04492c0-2.07812-1.68652-3.76416-3.76367-3.76416c-2.07812,0-3.76465,1.68604-3.76465,3.76416c0,2.07764,1.68652,3.76416,3.76465,3.76416c2.07715,0,3.76367-1.68652,3.76367-3.76416z"/>
+ <path d="M70.42773,53.0083c-0.01367-0.02197-0.12402,0.02344-0.24512,0.10156s-0.20703,0.15918-0.19336,0.18164l8.56543,13.39551l0.55176-0.35498L70.42773,53.0083z"/>
+ <path d="M66.82422,47.43457c0.02832,0.06201,0.13184,0.07617,0.23145,0.03125c0.10059-0.04443,0.15918-0.13086,0.13184-0.19287l-4.70801-11.14893l-0.79883,0.35547l5.14355,10.95508z"/>
+ <path style="&st8;" d="M29.06299,81.12451c0-1.52344-1.23682-2.76074-2.76074-2.76074s-2.76074,1.2373-2.76074,2.76074c0,1.52441,1.23682,2.76074,2.76074,2.76074s2.76074-1.23633,2.76074-2.76074z"/>
+ <path d="M25.68555,80.34521c0.04004,0.06934,0.13135,0.09082,0.20459,0.04883c0.07275-0.04199,0.1001-0.13184,0.06006-0.20117l-0.67041-1.81543l-0.82666,0.47559l1.23242,1.49219z"/>
+ <path style="&st8;" d="M89.5459,12.24463c0-1.52539-1.23828-2.76318-2.76367-2.76318s-2.76367,1.23779-2.76367,2.76318s1.23828,2.76367,2.76367,2.76367s2.76367-1.23828,2.76367-2.76367z"/>
+ <path d="M89.35352,11.47852c-0.0293,0.00635-0.0293,0.125,0.00195,0.26416c0.03125,0.13965,0.08008,0.24707,0.11035,0.24072l3.95312-0.80664l-0.1416-0.63965l-3.92383,0.94141z"/>
+ <path d="M85.49414,14.1123c0.04395-0.05078,0.01074-0.15137-0.07324-0.22461c-0.08496-0.07324-0.18945-0.09131-0.2334-0.04102l-3.31934,3.52246l0.61133,0.52979l3.01465-3.78662z"/>
+ <path style="&st8;" d="M13.85498,94.56494c0-1.54199-1.25098-2.79297-2.79248-2.79297s-2.79297,1.25098-2.79297,2.79297c0,1.54102,1.25146,2.79199,2.79297,2.79199s2.79248-1.25098,2.79248-2.79199z"/>
+ <path d="M10.5127,93.86475c0.04199,0.06934,0.13477,0.08984,0.20703,0.04492c0.07275-0.04395,0.09717-0.13477,0.05518-0.2041l-0.65137-1.70215l-0.82324,0.50293l1.2124,1.3584z"/>
+ <path style="&st9;" d="M97.65918,10.32471c0-1.23486-1.00195-2.23682-2.2373-2.23682c-1.23438,0-2.23633,1.00195-2.23633,2.23682s1.00195,2.2373,2.23633,2.2373c1.23535,0,2.2373-1.00244,2.2373-2.2373z"/>
+ <path style="&st9;" d="M115.66895,41.5249c0-1.24023-1.00586-2.24707-2.24707-2.24707c-1.24023,0-2.24707,1.00684-2.24707,2.24707s1.00684,2.24707,2.24707,2.24707c1.24121,0,2.24707-1.00684,2.24707-2.24707z"/>
+ <path d="M112.09375,42.71924c0.05664-0.03857,0.0498-0.14697-0.01465-0.24219s-0.16309-0.14111-0.21875-0.10303l-2.70703,1.59717l0.45703,0.67334l2.4834-1.92529z"/>
+ <path style="&st8;" d="M79.42871,130.56494c0-1.57129-1.27539-2.84668-2.84668-2.84668s-2.84668,1.27539-2.84668,2.84668s1.27539,2.84668,2.84668,2.84668s2.84668-1.27539,2.84668-2.84668z"/>
+ <path d="M79.1582,131.3833c-0.03418-0.01465-0.10742,0.08105-0.16309,0.21289c-0.05664,0.13281-0.0752,0.25098-0.04102,0.26562l3.49707,1.58594l0.27148-0.63379l-3.56445-1.43066z"/>
+ <path d="M75.30371,128.38428c0.02539,0.05469,0.1377,0.05859,0.25098,0.00684c0.11426-0.05176,0.18555-0.13867,0.16016-0.19434l-1.98535-4.7627l-0.71484,0.3252l2.28906,4.625z"/>
+ <path style="&st8;" d="M102.71973,53.40479c0-1.57715-1.28027-2.85742-2.85742-2.85742s-2.85742,1.28027-2.85742,2.85742c0,1.57764,1.28027,2.85742,2.85742,2.85742s2.85742-1.27979,2.85742-2.85742z"/>
+ <path d="M101.53906,51.37939c-0.03516,0.03711,0.01367,0.14258,0.10938,0.23535s0.20312,0.1377,0.23926,0.10059l3.89062-3.84033l-0.53809-0.52002l-3.70117,4.02441z"/>
+ <path d="M98.10059,54.92871c0.05664-0.03857,0.04785-0.14844-0.01855-0.24512s-0.16699-0.14355-0.22266-0.10498l-4.06445,2.55713l0.46875,0.68066l3.83691-2.8877z"/>
+ <path style="&st3;" d="M85.8623,70.32471c0-2.53906-2.06055-4.6001-4.59961-4.6001c-2.54004,0-4.60059,2.06104-4.60059,4.6001c0,2.53955,2.06055,4.60059,4.60059,4.60059c2.53906,0,4.59961-2.06104,4.59961-4.60059z"/>
+ <path d="M84.55664,73.45508c-0.01465-0.0166-0.11914,0.0542-0.23242,0.15869c-0.11328,0.10352-0.19238,0.20215-0.17773,0.21875l6.2666,6.88965l0.4873-0.44922l-6.34375-6.81787z"/>
+ <path d="M84.00879,67.03271c-0.03516,0.0376,0.01562,0.14258,0.11426,0.23486s0.20703,0.13721,0.24121,0.09961l5.99219-6.18408l-0.55566-0.52148l-5.79199,6.37109z"/>
+ <path style="&st9;" d="M14.67041,41.5249c0-1.26318-1.02539-2.28809-2.28809-2.28809c-1.26318,0-2.28809,1.0249-2.28809,2.28809c0,1.2627,1.0249,2.28809,2.28809,2.28809c1.2627,0,2.28809-1.02539,2.28809-2.28809z"/>
+ <path d="M14.04004,42.93994c-0.03516-0.04053-0.14551-0.00195-0.24609,0.08594s-0.15381,0.19141-0.11865,0.23193l1.99561,2.4917l0.56641-0.49463l-2.19727-2.31494z"/>
+ <path style="&st8;" d="M72.28125,21.96484c0-1.6001-1.29883-2.89844-2.89941-2.89844c-1.59961,0-2.89844,1.29834-2.89844,2.89844s1.29883,2.89844,2.89844,2.89844c1.60059,0,2.89941-1.29834,2.89941-2.89844z"/>
+ <path d="M72.09961,21.1416c-0.0293,0.00732-0.02539,0.13184,0.00879,0.27832s0.08691,0.25977,0.11621,0.25293l5.67578-1.26514l-0.15625-0.66699l-5.64453,1.40088z"/>
+ <path d="M68.0459,24.01025c0.04395-0.05225,0.00488-0.15723-0.08594-0.23438c-0.0918-0.07715-0.20215-0.09766-0.24609-0.04541l-4.8916,5.4707l0.6543,0.55225l4.56934-5.74316z"/>
+ <path style="&st9;" d="M86.93359,133.92529c0-1.27637-1.03516-2.31152-2.31152-2.31152c-1.27539,0-2.31152,1.03516-2.31152,2.31152c0,1.27539,1.03613,2.31055,2.31152,2.31055c1.27637,0,2.31152-1.03516,2.31152-2.31055z"/>
+ <path style="&st8;" d="M64.75195,116.64502c0-1.61719-1.3125-2.92969-2.92969-2.92969s-2.9292,1.3125-2.9292,2.92969s1.31201,2.92871,2.9292,2.92871s2.92969-1.31152,2.92969-2.92871z"/>
+ <path d="M64.53711,117.51416c-0.0332-0.01465-0.10938,0.08398-0.16895,0.21973c-0.05957,0.13672-0.08203,0.25879-0.04785,0.27344l5.17285,2.37109l0.28516-0.64941l-5.24121-2.21484z"/>
+ <path d="M60.58301,114.38135c0.02539,0.05566,0.14062,0.05957,0.25781,0.00684s0.19238-0.14062,0.16699-0.19727l-3.0293-7.21191l-0.75195,0.33594l3.35645,7.06641z"/>
+ <path style="&st8;" d="M95.60449,82.56494c0-1.62402-1.31738-2.94238-2.94238-2.94238c-1.62402,0-2.94238,1.31836-2.94238,2.94238s1.31836,2.94238,2.94238,2.94238c1.625,0,2.94238-1.31836,2.94238-2.94238z"/>
+ <path d="M93.15137,83.81689c-0.02441-0.08008-0.11621-0.12402-0.20703-0.09668c-0.08984,0.02734-0.14258,0.11426-0.11816,0.19531l0.40527,2.46875l0.94531-0.28516l-1.02539-2.28223z"/>
+ <path style="&st8;" d="M83.62988,19.44482c0-1.63818-1.3291-2.96777-2.96777-2.96777c-1.6377,0-2.96777,1.32959-2.96777,2.96777s1.33008,2.96777,2.96777,2.96777c1.63867,0,2.96777-1.32959,2.96777-2.96777z"/>
+ <path d="M82.08105,20.38965c-0.06348-0.05322-0.16797-0.0332-0.2334,0.04541c-0.06641,0.07812-0.06836,0.18457-0.00488,0.23779l1.46582,1.60498l0.60449-0.71777l-1.83203-1.17041z"/>
+ <path style="&st8;" d="M20.83447,47.64502c0-1.68506-1.36768-3.05225-3.05225-3.05225s-3.05176,1.36719-3.05176,3.05225c0,1.68457,1.36719,3.05176,3.05176,3.05176s3.05225-1.36719,3.05225-3.05176z"/>
+ <path style="&st1;" d="M19.8042,49.51807c-0.03662-0.04199-0.15088-0.00195-0.25439,0.08936c-0.104,0.09131-0.1582,0.19922-0.12109,0.24121l2.2085,2.72461l0.58838-0.51709l-2.42139-2.53809z"/>
+ <path style="&st8;" d="M110.41211,45.60498c0-1.65039-1.33984-2.98975-2.99023-2.98975c-1.64941,0-2.98926,1.33936-2.98926,2.98975c0,1.6499,1.33984,2.98926,2.98926,2.98926c1.65039,0,2.99023-1.33936,2.99023-2.98926z"/>
+ <path style="&st8;" d="M75.39551,121.20459c0-1.66309-1.35059-3.0127-3.01367-3.0127c-1.66211,0-3.0127,1.34961-3.0127,3.0127s1.35059,3.0127,3.0127,3.0127c1.66309,0,3.01367-1.34961,3.01367-3.0127z"/>
+ <path d="M73.81348,119.86377c-0.06543,0.04785-0.06543,0.1582-0.00098,0.24707c0.06543,0.08887,0.1709,0.12207,0.23633,0.07422l2.12207-1.22656l-0.54395-0.74316l-1.81348,1.64844z"/>
+ <path style="&st8;" d="M111.41406,99.96436c0-1.67285-1.3584-3.03125-3.03223-3.03125c-1.67285,0-3.03125,1.3584-3.03125,3.03125c0,1.67383,1.3584,3.03223,3.03125,3.03223c1.67383,0,3.03223-1.3584,3.03223-3.03223z"/>
+ <path d="M110.65625,101.93896c-0.01465-0.01562-0.12402,0.06152-0.24512,0.17188c-0.12109,0.11133-0.20703,0.21387-0.19238,0.22949l2.4248,2.71387l0.50586-0.46289l-2.49316-2.65234z"/>
+ <path d="M106.6582,99.12744c0.07227,0.04199,0.1748,0.00098,0.22852-0.0918c0.05469-0.09277,0.04102-0.20215-0.03027-0.24414l-2.83887-1.99805l-0.48535,0.82422l3.12598,1.50977z"/>
+ <path style="&st8;" d="M95.11914,58.9248c0-1.6875-1.36914-3.05713-3.05664-3.05713s-3.05762,1.36963-3.05762,3.05713s1.37012,3.05713,3.05762,3.05713s3.05664-1.36963,3.05664-3.05713z"/>
+ <path style="&st9;" d="M116.93457,106.56494c0-1.34277-1.08984-2.43262-2.43262-2.43262c-1.3418,0-2.43164,1.08984-2.43164,2.43262s1.08984,2.43262,2.43164,2.43262c1.34277,0,2.43262-1.08984,2.43262-2.43262z"/>
+ <path style="&st8;" d="M27.46826,77.76514c0-1.7041-1.38232-3.08691-3.08594-3.08691s-3.08643,1.38281-3.08643,3.08691c0,1.70312,1.38281,3.08594,3.08643,3.08594s3.08594-1.38281,3.08594-3.08594z"/>
+ <path d="M25.86279,75.39404c-0.03564,0.04688,0.02637,0.1543,0.13867,0.23926s0.23291,0.11621,0.26855,0.06836l4.82275-6.09912l-0.66553-0.50488l-4.56445,6.29639z"/>
+ <path d="M22.2793,79.37939c0.05762-0.03613,0.04736-0.15723-0.02344-0.26953c-0.07031-0.1123-0.1748-0.17383-0.23242-0.13672l-4.06689,2.33594l0.4585,0.72754l3.86426-2.65723z"/>
+ <path style="&st8;" d="M26.95459,54.48486c0-1.75098-1.42139-3.17188-3.17236-3.17188s-3.17188,1.4209-3.17188,3.17188s1.4209,3.17188,3.17188,3.17188s3.17236-1.4209,3.17236-3.17188z"/>
+ <path d="M25.95117,56.47363c-0.03809-0.04297-0.15625-0.00049-0.26416,0.09473c-0.10742,0.09521-0.16357,0.20752-0.12549,0.25049l4.57275,5.39355l0.61963-0.5498l-4.80273-5.18896z"/>
+ <path style="&st8;" d="M12.26025,91.56494c0-1.72168-1.39697-3.11816-3.11816-3.11816c-1.7207,0-3.11768,1.39648-3.11768,3.11816c0,1.7207,1.39697,3.11816,3.11768,3.11816c1.72119,0,3.11816-1.39746,3.11816-3.11816z"/>
+ <path d="M10.77344,89.09131c-0.0376,0.04688,0.02197,0.15723,0.13281,0.24512c0.11084,0.08887,0.23145,0.12207,0.26904,0.0752l3.16455-3.71484l-0.64795-0.51758l-2.91846,3.91211z"/>
+ <path d="M7.09814,93.03662c0.05957-0.03711,0.05176-0.1582-0.01807-0.27148c-0.06934-0.1123-0.17383-0.1748-0.2334-0.1377L4.2583,93.99365L4.70996,94.729l2.38818-1.69238z"/>
+ <path style="&st3;" d="M60.89648,103.08447c0-2.80078-2.27295-5.07422-5.07422-5.07422s-5.07471,2.27344-5.07471,5.07422c0,2.80176,2.27344,5.0752,5.07471,5.0752s5.07422-2.27344,5.07422-5.0752z"/>
+ <path d="M53.60547,99.36084c0.03174,0.0625,0.15576,0.06348,0.27637,0.00098c0.12012-0.06152,0.19238-0.16211,0.16016-0.22461l-5.39795-11.04492l-0.83105,0.4248l5.79248,10.84375z"/>
+ <path d="M53.7251,106.08252c0.05127-0.06543,0.01709-0.17871-0.07666-0.25195c-0.09375-0.07422-0.21143-0.08105-0.26318-0.01465l-3.91992,4.53125l0.77979,0.61426l3.47998-4.87891z"/>
+ <path style="&st3;" d="M65.5957,32.64502c0-2.81201-2.28125-5.09424-5.09375-5.09424c-2.81152,0-5.09375,2.28223-5.09375,5.09424c0,2.81152,2.28223,5.09375,5.09375,5.09375c2.8125,0,5.09375-2.28223,5.09375-5.09375z"/>
+ <path d="M57.31836,35.60352c0.05566-0.0459,0.03076-0.16748-0.05566-0.27051c-0.08594-0.10303-0.20068-0.14941-0.25635-0.10303l-9.36182,7.51514L48.25,43.4707l9.06836-7.86719z"/>
+ <path d="M59.23535,29.1123c0.02197,0.0791,0.13525,0.1167,0.25293,0.08398c0.11719-0.03271,0.19482-0.12402,0.17236-0.20312l-1.22705-5.38574l-0.94336,0.26465l1.74512,5.24023z"/>
+ <path style="&st9;" d="M87.14648,22.80469c0-1.39307-1.13086-2.52393-2.52441-2.52393c-1.39258,0-2.52344,1.13086-2.52344,2.52393c0,1.39355,1.13086,2.52393,2.52344,2.52393c1.39355,0,2.52441-1.13037,2.52441-2.52393z"/>
+ <path style="&st9;" d="M79.72754,117.60498c0-1.40527-1.14062-2.54492-2.54492-2.54492c-1.40527,0-2.54492,1.13965-2.54492,2.54492c0,1.4043,1.13965,2.54492,2.54492,2.54492c1.4043,0,2.54492-1.14062,2.54492-2.54492z"/>
+ <path style="&st9;" d="M35.35547,114.96436c0-1.41992-1.15283-2.57227-2.57324-2.57227s-2.57324,1.15234-2.57324,2.57227c0,1.4209,1.15283,2.57324,2.57324,2.57324s2.57324-1.15234,2.57324-2.57324z"/>
+ <path d="M34.12598,115.25146c-0.08643-0.03027-0.18604,0.02734-0.22217,0.12891c-0.03613,0.10254,0.00488,0.20996,0.09131,0.24023l1.45068,0.85547l0.34619-0.97559l-1.66602-0.24902z"/>
+ <path style="&st8;" d="M97.47168,87.60498c0-1.79395-1.45508-3.25-3.24902-3.25s-3.25,1.45605-3.25,3.25s1.45605,3.25,3.25,3.25c1.79395-0.00098,3.24902-1.45605,3.24902-3.25z"/>
+ <path d="M96.51758,89.7417c-0.01562-0.01758-0.13379,0.06543-0.2627,0.18457c-0.12891,0.11816-0.2207,0.22852-0.20508,0.24609l3.46973,3.84375l0.54199-0.49805l-3.54395-3.77637z"/>
+ <path d="M92.25293,86.81396c0.0791,0.04297,0.1875-0.00391,0.24219-0.10352c0.05469-0.10059,0.03516-0.2168-0.04297-0.25977l-1.58105-1.20605l-0.48535,0.88379l1.86719,0.68555z"/>
+ <path style="&st9;" d="M5.24561,95.5249c0-1.42578-1.15723-2.58301-2.5835-2.58301c-1.42578,0-2.58301,1.15723-2.58301,2.58301s1.15723,2.58301,2.58301,2.58301c1.42627,0,2.5835-1.15723,2.5835-2.58301z"/>
+ <path style="&st8;" d="M19.12451,83.16455c0-1.80078-1.46143-3.26172-3.26221-3.26172s-3.26221,1.46094-3.26221,3.26172s1.46143,3.2627,3.26221,3.2627s3.26221-1.46191,3.26221-3.2627z"/>
+ <path style="&st3;" d="M38.89893,65.64502c0-2.9126-2.36377-5.27686-5.27686-5.27686c-2.9126,0-5.27637,2.36426-5.27637,5.27686s2.36377,5.27637,5.27637,5.27637c2.91309,0,5.27686-2.36377,5.27686-5.27637z"/>
+ <path d="M36.62598,69.51123c-0.03027-0.04443-0.16064-0.00977-0.29248,0.07764c-0.13135,0.0874-0.21387,0.19482-0.18408,0.23975l7.32324,11.26367l0.72119-0.48047l-7.56787-11.10059z"/>
+ <path d="M35.7998,61.1416c-0.02783,0.05029,0.05908,0.15234,0.19385,0.22852c0.13525,0.07617,0.26807,0.09717,0.2959,0.04736l6.67822-11.53174l-0.76807-0.43262L35.7998,61.1416z"/>
+ <path style="&st8;" d="M105.31738,96.12451c0-1.81836-1.47656-3.29395-3.29492-3.29395s-3.29492,1.47559-3.29492,3.29395c0,1.81934,1.47656,3.29492,3.29492,3.29492s3.29492-1.47559,3.29492-3.29492z"/>
+ <path d="M102.56934,97.44092c-0.02734-0.09082-0.13086-0.14062-0.23047-0.11035c-0.10059,0.0293-0.16016,0.12793-0.13281,0.21777l0.03711,1.34473l1.03125-0.30762l-0.70508-1.14453z"/>
+ <path style="&st8;" d="M110.38477,43.08496c0-1.83398-1.48828-3.32227-3.32227-3.32227s-3.32227,1.48828-3.32227,3.32227c0,1.8335,1.48828,3.32227,3.32227,3.32227s3.32227-1.48877,3.32227-3.32227z"/>
+ <path d="M109.02051,40.78271c-0.04199,0.04297,0.01367,0.16553,0.125,0.27393c0.11035,0.10791,0.23438,0.16064,0.27637,0.11768l2.10449-1.94092l-0.6123-0.59961l-1.89355,2.14893z"/>
+ <path d="M104.98828,44.84521c0.06641-0.04395,0.05957-0.17139-0.01562-0.28467s-0.18945-0.16943-0.25586-0.12549l-3.4541,2.01025l0.52637,0.79541l3.19922-2.39551z"/>
+ <path style="&st8;" d="M95.09082,56.16504c0-1.87109-1.51758-3.38916-3.38867-3.38916c-1.87012,0-3.38867,1.51807-3.38867,3.38916c0,1.87061,1.51855,3.38867,3.38867,3.38867c1.87109,0,3.38867-1.51807,3.38867-3.38867z"/>
+ <path d="M93.60547,53.72705c-0.04199,0.04395,0.01465,0.16895,0.12793,0.2793c0.11328,0.10986,0.24023,0.16309,0.2832,0.11914l3.22949-3.10693l-0.63184-0.61377l-3.00879,3.32227z"/>
+ <path d="M89.49902,57.80322c0.07031-0.04395,0.06738-0.17334-0.00488-0.28906c-0.07324-0.11572-0.18945-0.17383-0.25879-0.12988l-2.12793,1.05859l0.51562,0.81982l1.87598-1.45947z"/>
+ <path style="&st9;" d="M115.6582,37.20459c0-1.49902-1.2168-2.71582-2.71582-2.71582s-2.71582,1.2168-2.71582,2.71582c0,1.49951,1.2168,2.71582,2.71582,2.71582s2.71582-1.21631,2.71582-2.71582z"/>
+ <path style="&st9;" d="M91.92383,84.96436c0-1.5127-1.22852-2.74121-2.74121-2.74121c-1.51367,0-2.74219,1.22852-2.74219,2.74121c0,1.51367,1.22852,2.74219,2.74219,2.74219c1.5127,0,2.74121-1.22852,2.74121-2.74219z"/>
+ <path style="&st8;" d="M40.81055,116.64502c0-1.91504-1.55371-3.46875-3.46826-3.46875s-3.46826,1.55371-3.46826,3.46875c0,1.91406,1.55371,3.46777,3.46826,3.46777s3.46826-1.55371,3.46826-3.46777z"/>
+ <path d="M40.43652,115.104c-0.02148,0.00781,0.01318,0.1582,0.07764,0.33496c0.06445,0.17773,0.13428,0.31543,0.15576,0.30762l4.53174-1.59375l-0.26709-0.7334l-4.49805,1.68457z"/>
+ <path d="M35.93115,118.5415c0.06104-0.07031,0.03271-0.19531-0.06348-0.2793c-0.0957-0.08496-0.22363-0.09668-0.28467-0.02734l-2.31934,2.18652l0.7959,0.7002l1.87158-2.58008z"/>
+ <path style="&st8;" d="M60.83105,21.24463c0-1.96973-1.59912-3.56787-3.56885-3.56787s-3.56836,1.59814-3.56836,3.56787s1.59863,3.56836,3.56836,3.56836s3.56885-1.59863,3.56885-3.56836z"/>
+ <path style="&st1;" d="M56.28857,18.94678c0.02832,0.08887,0.15088,0.12891,0.27441,0.08984s0.20068-0.14307,0.17236-0.23193l-0.29102-1.88672l-1.00586,0.32031l0.8501,1.7085z"/>
+ <path style="&st8;" d="M51.8916,112.56494c0-1.9375-1.57227-3.50879-3.50928-3.50879s-3.50928,1.57129-3.50928,3.50879c0,1.93652,1.57227,3.50879,3.50928,3.50879s3.50928-1.57227,3.50928-3.50879z"/>
+ <path d="M50.04199,113.08154c-0.09229-0.03809-0.20264,0.01855-0.24658,0.125c-0.04346,0.10742-0.00439,0.22461,0.08789,0.2627l1.98291,1.19922l0.43115-1.05469l-2.25537-0.53223z"/>
+ <path style="&st9;" d="M17.08887,80.88525c0-1.53906-1.24854-2.78711-2.78662-2.78711s-2.78662,1.24805-2.78662,2.78711c0,1.53809,1.24854,2.78613,2.78662,2.78613s2.78662-1.24805,2.78662-2.78613z"/>
+ <path style="&st8;" d="M102.66309,48.36475c0-1.94336-1.57715-3.52051-3.52051-3.52051s-3.52051,1.57715-3.52051,3.52051s1.57715,3.521,3.52051,3.521s3.52051-1.57764,3.52051-3.521z"/>
+ <path style="&st5;" d="M51.19336,84.60498c0-2.67773-2.17334-4.85156-4.85107-4.85156s-4.85107,2.17383-4.85107,4.85156s2.17334,4.85059,4.85107,4.85059s4.85107-2.17285,4.85107-4.85059z"/>
+ <path style="&st9;" d="M105.90332,99.84521c0-1.54688-1.25488-2.80078-2.80078-2.80078s-2.80078,1.25391-2.80078,2.80078c0,1.5459,1.25488,2.80078,2.80078,2.80078s2.80078-1.25488,2.80078-2.80078z"/>
+ <path style="&st9;" d="M88.27539,60.00488c0-1.55322-1.25977-2.81348-2.81348-2.81348c-1.55273,0-2.81348,1.26025-2.81348,2.81348c0,1.55273,1.26074,2.81348,2.81348,2.81348c1.55371,0,2.81348-1.26074,2.81348-2.81348z"/>
+ <path style="&st5;" d="M49.66162,45.72461c0-2.69336-2.18604-4.87939-4.87939-4.87939s-4.87939,2.18604-4.87939,4.87939c0,2.69385,2.18604,4.87988,4.87939,4.87988s4.87939-2.18604,4.87939-4.87988z"/>
+ <path style="&st9;" d="M26.45752,125.64502c0-1.60938-1.30615-2.91504-2.91504-2.91504c-1.60938,0-2.91553,1.30566-2.91553,2.91504s1.30615,2.91504,2.91553,2.91504c1.60889,0,2.91504-1.30566,2.91504-2.91504z"/>
+ <path d="M26.06885,124.36475c-0.02539,0.00879,0.00781,0.16797,0.07324,0.35449c0.06543,0.1875,0.13916,0.33301,0.16406,0.32422l2.37109-0.77148l-0.27344-0.7832l-2.33496,0.87598z"/>
+ <path style="&st8;" d="M58.88086,14.64502c0-2.08594-1.69287-3.77881-3.77832-3.77881c-2.08594,0-3.77881,1.69287-3.77881,3.77881c0,2.08545,1.69287,3.77832,3.77881,3.77832c2.08545,0,3.77832-1.69287,3.77832-3.77832z"/>
+ <path d="M54.13379,12.19873c0.02979,0.09424,0.16016,0.13721,0.29053,0.0957c0.13037-0.04102,0.21191-0.15137,0.18164-0.24561l-0.12354-1.40381l-1.05518,0.33447l0.70654,1.21924z"/>
+ <path style="&st8;" d="M35.77246,122.64502c0-2.04785-1.66211-3.70996-3.70996-3.70996c-2.04834,0-3.71045,1.66211-3.71045,3.70996s1.66211,3.70996,3.71045,3.70996c2.04785,0,3.70996-1.66211,3.70996-3.70996z"/>
+ <path d="M33.83447,123.15283c-0.09814-0.03809-0.21338,0.02344-0.25781,0.1377s-0.00049,0.2373,0.09766,0.27539l1.80908,1.10547l0.43311-1.11523l-2.08203-0.40332z"/>
+ <path style="&st9;" d="M101.77441,46.56494c0-1.65186-1.34082-2.99219-2.99219-2.99219s-2.99219,1.34033-2.99219,2.99219c0,1.65137,1.34082,2.9917,2.99219,2.9917s2.99219-1.34033,2.99219-2.9917z"/>
+ <path style="&st8;" d="M57.5791,114.84521c0-2.09668-1.70117-3.79688-3.79688-3.79688s-3.79688,1.7002-3.79688,3.79688c0,2.0957,1.70117,3.79688,3.79688,3.79688s3.79688-1.70117,3.79688-3.79688z"/>
+ <path d="M57.23242,113.26318c-0.03027,0.01074,0.00049,0.1748,0.06836,0.36523c0.06738,0.19043,0.14697,0.33594,0.17725,0.3252l2.18604-0.70605l-0.29102-0.81738l-2.14062,0.83301z"/>
+ <path d="M52.31934,116.99463c0.06641-0.07617,0.03467-0.21289-0.0708-0.30469c-0.10547-0.09277-0.24512-0.10449-0.31201-0.02832l-2.03076,1.84375l0.86865,0.75684l1.54492-2.26758z"/>
+ <path style="&st9;" d="M65.3457,111.84521c0-1.68066-1.36328-3.04395-3.04297-3.04395c-1.68066,0-3.04395,1.36328-3.04395,3.04395c0,1.67969,1.36328,3.04297,3.04395,3.04297c1.67969,0,3.04297-1.36328,3.04297-3.04297z"/>
+ <path style="&st9;" d="M56.37695,8.76465c0-1.69678-1.37744-3.07422-3.07471-3.07422s-3.07471,1.37744-3.07471,3.07422c0,1.69727,1.37744,3.07471,3.07471,3.07471s3.07471-1.37744,3.07471-3.07471z"/>
+ <path style="&st8;" d="M41.57275,124.80518c0-2.20312-1.7876-3.99023-3.99023-3.99023s-3.99072,1.78711-3.99072,3.99023c0,2.20215,1.78809,3.99023,3.99072,3.99023s3.99023-1.78809,3.99023-3.99023z"/>
+ <path d="M41.16113,123.15869c-0.02637,0.00879,0.01074,0.18164,0.08301,0.38477c0.07227,0.2041,0.15234,0.36133,0.17871,0.35254l3.51953-1.18652l-0.30127-0.84863l-3.47998,1.29785z"/>
+ <path d="M35.95752,127.05322c0.07178-0.0791,0.04053-0.22363-0.06885-0.32129c-0.10938-0.09863-0.25586-0.11328-0.32715-0.0332l-1.09717,0.72852l0.88818,0.79688l0.60498-1.1709z"/>
+ <path style="&st8;" d="M52.53418,120.96436c0-2.22559-1.80615-4.03125-4.03174-4.03125c-2.22607,0-4.03223,1.80566-4.03223,4.03125c0,2.22656,1.80615,4.03223,4.03223,4.03223c2.22559,0,4.03174-1.80566,4.03174-4.03223z"/>
+ <path d="M50.55957,121.4585c-0.10693-0.04004-0.23145,0.02832-0.27832,0.15332c-0.04688,0.12402,0.00195,0.25781,0.10889,0.29785l0.71191,0.68848l0.44629-1.18945l-0.98877,0.0498z"/>
+ <path style="&st9;" d="M36.68945,129.48486c0-1.8252-1.48145-3.30762-3.30713-3.30762s-3.30713,1.48242-3.30713,3.30762s1.48145,3.30762,3.30713,3.30762s3.30713-1.48242,3.30713-3.30762z"/>
+ <path style="&st9;" d="M56.18604,122.5249c0-1.85742-1.50684-3.36426-3.36377-3.36426s-3.36377,1.50684-3.36377,3.36426c0,1.85645,1.50684,3.36426,3.36377,3.36426s3.36377-1.50781,3.36377-3.36426z"/>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
+
diff --git a/ksvg/test/colortest.svg b/ksvg/test/colortest.svg
new file mode 100644
index 00000000..a237e591
--- /dev/null
+++ b/ksvg/test/colortest.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN"
+ "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="8cm" height="3cm" viewBox="0 0 800 300">
+ <rect x="1" y="1" width="798" height="298"
+ fill="none" stroke="blue" stroke-width="2" />
+ <rect id="RectElement" x="300" y="100" width="300" height="100"
+ fill="rgb(0,0,255)" stroke="rgb(128,0,0)" stroke-width="0.7cm">
+
+ <animateColor attributeName="fill" attributeType="CSS"
+ from="rgb(0,0,255)" to="rgb(128,0,0)"
+ begin="1s" dur="6s" fill="freeze" />
+ <animateColor attributeName="stroke" attributeType="CSS"
+ from="rgb(128,0,0)" to="rgb(0,0,255)"
+ begin="1s" dur="6s" fill="freeze" />
+
+ </rect>
+</svg>
diff --git a/ksvg/test/dashes.svg b/ksvg/test/dashes.svg
new file mode 100644
index 00000000..f11c043e
--- /dev/null
+++ b/ksvg/test/dashes.svg
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="525" height="500" >
+<text x="5" y="20" style="font-size:22">Stroke Option: line dashing</text>
+ <g style="shape-rendering:default; stroke-width:14; stroke:#0000FF" >
+ <path d="M50, 50h200" style="stroke-linecap:round; stroke-dasharray:30 30" />
+ <path d="M50,100h200" style="stroke-linecap:square; stroke-dasharray:30 30" />
+ <path d="M50,150h200" style="stroke-linecap:butt; stroke-dasharray:30 30" />
+ <path d="M50,200h200" style="stroke-linecap:butt; stroke-dasharray:30 5" />
+ <path d="M50,250h200" style="stroke-linecap:butt; stroke-dasharray:5 5" />
+ <path d="M50,300h200" style="stroke-linecap:butt; stroke-dasharray:15 15" />
+ <path d="M50,350h200" style="stroke-linecap:butt; stroke-dasharray:10 15" />
+ <path d="M50,400h200" style="stroke-linecap:butt; stroke-dasharray:20 5 10 5" />
+ </g>
+
+ <g style="shape-rendering:default; stroke-width:6; stroke:#008000" >
+ <path d="M300, 50h200" style="stroke-linecap:round; stroke-dasharray:30 20 15 20" />
+ <path d="M300,100h200" style="stroke-linecap:square; stroke-dasharray:30 20 15 20" />
+ <path d="M300,150h200" style="stroke-linecap:butt; stroke-dasharray:10 5 20 5" />
+ <path d="M300,200h200" style="stroke-linecap:butt; stroke-dasharray:40 5 25 5" />
+ <path d="M300,250h200" style="stroke-linecap:butt; stroke-dasharray:5 5" />
+ <path d="M300,300h200" style="stroke-linecap:butt; stroke-dasharray:15 15" />
+ <path d="M300,350h200" style="stroke-linecap:butt; stroke-dasharray:10 15" />
+ <path d="M300,400h200" style="stroke-linecap:butt; stroke-dasharray:20 5 10 5" />
+ </g>
+</svg>
+
+
+
+
+
+
diff --git a/ksvg/test/ecma/bbox/bbox-circle.svg b/ksvg/test/ecma/bbox/bbox-circle.svg
new file mode 100644
index 00000000..10ff5e3c
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-circle.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 6)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <circle id="test-0" cx="100" cy="140" r="50" fill="none" stroke="black" />
+ <circle id="test-1" cx="220" cy="140" r="35" fill="red" stroke="black" />
+ <circle id="test-2" cx="340" cy="140" r="20" fill="black" stroke="lime" stroke-width="4" />
+ <circle id="test-3" cx="100" cy="260" r="20" stroke="lime" fill="yellow" stroke-width="4" />
+ <circle id="test-4" cx="220" cy="260" r="35" stroke="none" fill="blue" />
+ <circle id="test-5" cx="340" cy="260" r="50" stroke="red" fill="none" stroke-width="10" />
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-ellipse.svg b/ksvg/test/ecma/bbox/bbox-ellipse.svg
new file mode 100644
index 00000000..0fccee5b
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-ellipse.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 7)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <ellipse id="test-0" fill="none" stroke="#000000" cx="50" cy="135" rx="30" ry="50"/>
+ <ellipse id="test-1" fill="red" cx="160" cy="135" rx="30" ry="50"/>
+ <ellipse id="test-2" fill="none" stroke="#000000" cx="270" cy="140" rx="35" ry="35"/>
+ <ellipse id="test-3" fill="red" cx="370" cy="140" rx="35" ry="35"/>
+ <ellipse id="test-4" fill="none" stroke="#0000FF" stroke-width="8" cx="50" cy="310" rx="30" ry="50"/>
+ <ellipse id="test-5" fill="#00FF00" stroke="#0000FF" stroke-width="8" cx="160" cy="310" rx="30" ry="50"/>
+ <ellipse id="test-6" fill="#00FF00" stroke="#0000FF" stroke-width="8" cx="330" cy="310" rx="70" ry="40"/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-line.svg b/ksvg/test/ecma/bbox/bbox-line.svg
new file mode 100644
index 00000000..b9caf551
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-line.svg
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 4)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <g id="test-0" transform="translate(0,20)">
+ <line x1="37.5" y1="137" x2="112.5" y2="50" fill="none" stroke="black" stroke-width="1" />
+ <line x1="112.5" y1="137" x2="187.5" y2="50" fill="none" stroke="red" stroke-width="5" />
+ <line x1="187.5" y1="137" x2="262.5" y2="50" fill="none" stroke="green" stroke-width="7.5" />
+ <line x1="262.5" y1="137" x2="337.5" y2="50" fill="none" stroke="blue" stroke-width="10" />
+ <line x1="337.5" y1="137" x2="412.5" y2="50" fill="none" stroke="fuchsia" stroke-width="12.5" />
+ </g>
+ <g id="test-1" stroke="black" stroke-width="1" transform="translate(0,20)">
+ <line x1="125" y1="200" x2="175" y2="200"/>
+ <line x1="175" y1="200" x2="175" y2="250"/>
+ <line x1="175" y1="250" x2="225" y2="250"/>
+ <line x1="225" y1="250" x2="225" y2="200"/>
+ <line x1="225" y1="200" x2="275" y2="200"/>
+ </g>
+ <g id="test-2" stroke="blue" stroke-width="10" transform="translate(0,20)">
+ <line x1="25" y1="300" x2="75" y2="300"/>
+ <line x1="75" y1="300" x2="75" y2="350"/>
+ <line x1="75" y1="350" x2="125" y2="350"/>
+ <line x1="125" y1="350" x2="125" y2="300"/>
+ <line x1="125" y1="300" x2="175" y2="300"/>
+ </g>
+ <g id="test-3" stroke-width="10" transform="translate(0,20)">
+ <line x1="275" y1="350" x2="325" y2="350" stroke="black" />
+ <line x1="325" y1="300" x2="375" y2="300" stroke="fuchsia" />
+ <line x1="225" y1="300" x2="275" y2="300" stroke="blue" />
+ <line x1="275" y1="300" x2="275" y2="350" stroke="green" />
+ <line x1="325" y1="350" x2="325" y2="300" stroke="red" />
+ </g>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-path.svg b/ksvg/test/ecma/bbox/bbox-path.svg
new file mode 100644
index 00000000..bdfd24fe
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-path.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 8)">
+ <script xlink:href="bbox.js"/>
+ <g transform="translate(0,50)">
+ <path id="test-0" fill="#FF0000" stroke="#00C000" d=" M 250 130 C 185 130 150 80 150 80 S 115 25 50 25 m 0 105 c 65 0 100 -50 100 -50 s 35 -55 100 -55 "/>
+ <path id="test-1" fill="none" stroke="#000000" d=" M 300 90 c 0 30 7 50 50 0 c 43 -50 50 -30 50 0 c 0 83 -68 -34 -90 -30 C 300 60 300 90 300 90 z "/>
+ <path id="test-2" fill="none" stroke="#000000" d=" M 100 170 C 120 170 180 170 200 170 Z "/>
+ <path id="test-3" fill="#00C000" stroke="none" d=" M 25 360 C 60 360 80 275 75 260 c -5 15 15 100 50 100 Z "/>
+ <path id="test-4" fill="none" stroke="#000000" d=" m 200 300 c 50 -40 50 -100 25 -100 s -25 60 25 100 "/>
+ <path id="test-5" fill="#0000FF" stroke="#000000" d=" M 320 160 C 380 150 420 190 410 250 "/>
+ <path id="test-6" fill="#FFFF00" stroke="#000000" d=" M 360 280 c 0 20 -16 36 -36 36 s -36 -16 -36 -36 s 16 -36 36 -36 s 36 16 36 36 z "/>
+ <path id="test-7" fill="#F0F0F0" stroke="#FF0000" d=" m 340 425 c -40 -60 95 -100 80 0 z "/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-path2.svg b/ksvg/test/ecma/bbox/bbox-path2.svg
new file mode 100644
index 00000000..988641a1
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-path2.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="480" onload="gen_buttons(evt, 7)">
+ <script xlink:href="bbox.js"/>
+ <g transform="translate(0,70)">
+ <path id="test-0" fill="none" stroke="#0000FF" stroke-width="3" d=" M 15 20 Q 30 120 130 30 M 180 80 q -75 -100 -163 -60 z "/>
+ <path id="test-1" fill="#FFFF00" stroke="#CF0000" d=" m 350 130 q -100 -80 50 -120 z m 70 0 q 50 -150 -80 -90 Z "/>
+ <path id="test-2" fill="none" stroke="#00FFFF" d=" M 215 115 Q 225 0 295 45 Z "/>
+ <path id="test-3" fill="#00C000" stroke="#000000" d=" M 200 200 Q 250 300 300 200 T 250 150 Q 120 120 200 200 z "/>
+ <path id="test-4" fill="#CF0000" stroke="none" d=" M 60 100 Q -40 150 60 200 Q 160 150 60 100 z "/>
+ <path id="test-5" fill="none" stroke="#FF0000" d=" M 15 320 q 25 -100 50 0 t 50 0 t 50 0 t 50 0 t 50 0 z "/>
+ <path id="test-6" fill="#0000C0" stroke="#00CF00" stroke-width="2" d=" M 350 300 q -100 50 0 50 Q 250 350 350 400 q 100 -50 0 -50 Q 450 350 350 300 z "/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-polygon.svg b/ksvg/test/ecma/bbox/bbox-polygon.svg
new file mode 100644
index 00000000..025bdeb5
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-polygon.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 6)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <polygon id="test-0" fill="none" stroke="#000000" points="59,75,95,93,108,135,82,169,39,170,11,137,19,95"/>
+ <polygon id="test-1" fill="red" points="179,75,218,93,228,135,202,169,159,170,131,137,139,95,179,75"/>
+ <polygon id="test-2" fill="blue" stroke="black" stroke-width="6" points="350,75 375,110 410,125 375,140 350,175 325,150 290,125 325,100,350,75"/>
+ <polygon id="test-3" fill="none" stroke="#0000FF" stroke-width="8" points="59,225,98,243,108,285,82,319,39,320,11,287,19,245,59,225"/>
+ <polygon id="test-4" fill="#00FF00" stroke="#0000FF" stroke-width="8" points="179,225,218,243,228,285,202,319,159,320,131,287,139,245"/>
+ <polygon id="test-5" fill="none" stroke="#00FF00" stroke-width="8" points="270,265 300,285 320,265 340,285 280,320 390,320 420,280 280,225"/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-polyline.svg b/ksvg/test/ecma/bbox/bbox-polyline.svg
new file mode 100644
index 00000000..c60321da
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-polyline.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 6)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <polyline id="test-0" fill="none" stroke="#000000" points="10,80,35,180,60,80,85,180,110,80,135,180"/>
+ <polyline id="test-1" fill="none" stroke="blue" stroke-width="8" points="220,80,267,114,249,170,190,170,172,114,220,80"/>
+ <polyline id="test-2" fill="blue" stroke="#00FF00" stroke-width="4" points="310,80,335,180,360,80,385,180,410,80,435,180"/>
+ <polyline id="test-3" fill="none" stroke="red" stroke-width="8" points="59,225,98,243,108,285,82,319,39,320,11,287,19,245"/>
+ <polyline id="test-4" fill="#00FF00" stroke="#0000FF" stroke-width="8" points="189,225,228,243,238,285,212,319,169,320,141,287,149,245"/>
+ <polyline id="test-5" fill="#FF00FF" stroke="none" stroke-width="8" points="270,265 300,285 320,265 340,285 280,320 390,320 420,280 280,225"/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox-rect.svg b/ksvg/test/ecma/bbox/bbox-rect.svg
new file mode 100644
index 00000000..b35285ec
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox-rect.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg id="svg-root" width="450" height="450" onload="gen_buttons(evt, 8)">
+ <script xlink:href="bbox.js"/>
+ <g>
+ <rect id="test-0" fill="none" stroke="#000000" x="30" y="86" width="50" height="100"/>
+ <rect id="test-1" fill="red" x="130" y="86" width="50" height="100"/>
+ <rect id="test-2" fill="none" stroke="#000000" x="250" y="86" width="50" height="100" rx="30"/>
+ <rect id="test-3" fill="red" x="350" y="86" width="50" height="100" rx="30"/>
+ <rect id="test-4" fill="none" stroke="#0000FF" stroke-width="8" x="30" y="266" width="50" height="100"/>
+ <rect id="test-5" fill="#00FF00" stroke="#0000FF" stroke-width="8" x="130" y="266" width="50" height="100"/>
+ <rect id="test-6" fill="none" stroke="#0000FF" stroke-width="8" x="250" y="266" width="50" height="100" rx="30" ry="50"/>
+ <rect id="test-7" fill="#00FF00" x="350" y="266" width="50" height="100" rx="30" ry="50"/>
+ </g>
+</svg>
diff --git a/ksvg/test/ecma/bbox/bbox.js b/ksvg/test/ecma/bbox/bbox.js
new file mode 100644
index 00000000..2d692694
--- /dev/null
+++ b/ksvg/test/ecma/bbox/bbox.js
@@ -0,0 +1,103 @@
+function clear_test(evt, number)
+{
+ for(var i = 0; i < number; i++)
+ {
+ var element = evt.target.getOwnerDocument().getElementById("bbox" + (i + 1));
+ element.getParentNode().removeChild(element);
+ }
+}
+
+function bbox_loop(drawit, number)
+{
+ var doc = evt.target.getOwnerDocument();
+
+ for(var i = 0; i < number; i++)
+ {
+ var shape = doc.getElementById("test-" + i);
+ var bbox = shape.getBBox();
+
+ if(drawit == "true")
+ {
+ draw_it(doc, bbox, shape, i + 1);
+ }
+ else
+ {
+ do_string(bbox, i + 1);
+ }
+ }
+}
+
+function do_string(shape, number)
+{
+ var string = "\nShape " + number + "\nX = " + shape.x + "\nY = " + shape.y + "\nW = " + shape.width + "\nH = " + shape.height;
+ alert(string);
+}
+
+function draw_it(doc, bbox, shape, number)
+{
+ var element = doc.createElement("rect");
+ element.setAttribute("x", bbox.x);
+ element.setAttribute("y", bbox.y);
+ element.setAttribute("width", bbox.width);
+ element.setAttribute("height", bbox.height);
+ element.setAttribute("fill", "none");
+ element.setAttribute("stroke", "red");
+ element.setAttribute("stroke-width", "3");
+ element.setAttribute("id", "bbox" + number);
+
+ shape.getParentNode().appendChild(element);
+}
+
+function gen_buttons(evt, number)
+{
+ var doc = evt.target.getOwnerDocument();
+ var main = doc.getElementById("svg-root");
+
+ var aone = doc.createElement("a");
+ var atwo = doc.createElement("a");
+ var athree = doc.createElement("a");
+
+ var rect = doc.createElement("rect");
+ var text = doc.createElement("text");
+
+ aone.setAttribute("onclick", "bbox_loop('false'," + number + ")");
+
+ atwo.setAttribute("onclick", "bbox_loop('true'," + number + ")");
+ atwo.setAttribute("transform", "translate(0,22)");
+
+ athree.setAttribute("onclick", "clear_test(evt," + number + ")");
+ athree.setAttribute("transform", "translate(0,44)");
+
+ rect.setAttribute("x", "0");
+ rect.setAttribute("y", "0");
+ rect.setAttribute("width", "110");
+ rect.setAttribute("height", "20");
+
+ text.setAttribute("x", "0");
+ text.setAttribute("y", "15");
+ text.setAttribute("fill", "white");
+
+ // First button
+ aone.appendChild(rect.cloneNode(1));
+ var aonetext = text.cloneNode(1);
+ aonetext.appendChild(doc.createTextNode("Calculate bbox"));
+ aone.appendChild(aonetext);
+
+ main.appendChild(aone);
+
+ // Second button
+ atwo.appendChild(rect.cloneNode(1));
+ var atwotext = text.cloneNode(1);
+ atwotext.appendChild(doc.createTextNode("Draw bbox"));
+ atwo.appendChild(atwotext);
+
+ main.appendChild(atwo);
+
+ // Third button
+ athree.appendChild(rect.cloneNode(1));
+ var athreetext = text.cloneNode(1);
+ athreetext.appendChild(doc.createTextNode("Clear bbox drawing"));
+ athree.appendChild(athreetext);
+
+ main.appendChild(athree);
+}
diff --git a/ksvg/test/ecma/broken.svg b/ksvg/test/ecma/broken.svg
new file mode 100644
index 00000000..82eb021e
--- /dev/null
+++ b/ksvg/test/ecma/broken.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN"
+ "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="6cm" height="5cm" viewBox="0 0 600 500">
+ <desc>Example script01 - invoke an ECMAScript function from an onclick event
+ </desc>
+ <!-- ECMAScript to change the radius with each click -->
+ <script type="text/ecmascript"> <![CDATA[
+ function circle_click(evt) {
+ var circle = evt.target;
+ var currentRadius = circle.r.baseVal.value;
+ if (currentRadius == 100)
+ circle.r.baseVal.value = currentRadius*2;
+ else
+ circle.r.baseVal.value = currentRadius*0.5;
+ }
+ ]]> </script>
+
+ <!-- Outline the drawing area with a blue line -->
+ <rect x="1" y="1" width="598" height="498" fill="none" stroke="blue"/>
+
+ <!-- Act on each click event -->
+ <circle onclick="circle_click(evt)" cx="300" cy="225" r="100"
+ fill="red"/>
+
+ <text x="300" y="480"
+ font-family="Verdana" font-size="35" text-anchor="middle">
+ Click on circle to change its size
+ </text>
+</svg>
diff --git a/ksvg/test/ecma/circle.svg b/ksvg/test/ecma/circle.svg
new file mode 100644
index 00000000..e9b198c3
--- /dev/null
+++ b/ksvg/test/ecma/circle.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="6cm" height="5cm" viewBox="0 0 600 500" onload="foobar(evt)">
+ <script type="text/ecmascript"> <![CDATA[
+ function foobar(evt)
+ {
+ var circle = evt.getTarget().ownerDocument.getElementById('moo');
+
+ var id = circle.id; // Should call SVGElementImpl::getValueProperty
+
+ var name = circle; // Should call toString()
+
+ var nodeName = circle.nodeName;
+
+ var prop = circle.cx; // Should call SVGCircleElementImpl::getValueProperty
+
+ alert('NODENAME: ' + nodeName + '\nID: ' + id + '\nNAME: ' + name + '\nPROP: ' + prop.baseVal.value);
+ }
+
+ function click(evt)
+ {
+ var circle = evt.target;
+
+ var id = circle.id; // Should call SVGElementImpl::getValueProperty
+
+ var name = circle; // Should call toString()
+
+ var nodeName = circle.nodeName;
+
+ var prop = circle.cx; // Should call SVGCircleElementImpl::getValueProperty
+
+ alert('NODENAME: ' + nodeName + '\nID: ' + id + '\nNAME: ' + name + '\nPROP: ' + prop.baseVal.value);
+ }
+
+ ]]> </script>
+
+ <circle id="moo" onclick="click(evt)" cx="300" cy="225" r="100" fill="red"/>
+</svg>
diff --git a/ksvg/test/ecma/clock.svg b/ksvg/test/ecma/clock.svg
new file mode 100644
index 00000000..906f1303
--- /dev/null
+++ b/ksvg/test/ecma/clock.svg
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="200px" height="280px">
+ <g transform="translate(100,100) rotate(-90)">
+ <circle r="100" fill="white" strok="black" stroke-width="2px"/>
+
+ <g style="stroke-linecap: round; stroke: black; stroke-width: 2px;">
+ <line x1="100" y1="0" x2="90" y2="0" />
+ <line x1="87" y1="50" x2="78" y2="45" />
+ <line x1="50" y1="87" x2="45" y2="78" />
+ <line x1="0" y1="100" x2="0" y2="90" />
+ <line x1="-50" y1="87" x2="-45" y2="78" />
+ <line x1="-87" y1="50" x2="-78" y2="45" />
+ <line x1="-100" y1="0" x2="-90" y2="0" />
+ <line x1="-87" y1="-50" x2="-78" y2="-45"/>
+ <line x1="-50" y1="-87" x2="-45" y2="-78"/>
+ <line x1="0" y1="-100" x2="0" y2="-90"/>
+ <line x1="50" y1="-87" x2="45" y2="-78"/>
+ <line x1="87" y1="-50" x2="78" y2="-45"/>
+ <line id="hourhand" stroke-width="8px" stroke="blue" x1="0" y1="0" x2="0" y2="40"/>
+ <line id="minutehand" stroke-width="5px" stroke="green" x1="0" y1="0" x2="0" y2="65"/>
+ <line id="secondhand" stroke-width="2px" stroke="red" x1="0" y1="0" x2="0" y2="90"/>
+ </g>
+ </g>
+ <text id="datetext" x="10" y="250">test</text>
+
+ <script type="text/javascript">
+ var sHand = document.getElementById('secondhand');
+ var mHand = document.getElementById('minutehand');
+ var hHand = document.getElementById('hourhand');
+ var digital = document.getElementById('datetext');
+
+ function updateSeconds() {
+ var angle = (new Date()).getSeconds() * Math.PI/30;
+
+ if (angle == 0)
+ updateMinutes();
+
+ sHand.setAttribute('x2', 90 * Math.cos(angle));
+ sHand.setAttribute('y2', 90 * Math.sin(angle));
+
+ var d = (new Date()).toUTCString();
+ digital.firstChild.data = d;
+ }
+
+ function updateMinutes() {
+ var angle = (new Date()).getMinutes() * Math.PI/30;
+
+ if (angle == 0)
+ updateHours();
+
+ mHand.setAttribute('x2', 65 * Math.cos(angle));
+ mHand.setAttribute('y2', 65 * Math.sin(angle));
+ }
+
+ function updateHours() {
+ var angle = (new Date()).getHours() * Math.PI/6;
+ hHand.setAttribute('x2', 40 * Math.cos(angle));
+ hHand.setAttribute('y2', 40 * Math.sin(angle));
+ }
+ updateSeconds();
+ updateMinutes();
+ updateHours();
+ setInterval('updateSeconds()', 1000);
+
+ </script>
+</svg>
diff --git a/ksvg/test/ecma/dom01.svg b/ksvg/test/ecma/dom01.svg
new file mode 100644
index 00000000..d5b98937
--- /dev/null
+++ b/ksvg/test/ecma/dom01.svg
@@ -0,0 +1,40 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="4cm" height="2cm" viewBox="0 0 400 200"
+ onload="StartAnimation(evt)"
+ xmlns="http://www.w3.org/2000/svg">
+
+ <script type="text/ecmascript"><![CDATA[
+ var timevalue = 0;
+ var timer_increment = 50;
+ var max_time = 5000;
+ var text_element;
+ function StartAnimation(evt) {
+ text_element = evt.target.ownerDocument.getElementById("TextElement");
+ ShowAndGrowElement();
+ }
+ function ShowAndGrowElement() {
+ timevalue = timevalue + timer_increment;
+ if (timevalue > max_time)
+ return;
+
+ // Scale the text string gradually until it is 20 times larger
+ scalefactor = (timevalue * 20.) / max_time * 40;
+ text_element.setAttribute("transform", "scale(" + scalefactor + ")");
+ // Make the string more opaque
+ opacityfactor = timevalue / max_time;
+// text_element.setAttribute("opacity", opacityfactor);
+
+ // Call ShowAndGrowElement again <timer_increment> milliseconds later.
+// setTimeout("ShowAndGrowElement()", timer_increment)
+ }
+ window.ShowAndGrowElement = ShowAndGrowElement
+ ]]></script>
+ <rect x="1" y="1" width="398" height="198"
+ fill="none" stroke="blue" stroke-width="2"/>
+
+ <g transform="translate(50,150)" fill="red" font-size="7">
+ <text id="TextElement">SVG</text>
+ </g>
+</svg>
diff --git a/ksvg/test/external/Makefile.am b/ksvg/test/external/Makefile.am
new file mode 100644
index 00000000..77f763ac
--- /dev/null
+++ b/ksvg/test/external/Makefile.am
@@ -0,0 +1,13 @@
+INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes)
+METASOURCES = AUTO
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+
+bin_PROGRAMS = svgdisplay printnodetest
+
+svgdisplay_SOURCES = SVGTestWidget.cc svgdisplay.cc
+svgdisplay_LDADD = $(LIB_KDECORE) ../../libksvg.la
+svgdisplay_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+
+printnodetest_SOURCES = printnodetest.cpp
+printnodetest_LDADD = $(LIB_KDECORE) ../../libksvg.la
+printnodetest_LDFLAGS = $(KDE_RPATH) $(all_libraries)
diff --git a/ksvg/test/external/SVGTestWidget.cc b/ksvg/test/external/SVGTestWidget.cc
new file mode 100644
index 00000000..b954e94b
--- /dev/null
+++ b/ksvg/test/external/SVGTestWidget.cc
@@ -0,0 +1,206 @@
+// Very small test app to look at ksvg performance without konqueror overhead (Rob)
+
+#include "SVGTestWidget.moc"
+#include "DocumentFactory.h"
+#include "CanvasFactory.h"
+#include "SVGCircleElement.h"
+#include "SVGAnimatedLength.h"
+#include "SVGLength.h"
+#include "SVGSVGElement.h"
+#include "SVGEventImpl.h"
+#include "KSVGCanvas.h"
+#include "CanvasItem.h"
+#include <kcursor.h>
+
+using namespace KSVG;
+
+SVGTestWidget::SVGTestWidget(const KURL &url)
+{
+ setBackgroundColor(Qt::white);
+ setMouseTracking(true);
+ setFocusPolicy(WheelFocus);
+
+ m_doc = DocumentFactory::self()->requestDocument(this, SLOT(slotRenderingFinished()));
+ if(!m_doc)
+ return;
+
+ resize(450, 450);
+ m_canvas = CanvasFactory::self()->loadCanvas(450, 450);
+ if(!m_canvas)
+ return;
+
+ m_canvas->setup(this, this);
+
+ if(!DocumentFactory::self()->attachCanvas(m_canvas, m_doc))
+ return;
+
+ if(!DocumentFactory::self()->startParsing(m_doc, url))
+ return;
+}
+
+SVGTestWidget::~SVGTestWidget()
+{
+ delete m_canvas;
+ delete m_doc;
+}
+
+void SVGTestWidget::slotRenderingFinished()
+{
+ QRect rect(0, 0, width(), height());
+ m_canvas->blit(rect, true);
+
+ SVGElement test = m_doc->rootElement().getElementById("test");
+ if(test.nodeName() == "circle")
+ {
+ SVGCircleElement c = dom_cast(SVGCircleElement, test);
+ c.r().baseVal().setValue(150);
+ c.setAttribute("fill", "blue");
+ }
+}
+
+void SVGTestWidget::paintEvent(QPaintEvent *event)
+{
+ m_canvas->update();
+ m_canvas->blit(event->rect(), true);
+}
+
+void SVGTestWidget::resizeEvent(QResizeEvent *event)
+{
+ int w = event->size().width();
+ int h = event->size().height();
+
+ m_canvas->resize(w, h);
+ resize(w, h);
+ m_canvas->blit();
+}
+/*
+KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::EventId id, QMouseEvent *event)
+{
+ DOM::AbstractView temp;
+
+ int clientX = event->x();
+ int clientY = event->y();
+
+ if(doc && doc->rootElement())
+ {
+ clientX = int(clientX / doc->rootElement()->currentScale());
+ clientY = int(clientY / doc->rootElement()->currentScale());
+ }
+
+ int button = 0;
+ if(event->stateAfter() & Qt::LeftButton)
+ button = 1;
+ else if(event->stateAfter() & Qt::MidButton)
+ button = 2;
+ else if(event->stateAfter() & Qt::RightButton)
+ button = 3;
+
+ KSVG::SVGMouseEventImpl *mev = new KSVG::SVGMouseEventImpl(id, // type
+ true, // canBubbleArg
+ true, // cancelableArg
+ temp, // view
+ 0, // detail
+ event->globalX(), //screenXArg
+ event->globalY(), // screenYArg,
+ clientX, // clientXArg
+ clientY, // clientYArg
+ (event->state() & Qt::ControlButton), // ctrlKeyArg
+ (event->state() & Qt::AltButton), // altKeyArg
+ (event->state() & Qt::ShiftButton), // shiftKeyArg
+ (event->state() & Qt::MetaButton), // metaKeyArg
+ button, // buttonArg
+ 0);
+
+ mev->ref();
+
+ return mev;
+}
+
+void SVGTestWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ if(event->state() & QMouseEvent::ControlButton && event->state() & QMouseEvent::LeftButton)
+ {
+ if(m_panningPos.isNull())
+ m_panningPos = event->pos();
+ else
+ {
+ QPoint panPoint = m_oldPanningPos - (m_panningPos - event->pos());
+ m_doc->rootElement()->setCurrentTranslate(panPoint);
+// m_doc->syncCachedMatrices(); FIXME
+ m_canvas->update(panPoint);
+ }
+ return;
+ }
+ else if(event->state() & QMouseEvent::ControlButton)
+ return;
+}
+
+void SVGTestWidget::mousePressEvent(QMouseEvent *event)
+{
+ if(event->state() & QMouseEvent::ControlButton)
+ return;
+
+ KSVG::SVGMouseEventImpl *mev = newMouseEvent(m_doc, KSVG::SVGEventImpl::MOUSEDOWN_EVENT, event);
+
+ if(m_doc && m_doc->rootElement())
+ m_doc->rootElement()->prepareMouseEvent(event->pos(), event->pos(), mev);
+ mev->deref();
+}
+
+void SVGTestWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ if(!m_panningPos.isNull())
+ {
+ m_oldPanningPos = m_oldPanningPos - (m_panningPos - event->pos());
+ m_panningPos.setX(0);
+ m_panningPos.setY(0);
+ }
+
+ if(event->state() & QMouseEvent::ControlButton)
+ return;
+
+ // only simulate mouse clicks for now
+ KSVG::SVGMouseEventImpl *mev = newMouseEvent(m_doc, KSVG::SVGEventImpl::MOUSEUP_EVENT, event);
+
+ if(m_doc && m_doc->rootElement())
+ m_doc->rootElement()->prepareMouseEvent(event->pos(), event->pos(), mev);
+ mev->deref();
+}
+
+void SVGTestWidget::keyPressEvent(QKeyEvent *event)
+{
+ if(event->stateAfter() & QMouseEvent::ControlButton)
+ {
+ setCursor(KCursor::sizeAllCursor());
+ return;
+ }
+}
+
+void SVGTestWidget::keyReleaseEvent(QKeyEvent *event)
+{
+ if(event->state() & QMouseEvent::ControlButton)
+ {
+ setCursor(KCursor::arrowCursor());
+ return;
+ }
+ SVGSVGElementImpl *root = m_doc->rootElement();
+ if(!root) return;
+ if(event->key() == Qt::Key_Minus)
+ {
+ erase(0, 0, m_canvas->width(), m_canvas->height());
+ float zoomFactor = root->currentScale() / 1.2;
+ root->setCurrentScale(zoomFactor);
+ m_doc->syncCachedMatrices();
+ m_canvas->update(zoomFactor);
+ }
+ else if(event->key() == Qt::Key_Plus)
+ {
+ float zoomFactor = root->currentScale() * 1.2;
+ root->setCurrentScale(zoomFactor);
+ m_doc->syncCachedMatrices();
+ m_canvas->update(zoomFactor);
+ }
+}
+*/
+
+// vim:ts=4:noet
diff --git a/ksvg/test/external/SVGTestWidget.h b/ksvg/test/external/SVGTestWidget.h
new file mode 100644
index 00000000..10ece576
--- /dev/null
+++ b/ksvg/test/external/SVGTestWidget.h
@@ -0,0 +1,37 @@
+#ifndef _SVGTESTWIDGET_H
+#define _SVGTESTWIDGET_H
+
+#include <qwidget.h>
+#include <qobject.h>
+#include "SVGDocument.h"
+#include "KSVGCanvas.h"
+
+class SVGTestWidget : public QWidget
+{
+Q_OBJECT
+public:
+ SVGTestWidget(const KURL &url);
+ ~SVGTestWidget();
+
+private slots:
+ void slotRenderingFinished();
+
+protected:
+ virtual void paintEvent(QPaintEvent *event);
+ virtual void resizeEvent(QResizeEvent *event);
+/* virtual void mousePressEvent(QMouseEvent *event);
+ virtual void mouseReleaseEvent(QMouseEvent *event);
+ virtual void keyPressEvent(QKeyEvent *event);
+ virtual void keyReleaseEvent(QKeyEvent *event);
+ virtual void mouseMoveEvent(QMouseEvent *event);
+*/
+private:
+ QPoint m_panningPos;
+ QPoint m_oldPanningPos;
+
+ KSVG::SVGDocument *m_doc;
+ KSVG::KSVGCanvas *m_canvas;
+};
+
+#endif
+
diff --git a/ksvg/test/external/printnodetest.cpp b/ksvg/test/external/printnodetest.cpp
new file mode 100644
index 00000000..b2547e7f
--- /dev/null
+++ b/ksvg/test/external/printnodetest.cpp
@@ -0,0 +1,63 @@
+#include <DocumentFactory.h>
+#include <SVGSVGElement.h>
+#include <SVGDocument.h>
+#include <SVGWindow.h>
+
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kaboutdata.h>
+#include <kdebug.h>
+
+#include "printnodetest.moc"
+
+using namespace KSVG;
+
+static KCmdLineOptions options[] =
+{
+ { "+URL", I18N_NOOP("SVG file to open"), 0 },
+ KCmdLineLastOption
+};
+
+Worker::Worker(const KURL &url)
+{
+ m_doc = DocumentFactory::self()->requestDocument(this, SLOT(slotParsingFinished(bool, const QString &)));
+
+ if(!m_doc)
+ return;
+
+ if(!DocumentFactory::self()->startParsing(m_doc, url))
+ return;
+}
+
+Worker::~Worker()
+{
+ delete m_doc;
+}
+
+void Worker::slotParsingFinished(bool, const QString &)
+{
+ SVGWindow win = m_doc->window();
+ SVGSVGElement root = m_doc->rootElement();
+
+ kdDebug() << win.printNode(root).string() << endl;
+ exit(0);
+}
+
+int main(int argc, char **argv)
+{
+ KAboutData *about = new KAboutData("KSVG printNode test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG printNode test app"));
+ KCmdLineArgs::init(argc, argv, about);
+ KCmdLineArgs::addCmdLineOptions(options);
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ if(args->count() == 0)
+ {
+ args->usage();
+ return -1;
+ }
+
+ KApplication a(argc, argv);
+ (void) new Worker(args->url(0));
+ return a.exec();
+}
+
diff --git a/ksvg/test/external/printnodetest.h b/ksvg/test/external/printnodetest.h
new file mode 100644
index 00000000..e95a46a9
--- /dev/null
+++ b/ksvg/test/external/printnodetest.h
@@ -0,0 +1,32 @@
+#ifndef PRINTNODETEST_H
+#define PRINTNODETEST_H
+
+#include <kurl.h>
+#include <qobject.h>
+
+namespace KSVG
+{
+
+class SVGDocument;
+class Worker : public QObject
+{
+Q_OBJECT
+public:
+ Worker(const KURL &url);
+ ~Worker();
+
+private slots:
+ void slotParsingFinished(bool error, const QString &errorDesc);
+
+private:
+ // It's not allowed to store a m_doc object here,
+ // because it's ctor is called before we can setup
+ // our 'DocumentFactory', in that case it'll just crash (Niko)
+ SVGDocument *m_doc;
+};
+
+}
+
+#endif
+
+// vim:ts=4:noet
diff --git a/ksvg/test/external/svgdisplay.cc b/ksvg/test/external/svgdisplay.cc
new file mode 100644
index 00000000..662fb542
--- /dev/null
+++ b/ksvg/test/external/svgdisplay.cc
@@ -0,0 +1,32 @@
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+#include <kaboutdata.h>
+#include "SVGTestWidget.h"
+
+static KCmdLineOptions options[] =
+{
+ { "+URL", I18N_NOOP("SVG file to open"), 0 },
+ KCmdLineLastOption
+};
+
+int main(int argc, char **argv)
+{
+
+ KAboutData *about = new KAboutData( "KSVG test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG standalone test app") );
+ KCmdLineArgs::init(argc, argv, about);
+ KCmdLineArgs::addCmdLineOptions( options );
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ if(args->count() == 0)
+ {
+ args->usage();
+ return 0;
+ }
+ KURL url = args->url(0);
+ KApplication a( argc, argv );
+ SVGTestWidget *w = new SVGTestWidget(url);
+ a.setMainWidget(w);
+ w->show();
+
+ return a.exec();
+}
diff --git a/ksvg/test/fonttest.svg b/ksvg/test/fonttest.svg
new file mode 100644
index 00000000..29a0ecc3
--- /dev/null
+++ b/ksvg/test/fonttest.svg
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="800" height="1000" onload="init(evt)">
+<g id="insert">
+</g>
+
+<script language="JavaScript">
+var FAM1 = "Arial";
+var FAM2 = "LucidaSansUnicode";
+var FAM3 = "MS-Gothic";
+
+var entry_y = 10;
+var entry_dy = 16;
+
+var entry1_x = 10;
+var entry2_x = 100;
+var entry3_x = 190;
+var entry_end = entry2_x + entry3_x + 30;
+
+var entry1_count = entry_y;
+var entry2_count = entry_y;
+var entry3_count = entry_y;
+
+var doc, insert;
+
+function draw_grid(one, two)
+{
+ var element = doc.createElement("line");
+ element.x1.baseVal.value = Math.floor(one);
+ element.y1.baseVal.value = Math.floor(two) + (entry_dy / 2) - 4;
+ element.x2.baseVal.value = Math.floor(one) + entry_end;
+ element.y2.baseVal.value = Math.floor(two) + (entry_dy / 2) - 4;
+ element.setAttribute("style", "stroke-width:1px; stroke:black; opacity:0.5");
+
+ insert.appendChild(element);
+}
+
+function entry(text, one, two, what)
+{
+ var element = doc.createElement("text");
+
+ use = FAM1;
+ if(what == 1)
+ {
+ use = FAM2;
+ }
+ else if(what == 2)
+ {
+ use = FAM3;
+ }
+
+ element.x.baseVal.getItem(0).value = one;
+ element.y.baseVal.getItem(0).value = two;
+ element.firstChild.data = text;
+ element.setAttribute("font-family", use);
+ element.setAttribute("font-size", "12");
+
+ insert.appendChild(element);
+
+ return entry_dy;
+}
+
+function entry1(text)
+{
+ draw_grid(entry1_x, entry1_count);
+
+ entry1_count += entry(text, entry1_x, entry1_count, 0);
+}
+
+function entry2(text, what)
+{
+ entry2_count += entry(text, entry2_x, entry2_count, what);
+}
+
+function entry3(text, what)
+{
+ entry3_count += entry(text, entry3_x, entry3_count, what);
+}
+
+function init(evt)
+{
+ var target = evt.target;
+ doc = target.ownerDocument;
+
+ insert = doc.getElementById("insert");
+
+ entry1("Arabic", 0); entry2("", 0); entry3("السلام عليكم ", 0);
+ entry1("Bengali", 0); entry2("বাঙà§à¦²à¦¾", 0); entry3("ষাগতোম", 0); // Which lang?
+ entry1("Burmese", 0); entry2("", 0); entry3("မ္ရန္မာ", 0); // Which lang?
+ entry1("Cherokee", 0); entry2("á£áŽ³áŽ©", 0); entry3("Ꭳáá²", 0); // Which lang?
+ entry1("Czech", 0); entry2("Äesky", 0); entry3("Dobrý den", 0);
+ entry1("Danish", 0); entry2("Dansk", 0); entry3("Hej, Goddag", 0);
+ entry1("English", 0); entry2("", 0); entry3("Hello", 0);
+ entry1("Esperanto", 0); entry2("", 0); entry3("Saluton", 0);
+ entry1("Estonian", 0); entry2("", 0); entry3("Tere, Tervist", 0);
+ entry1("Finnish", 0); entry2("Suomi", 0); entry3("Hei", 0);
+ entry1("French", 0); entry2("Français", 0); entry3("Bonjour, Salut", 0);
+ entry1("German", 0); entry2("Deutsch Nord", 0); entry3("Guten Tag", 0);
+ entry1("German", 0); entry2("Deutsch Süd", 0); entry3("Grüß Gott", 0);
+ entry1("Georgian", 0); entry2("ქáƒáƒ áƒ—ველი", 0); entry3("გáƒáƒ›áƒáƒ áƒ¯áƒáƒ‘áƒ", 0); // Which lang?
+ entry1("Gujarati", 0); entry2("", 0); entry3("ગà«àªœàª°àª¾àª¤àª¿", 0); // Which lang?
+ entry1("Greek", 0); entry2("Ελληνικά", 0); entry3("Γειά σας", 0);
+ entry1("Hebrew", 1); entry2("", 1); entry3("שלו×", 1);
+ entry1("Hindi", 0); entry2("", 0); entry3("नमसà¥à¤¤à¥‡, नमसà¥à¤•à¤¾à¤°à¥¤", 0); // Which lang?
+ entry1("Italiano", 0); entry2("", 0); entry3("Ciao, Buon giorno", 0);
+ entry1("ɪŋglɪʃ", 1); entry2("", 1); entry3("hɛləʊ", 1); // Which lang here?
+ entry1("Maltese", 1); entry2("", 1); entry3("Ċaw, Saħħa", 1);
+ entry1("Nederlands", 0); entry2("", 0); entry3("Hallo, Dag", 0);
+ entry1("Norwegian", 0); entry2("Norsk", 0); entry3("Hei, God dag", 0);
+ entry1("Punjabi", 0); entry2("", 0); entry3("à©à¨ªà©à¨‚ਜਾਬਿ", 0); // Which lang?
+ entry1("Polish", 0); entry2("", 0); entry3("Dzień dobry, Hej", 0);
+ entry1("Russian", 0); entry2("РуÑÑкий", 0); entry3("ЗдравÑтвуйте!", 0);
+ entry1("Slovak", 0); entry2("", 0); entry3("Dobrý deň", 0);
+ entry1("Spanish", 1); entry2("Español", 1); entry3("‎¡Hola!‎", 1);
+ entry1("Swedish", 0); entry2("Svenska", 0); entry3("Hej, Goddag", 0);
+ entry1("Thai", 0); entry2("ภาษาไทย", 0); entry3("สวัสดีครับ, สวัสดีค่ะ", 0); // Which lang?
+ entry1("Turkish", 0); entry2("Türkçe", 0); entry3("Merhaba", 0);
+ entry1("Vietnamese", 0); entry2("Tiếng Việt", 0); entry3("Xin Chào", 0);
+ entry1("Yiddish", 1); entry2("ײַדישע", 1); entry3("ד×ָס הײַזעלע ", 1);
+ entry1("Japanese", 2); entry2("日本語", 2); entry3("ã“ã‚“ã«ã¡ã¯, コï¾ï¾†ï¾ï¾Š", 2);
+ entry1("Chinese", 2); entry2("中文,普通è¯,汉语½", 2); entry3("你好", 2);
+ entry1("Cantonese", 2); entry2("粵語,廣æ±è©±", 2); entry3("早晨, 你好", 2);
+ entry1("Korean", 0); entry2("한글", 0); entry3("안녕하세요, 안녕하십니까", 0); // Which lang?
+}
+</script>
+</svg>
diff --git a/ksvg/test/keytest.svg b/ksvg/test/keytest.svg
new file mode 100644
index 00000000..57c7b639
--- /dev/null
+++ b/ksvg/test/keytest.svg
@@ -0,0 +1,25 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
+ "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
+<svg id="hans" width="600" height="600">
+<script language="javascript">
+<![CDATA[
+
+function keytest(evt)
+{
+ alert(evt.keyVal);
+ alert(evt.virtKeyVal);
+ alert(evt.outputString);
+/*
+ evt.initmodifier(DOM_VK_LEFT_ALT,false);
+ alert(evt.checkmodifier(DOM_VK_LEFT_ALT));
+ evt.initmodifier(DOM_VK_LEFT_ALT,true);
+ alert(evt.checkmodifier(DOM_VK_LEFT_ALT));
+ alert(evt.target);*/
+}
+
+]]>
+</script>
+<rect id="jo" onkeydown="keytest(evt)" x="0" y="0" width="50" height="100" style="fill: red"/>
+<rect onkeyup="keytest(evt)" x="60" y="0" width="50" height="100" style="fill: red"/>
+</svg>
diff --git a/ksvg/test/lion.svg b/ksvg/test/lion.svg
new file mode 100644
index 00000000..972e158a
--- /dev/null
+++ b/ksvg/test/lion.svg
@@ -0,0 +1,160 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="15cm" height="15cm">
+<g transform="rotate(10) scale (1) translate (100,10)">
+<g style = "fill: #f2cc99" >
+ <polygon points = " 69,18 82,8 99,3 118,5 135,12 149,21 156,13 165,9 177,13 183,28 180,50 164,91 155,107 154,114 151,121 141,127 139,136 155,206 157,251 126,342 133,357 128,376 83,376 75,368 67,350 61,350 53,369 4,369 2,361 5,354 12,342 16,321 4,257 4,244 7,218 9,179 26,127 43,93 32,77 30,70 24,67 16,49 17,35 18,23 30,12 40,7 53,7 62,12"/>
+</g>
+<g style = "fill: #e5b27f" >
+ <polygon points = " 142,79 136,74 138,82 133,78 133,84 127,78 128,85 124,80 125,87 119,82 119,90 125,99 125,96 128,100 128,94 131,98 132,93 135,97 136,93 138,97 139,94 141,98 143,94 144,85"/>
+</g>
+<g style = "fill: #eb8080" >
+ <polygon points = " 127,101 132,100 137,99 144,101 143,105 135,110"/>
+</g>
+<g style = "fill: #f2cc99" >
+ <polygon points = " 178,229 157,248 139,296 126,349 137,356 158,357 183,342 212,332 235,288 235,261 228,252 212,250 188,251"/>
+</g>
+<g style = "fill: #9c826b" >
+ <polygon points = " 56,229 48,241 48,250 57,281 63,325 71,338 81,315 76,321 79,311 83,301 75,308 80,298 73,303 76,296 71,298 74,292 69,293 74,284 78,278 71,278 74,274 68,273 70,268 66,267 68,261 60,266 62,259 65,253 57,258 59,251 55,254 55,248 60,237 54,240 58,234 54,236"/>
+ <polygon points = " 74,363 79,368 81,368 85,362 89,363 92,370 96,373 101,372 108,361 110,371 113,373 116,371 120,358 122,363 123,371 126,371 129,367 132,357 135,361 130,376 127,377 94,378 84,376 76,371"/>
+ <polygon points = " 212,250 219,251 228,258 236,270 235,287 225,304 205,332 177,343 171,352 158,357 166,352 168,346 168,339 165,333 155,327 155,323 161,320 165,316 169,316 167,312 171,313 168,308 173,309 170,306 177,306 175,308 177,311 174,311 176,316 171,315 174,319 168,320 168,323 175,327 179,332 183,326 184,332 189,323 190,328 194,320 194,325 199,316 201,320 204,313 206,316 208,310 211,305 219,298 226,288 229,279 228,266 224,259 217,253"/>
+ <polygon points = " 151,205 151,238 149,252 141,268 128,282 121,301 130,300 126,313 118,324 116,337 120,346 133,352 133,340 137,333 145,329 156,327 153,319 153,291 157,271 170,259 178,277 193,250 174,216"/>
+ <polygon points = " 78,127 90,142 95,155 108,164 125,167 139,175 150,206 152,191 141,140 121,148 100,136"/>
+ <polygon points = " 21,58 35,63 38,68 32,69 42,74 40,79 47,80 54,83 45,94 34,81 32,73 24,66"/>
+ <polygon points = " 71,34 67,34 66,27 59,24 54,17 48,17 39,22 30,26 28,31 31,39 38,46 29,45 36,54 41,61 41,70 50,69 54,71 55,58 67,52 76,43 76,39 68,44"/>
+ <polygon points = " 139,74 141,83 143,89 144,104 148,104 155,106 154,86 157,77 155,72 150,77 144,77"/>
+ <polygon points = " 105,44 102,53 108,58 111,62 112,55"/>
+ <polygon points = " 141,48 141,54 144,58 139,62 137,66 136,59 137,52"/>
+ <polygon points = " 98,135 104,130 105,134 108,132 108,135 112,134 113,137 116,136 116,139 119,139 124,141 128,140 133,138 140,133 139,140 126,146 104,144"/>
+ <polygon points = " 97,116 103,119 103,116 111,118 116,117 122,114 127,107 135,111 142,107 141,114 145,118 149,121 145,125 140,124 127,121 113,125 100,124"/>
+ <polygon points = " 147,33 152,35 157,34 153,31 160,31 156,28 161,28 159,24 163,25 163,21 165,22 170,23 167,17 172,21 174,18 175,23 176,22 177,28 177,33 174,37 176,39 174,44 171,49 168,53 164,57 159,68 156,70 154,60 150,51 146,43 144,35"/>
+ <polygon points = " 85,72 89,74 93,75 100,76 105,75 102,79 94,79 88,76"/>
+ <polygon points = " 86,214 79,221 76,232 82,225 78,239 82,234 78,245 81,243 79,255 84,250 84,267 87,254 90,271 90,257 95,271 93,256 95,249 92,252 93,243 89,253 89,241 86,250 87,236 83,245 87,231 82,231 90,219 84,221"/>
+</g>
+<g style = "fill: #ffcc7f" >
+ <polygon points = " 93,68 96,72 100,73 106,72 108,66 105,63 100,62"/>
+ <polygon points = " 144,64 142,68 142,73 146,74 150,73 154,64 149,62"/>
+</g>
+<g style = "fill: #9c826b" >
+ <polygon points = " 57,91 42,111 52,105 41,117 53,112 46,120 53,116 50,124 57,119 55,127 61,122 60,130 67,126 66,134 71,129 72,136 77,130 76,137 80,133 82,138 86,135 96,135 94,129 86,124 83,117 77,123 79,117 73,120 75,112 68,116 71,111 65,114 69,107 63,110 68,102 61,107 66,98 61,103 63,97 57,99"/>
+ <polygon points = " 83,79 76,79 67,82 75,83 65,88 76,87 65,92 76,91 68,96 77,95 70,99 80,98 72,104 80,102 76,108 85,103 92,101 87,98 93,96 86,94 91,93 85,91 93,89 99,89 105,93 107,85 102,82 92,80"/>
+ <polygon points = " 109,77 111,83 109,89 113,94 117,90 117,81 114,78"/>
+ <polygon points = " 122,128 127,126 134,127 136,129 134,130 130,128 124,129"/>
+ <polygon points = " 78,27 82,32 80,33 82,36 78,37 82,40 78,42 81,46 76,47 78,49 74,50 82,52 87,50 83,48 91,46 86,45 91,42 88,40 92,37 86,34 90,31 86,29 89,26"/>
+ <polygon points = " 82,17 92,20 79,21 90,25 81,25 94,28 93,26 101,30 101,26 107,33 108,28 111,40 113,34 115,45 117,39 119,54 121,46 124,58 126,47 129,59 130,49 134,58 133,44 137,48 133,37 137,40 133,32 126,20 135,26 132,19 138,23 135,17 142,18 132,11 116,6 94,6 78,11 92,12 80,14 90,16"/>
+ <polygon points = " 142,234 132,227 124,223 115,220 110,225 118,224 127,229 135,236 122,234 115,237 113,242 121,238 139,243 121,245 111,254 95,254 102,244 104,235 110,229 100,231 104,224 113,216 122,215 132,217 141,224 145,230 149,240"/>
+ <polygon points = " 115,252 125,248 137,249 143,258 134,255 125,254"/>
+ <polygon points = " 114,212 130,213 140,219 147,225 144,214 137,209 128,207"/>
+ <polygon points = " 102,263 108,258 117,257 131,258 116,260 109,265"/>
+ <polygon points = " 51,241 35,224 40,238 23,224 31,242 19,239 28,247 17,246 25,250 37,254 39,263 44,271 47,294 48,317 51,328 60,351 60,323 53,262 47,246"/>
+ <polygon points = " 2,364 9,367 14,366 18,355 20,364 26,366 31,357 35,364 39,364 42,357 47,363 53,360 59,357 54,369 7,373"/>
+ <polygon points = " 7,349 19,345 25,339 18,341 23,333 28,326 23,326 27,320 23,316 25,311 20,298 15,277 12,264 9,249 10,223 3,248 5,261 15,307 17,326 11,343"/>
+ <polygon points = " 11,226 15,231 25,236 18,227"/>
+ <polygon points = " 13,214 19,217 32,227 23,214 16,208 15,190 24,148 31,121 24,137 14,170 8,189"/>
+ <polygon points = " 202,254 195,258 199,260 193,263 197,263 190,268 196,268 191,273 188,282 200,272 194,272 201,266 197,265 204,262 200,258 204,256"/>
+</g>
+<g style = "fill: #845433" >
+ <polygon points = " 151,213 165,212 179,225 189,246 187,262 179,275 176,263 177,247 171,233 163,230 165,251 157,264 146,298 145,321 133,326 143,285 154,260 153,240"/>
+ <polygon points = " 91,132 95,145 97,154 104,148 107,155 109,150 111,158 115,152 118,159 120,153 125,161 126,155 133,164 132,154 137,163 137,152 142,163 147,186 152,192 148,167 141,143 124,145 105,143"/>
+</g>
+<g style = "fill: #9c826b" >
+ <polygon points = " 31,57 23,52 26,51 20,44 23,42 21,36 22,29 25,23 24,32 30,43 26,41 30,50 26,48"/>
+ <polygon points = " 147,21 149,28 155,21 161,16 167,14 175,15 173,11 161,9"/>
+ <polygon points = " 181,39 175,51 169,57 171,65 165,68 165,75 160,76 162,91 171,71 180,51"/>
+ <polygon points = " 132,346 139,348 141,346 142,341 147,342 143,355 133,350"/>
+ <polygon points = " 146,355 151,352 155,348 157,343 160,349 151,356 147,357"/>
+ <polygon points = " 99,266 100,281 94,305 86,322 78,332 72,346 73,331 91,291"/>
+ <polygon points = " 20,347 32,342 45,340 54,345 45,350 42,353 38,350 31,353 29,356 23,350 19,353 15,349"/>
+ <polygon points = " 78,344 86,344 92,349 88,358 84,352"/>
+ <polygon points = " 93,347 104,344 117,345 124,354 121,357 116,351 112,351 108,355 102,351"/>
+</g>
+<g style = "fill: #000000" >
+ <polygon points = " 105,12 111,18 113,24 113,29 119,34 116,23 112,16"/>
+ <polygon points = " 122,27 125,34 127,43 128,34 125,29"/>
+ <polygon points = " 115,13 122,19 122,15 113,10"/>
+</g>
+<g style = "fill: #ffe5b2" >
+ <polygon points = " 116,172 107,182 98,193 98,183 90,199 89,189 84,207 88,206 87,215 95,206 93,219 91,230 98,216 97,226 104,214 112,209 104,208 113,202 126,200 139,207 132,198 142,203 134,192 142,195 134,187 140,185 130,181 136,177 126,177 125,171 116,180"/>
+ <polygon points = " 74,220 67,230 67,221 59,235 63,233 60,248 70,232 65,249 71,243 67,256 73,250 69,262 73,259 71,267 76,262 72,271 78,270 76,275 82,274 78,290 86,279 86,289 92,274 88,275 87,264 82,270 82,258 77,257 78,247 73,246 77,233 72,236"/>
+ <polygon points = " 133,230 147,242 148,250 145,254 138,247 129,246 142,245 138,241 128,237 137,238"/>
+ <polygon points = " 133,261 125,261 116,263 111,267 125,265"/>
+ <polygon points = " 121,271 109,273 103,279 99,305 92,316 85,327 83,335 89,340 97,341 94,336 101,336 96,331 103,330 97,327 108,325 99,322 109,321 100,318 110,317 105,314 110,312 107,310 113,308 105,306 114,303 105,301 115,298 107,295 115,294 108,293 117,291 109,289 117,286 109,286 118,283 112,281 118,279 114,278 119,276 115,274"/>
+ <polygon points = " 79,364 74,359 74,353 76,347 80,351 83,356 82,360"/>
+ <polygon points = " 91,363 93,356 97,353 103,355 105,360 103,366 99,371 94,368"/>
+ <polygon points = " 110,355 114,353 118,357 117,363 113,369 111,362"/>
+ <polygon points = " 126,354 123,358 124,367 126,369 129,361 129,357"/>
+ <polygon points = " 30,154 24,166 20,182 23,194 29,208 37,218 41,210 41,223 46,214 46,227 52,216 52,227 61,216 59,225 68,213 73,219 70,207 77,212 69,200 77,202 70,194 78,197 68,187 76,182 64,182 58,175 58,185 53,177 50,186 46,171 44,182 39,167 36,172 36,162 30,166"/>
+ <polygon points = " 44,130 41,137 45,136 43,150 48,142 48,157 53,150 52,164 60,156 61,169 64,165 66,175 70,167 74,176 77,168 80,183 85,172 90,182 93,174 98,181 99,173 104,175 105,169 114,168 102,163 95,157 94,166 90,154 87,162 82,149 75,159 72,148 68,155 67,143 62,148 62,138 58,145 56,133 52,142 52,128 49,134 47,125"/>
+ <polygon points = " 13,216 19,219 36,231 22,223 16,222 22,227 12,224 13,220 16,220"/>
+ <polygon points = " 10,231 14,236 25,239 27,237 19,234"/>
+ <polygon points = " 9,245 14,242 25,245 13,245"/>
+ <polygon points = " 33,255 26,253 18,254 25,256 18,258 27,260 18,263 27,265 19,267 29,270 21,272 29,276 21,278 30,281 22,283 31,287 24,288 32,292 23,293 34,298 26,299 37,303 32,305 39,309 33,309 39,314 34,314 40,318 34,317 40,321 34,321 41,326 33,326 40,330 33,332 39,333 33,337 42,337 54,341 49,337 52,335 47,330 50,330 45,325 49,325 45,321 48,321 45,316 46,306 45,286 43,274 36,261"/>
+ <polygon points = " 7,358 9,351 14,351 17,359 11,364"/>
+ <polygon points = " 44,354 49,351 52,355 49,361"/>
+ <polygon points = " 32,357 37,353 40,358 36,361"/>
+ <polygon points = " 139,334 145,330 154,330 158,334 154,341 152,348 145,350 149,340 147,336 141,339 139,345 136,342 136,339"/>
+ <polygon points = " 208,259 215,259 212,255 220,259 224,263 225,274 224,283 220,292 208,300 206,308 203,304 199,315 197,309 195,318 193,313 190,322 190,316 185,325 182,318 180,325 172,321 178,320 176,313 186,312 180,307 188,307 184,303 191,302 186,299 195,294 187,290 197,288 192,286 201,283 194,280 203,277 198,275 207,271 200,269 209,265 204,265 212,262"/>
+ <polygon points = " 106,126 106,131 109,132 111,134 115,132 115,135 119,133 118,137 123,137 128,137 133,134 136,130 136,127 132,124 118,128 112,128 106,126 106,126 106,126"/>
+ <polygon points = " 107,114 101,110 98,102 105,97 111,98 119,102 121,108 118,112 113,115"/>
+ <polygon points = " 148,106 145,110 146,116 150,118 152,111 151,107"/>
+ <polygon points = " 80,55 70,52 75,58 63,57 72,61 57,61 67,66 57,67 62,69 54,71 61,73 54,77 63,78 53,85 60,84 56,90 69,84 63,82 75,76 70,75 77,72 72,71 78,69 72,66 81,67 78,64 82,63 80,60 86,62"/>
+ <polygon points = " 87,56 91,52 96,50 102,56 98,56 92,60"/>
+ <polygon points = " 85,68 89,73 98,76 106,74 96,73 91,70"/>
+ <polygon points = " 115,57 114,64 111,64 115,75 122,81 122,74 126,79 126,74 131,78 130,72 133,77 131,68 126,61 119,57"/>
+ <polygon points = " 145,48 143,53 147,59 151,59 150,55"/>
+ <polygon points = " 26,22 34,15 43,10 52,10 59,16 47,15 32,22"/>
+ <polygon points = " 160,19 152,26 149,34 154,33 152,30 157,30 155,26 158,27 157,23 161,23"/>
+</g>
+<g style = "fill: #000000" >
+ <polygon points = " 98,117 105,122 109,122 105,117 113,120 121,120 130,112 128,108 123,103 123,99 128,101 132,106 135,109 142,105 142,101 145,101 145,91 148,101 145,105 136,112 135,116 143,124 148,120 150,122 142,128 133,122 121,125 112,126 103,125 100,129 96,124"/>
+ <polygon points = " 146,118 152,118 152,115 149,115"/>
+ <polygon points = " 148,112 154,111 154,109 149,109"/>
+ <polygon points = " 106,112 108,115 114,116 118,114"/>
+ <polygon points = " 108,108 111,110 116,110 119,108"/>
+ <polygon points = " 106,104 109,105 117,106 115,104"/>
+ <polygon points = " 50,25 41,26 34,33 39,43 49,58 36,51 47,68 55,69 54,59 61,57 74,46 60,52 67,42 57,48 61,40 54,45 60,36 59,29 48,38 52,30 47,32"/>
+ <polygon points = " 147,34 152,41 155,49 161,53 157,47 164,47 158,43 168,44 159,40 164,37 169,37 164,33 169,34 165,28 170,30 170,25 173,29 175,27 176,32 173,36 175,39 172,42 172,46 168,49 170,55 162,57 158,63 155,58 153,50 149,46"/>
+ <polygon points = " 155,71 159,80 157,93 157,102 155,108 150,101 149,93 154,101 152,91 151,83 155,79"/>
+ <polygon points = " 112,78 115,81 114,91 112,87 113,82"/>
+ <polygon points = " 78,28 64,17 58,11 47,9 36,10 28,16 21,26 18,41 20,51 23,61 33,65 28,68 37,74 36,81 43,87 48,90 43,100 40,98 39,90 31,80 30,72 22,71 17,61 14,46 16,28 23,17 33,9 45,6 54,6 65,12"/>
+ <polygon points = " 67,18 76,9 87,5 101,2 118,3 135,8 149,20 149,26 144,19 132,12 121,9 105,7 89,8 76,14 70,20"/>
+ <polygon points = " 56,98 48,106 56,103 47,112 56,110 52,115 57,113 52,121 62,115 58,123 65,119 63,125 69,121 68,127 74,125 74,129 79,128 83,132 94,135 93,129 85,127 81,122 76,126 75,121 71,124 71,117 66,121 66,117 62,117 64,112 60,113 60,110 57,111 61,105 57,107 60,101 55,102"/>
+ <polygon points = " 101,132 103,138 106,134 106,139 112,136 111,142 115,139 114,143 119,142 125,145 131,142 135,138 140,134 140,129 143,135 145,149 150,171 149,184 145,165 141,150 136,147 132,151 131,149 126,152 125,150 121,152 117,148 111,152 110,148 105,149 104,145 98,150 96,138 94,132 94,130 98,132"/>
+ <polygon points = " 41,94 32,110 23,132 12,163 6,190 7,217 5,236 3,247 9,230 12,211 12,185 18,160 26,134 35,110 43,99"/>
+ <polygon points = " 32,246 41,250 50,257 52,267 53,295 53,323 59,350 54,363 51,365 44,366 42,360 40,372 54,372 59,366 62,353 71,352 75,335 73,330 66,318 68,302 64,294 67,288 63,286 63,279 59,275 58,267 56,262 50,247 42,235 44,246 32,236 35,244"/>
+ <polygon points = " 134,324 146,320 159,322 173,327 179,337 179,349 172,355 158,357 170,350 174,343 170,333 163,328 152,326 134,329"/>
+ <polygon points = " 173,339 183,334 184,338 191,329 194,332 199,323 202,325 206,318 209,320 213,309 221,303 228,296 232,289 234,279 233,269 230,262 225,256 219,253 208,252 198,252 210,249 223,250 232,257 237,265 238,277 238,291 232,305 221,323 218,335 212,342 200,349 178,348"/>
+ <polygon points = " 165,296 158,301 156,310 156,323 162,324 159,318 162,308 162,304"/>
+ <polygon points = " 99,252 105,244 107,234 115,228 121,228 131,235 122,233 113,235 109,246 121,239 133,243 121,243 110,251"/>
+ <polygon points = " 117,252 124,247 134,249 136,253 126,252"/>
+ <polygon points = " 117,218 132,224 144,233 140,225 132,219 117,218 117,218 117,218"/>
+ <polygon points = " 122,212 134,214 143,221 141,213 132,210"/>
+ <polygon points = " 69,352 70,363 76,373 86,378 97,379 108,379 120,377 128,378 132,373 135,361 133,358 132,366 127,375 121,374 121,362 119,367 117,374 110,376 110,362 107,357 106,371 104,375 97,376 90,375 90,368 86,362 83,364 86,369 85,373 78,370 73,362 71,351"/>
+ <polygon points = " 100,360 96,363 99,369 102,364"/>
+ <polygon points = " 115,360 112,363 114,369 117,364"/>
+ <polygon points = " 127,362 125,364 126,369 128,365"/>
+ <polygon points = " 5,255 7,276 11,304 15,320 13,334 6,348 2,353 0,363 5,372 12,374 25,372 38,372 44,369 42,367 36,368 31,369 30,360 27,368 20,370 16,361 15,368 10,369 3,366 3,359 6,352 11,348 17,331 19,316 12,291 9,274"/>
+ <polygon points = " 10,358 7,362 10,366 11,362"/>
+ <polygon points = " 25,357 22,360 24,366 27,360"/>
+ <polygon points = " 37,357 34,361 36,365 38,361"/>
+ <polygon points = " 49,356 46,359 47,364 50,360"/>
+ <polygon points = " 130,101 132,102 135,101 139,102 143,103 142,101 137,100 133,100"/>
+ <polygon points = " 106,48 105,52 108,56 109,52"/>
+ <polygon points = " 139,52 139,56 140,60 142,58 141,56"/>
+ <polygon points = " 25,349 29,351 30,355 33,350 37,348 42,351 45,347 49,345 44,343 36,345"/>
+ <polygon points = " 98,347 105,351 107,354 109,349 115,349 120,353 118,349 113,346 104,346"/>
+ <polygon points = " 83,348 87,352 87,357 89,351 87,348"/>
+ <polygon points = " 155,107 163,107 170,107 186,108 175,109 155,109"/>
+ <polygon points = " 153,114 162,113 175,112 192,114 173,114 154,115"/>
+ <polygon points = " 152,118 164,120 180,123 197,129 169,123 151,120"/>
+ <polygon points = " 68,109 87,106 107,106 106,108 88,108"/>
+ <polygon points = " 105,111 95,112 79,114 71,116 85,115 102,113"/>
+ <polygon points = " 108,101 98,99 87,99 78,99 93,100 105,102"/>
+ <polygon points = " 85,63 91,63 97,60 104,60 108,62 111,69 112,75 110,74 108,71 103,73 106,69 105,65 103,64 103,67 102,70 99,70 97,66 94,67 97,72 88,67 84,66"/>
+ <polygon points = " 140,74 141,66 144,61 150,61 156,62 153,70 150,73 152,65 150,65 151,68 149,71 146,71 144,66 143,70 143,74"/>
+ <polygon points = " 146,20 156,11 163,9 172,9 178,14 182,18 184,32 182,42 182,52 177,58 176,67 171,76 165,90 157,105 160,92 164,85 168,78 167,73 173,66 172,62 175,59 174,55 177,53 180,46 181,29 179,21 173,13 166,11 159,13 153,18 148,23"/>
+ <polygon points = " 150,187 148,211 150,233 153,247 148,267 135,283 125,299 136,292 131,313 122,328 122,345 129,352 133,359 133,367 137,359 148,356 140,350 131,347 129,340 132,332 140,328 137,322 140,304 154,265 157,244 155,223 161,220 175,229 186,247 185,260 176,275 178,287 185,277 188,261 196,253 189,236 174,213"/>
+ <polygon points = " 147,338 142,341 143,345 141,354 147,343"/>
+ <polygon points = " 157,342 156,349 150,356 157,353 163,346 162,342"/>
+ <polygon points = " 99,265 96,284 92,299 73,339 73,333 87,300"/>
+</g>
+</g>
+</svg>
diff --git a/ksvg/test/opacity.svg b/ksvg/test/opacity.svg
new file mode 100644
index 00000000..fa2b20e2
--- /dev/null
+++ b/ksvg/test/opacity.svg
@@ -0,0 +1,41 @@
+<svg width="600" height="200">
+ <!-- adapted from example opacity01 in SVG candidate recommendation 2 Aug 2000 -->
+ <path style="fill:#008" d="M50 50 L50 150 550 150 550 50z"/>
+ <g transform="translate(100,50)" style="opacity:1">
+ <path style="fill:#f00; opacity:1" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:1" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(200,50)" style="opacity:0.5">
+ <path style="fill:#f00; opacity:1" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:1" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(300,50)" style="opacity:1">
+ <path style="fill:#f00; opacity:0.5" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:0.5" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(400,50)" style="opacity:0.5">
+ <path style="fill:#f00; opacity:0.5" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:0.5" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+
+ <g transform="translate(100,150)" style="opacity:1; stroke-width:5; stroke:#000">
+ <path style="fill:#f00; opacity:1" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:1" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(200,150)" style="opacity:0.5; stroke-width:5; stroke:#000">
+ <path style="fill:#f00; opacity:1" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:1" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(300,150)" style="opacity:1; stroke-width:5; stroke:#000">
+ <path style="fill:#f00; opacity:0.5" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:0.5" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(400,150)" style="opacity:0.5; stroke-width:5; stroke:#000">
+ <path style="fill:#f00; opacity:0.5" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; opacity:0.5" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+ <g transform="translate(500,150)" style="opacity:1; stroke-width:5; stroke:#000">
+ <path style="fill:#f00; fill-opacity:0.5; stroke-opacity:0.5" d="M-30 0 L-10 20 10 0 -10 -20z"/>
+ <path style="fill:#0f0; fill-opacity:0.5; stroke-opacity:0.5" d="M-10 0 L10 20 30 0 10 -20z"/>
+ </g>
+</svg>
diff --git a/ksvg/test/physics-motor.svg b/ksvg/test/physics-motor.svg
new file mode 100644
index 00000000..9956ad8e
--- /dev/null
+++ b/ksvg/test/physics-motor.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
+
+<!-- Copyright 2002 Nikolas Zimmermann <wildfox@kde.org> -->
+<!-- "Der Gleichstrommotor" -->
+
+<svg width="650" height="850">
+ <title>physics-motor</title>
+ <desc>Der Gleichstrommotor</desc>
+
+ <defs>
+ <!-- Rotor Parts -->
+ <g id="rotor-p1">
+ <path d="M 300 350 C 300 320 400 320 400 350 z"/>
+ <rect x="320" y="350" width="60" height="74"/>
+
+ </g>
+
+ <g id="rotor-p2">
+ <path d="M 300 500 C 300 530 400 530 400 500 z"/>
+ <rect x="320" y="424" width="60" height="76"/>
+ </g>
+
+ <!-- Stator -->
+ <g id="stator">
+ <rect x="310" y="300" width="100" height="30" style="fill:red"/>
+ <rect x="310" y="540" width="100" height="30" style="fill:green"/>
+ </g>
+
+ <!-- Rotor -->
+ <g id="rotor">
+ <use x="10" y="10" xlink:href="#rotor-p2" style="fill:green;stroke:black"/>
+ <use x="10" y="10" xlink:href="#rotor-p1" style="fill:red;stroke:black"/>
+
+ <circle cx="360" cy="435" r="6" style="fill:black"/>
+ </g>
+ </defs>
+
+ <use xlink:href="#stator"/>
+ <use id="animate" xlink:href="#rotor"/>
+
+ <animateTransform xlink:href="#animate" begin="2s" dur="3s" attributeName="transform" type="rotate" from="0, 360, 435" to="360, 360, 435" repeatDur="indefinite"/>
+</svg>
diff --git a/ksvg/test/poly.svg b/ksvg/test/poly.svg
new file mode 100644
index 00000000..6c2938f9
--- /dev/null
+++ b/ksvg/test/poly.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
+ "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
+<svg width="210mm" height="297mm" >
+ <polygon width="61.2" x="121.5" y="108" points="182.7,135 182.7,108 121.5,108 121.5,135 182.7,135 " height="27" transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polygon width="61.2" x="247.5" y="108" points="308.7,135 308.7,108 247.5,108 247.5,135 308.7,135 " height="27" transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polygon width="61.2" x="193.5" y="184.5" points="254.7,211.5 254.7,184.5 193.5,184.5 193.5,211.5 254.7,211.5 " height="27" transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polygon width="90" x="180" y="261" points="270,288 270,261 180,261 180,288 270,288 " height="27" transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polyline points="153,135 216,184.5 " transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polyline points="279,135 229.5,184.5 " transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+ <polyline points="225,211.5 225,261 " transform="matrix(1 0 0 1 0 0)" style="fill:none ; stroke:#000000;stroke-width:0.9" />
+</svg>
diff --git a/ksvg/test/shapes-rect-trans.svg b/ksvg/test/shapes-rect-trans.svg
new file mode 100644
index 00000000..fb919312
--- /dev/null
+++ b/ksvg/test/shapes-rect-trans.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- shapes-rect-BE-01.svg -->
+<!-- -->
+<!-- Test that viewer has the basic capability to handle the <rect> -->
+<!-- element. -->
+<!-- -->
+<!-- Author : Kelvin R. Lawrence, 3-Feb-2000 -->
+<!-- -->
+<!-- History: -->
+<!-- 3-Feb-2000, KRL, Serial#1 created. Matches 20000202 SVG spec. -->
+<!-- 27-Feb-2000, LH, Serial#2, fix TC name, formatting, create .XML -->
+<!-- 12-Mar-2000, LH, fix test-framing rect; ser#3 -->
+<!-- 03-Aug-2000, LH: update DOCTYPE for CR DTD, 20000802; ser# . -->
+<!-- -->
+<!-- ===================================================================== -->
+<!--======================================================================-->
+<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
+<!--= log messages, and therefore is no longer in the preceding preamble.=-->
+<!--======================================================================-->
+<svg id="svg-root" width="450" height="450">
+ <title id="test-title">shapes-rect-BE-01</title>
+ <desc id="test-desc">Test that viewer has the basic capability to handle the &lt;rect&gt; element.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <!-- ====================================================================== -->
+ <!-- First of all draw two simple rectangles. One stroked , one filled. -->
+ <!-- ====================================================================== -->
+ <text style="font-family:Helvetica;font-size:12;" x="160" y="14">Basic rectangles</text>
+ <text style="font-family:Helvetica;font-size:12;" x="82" y="60">width=50</text>
+ <text style="font-family:Helvetica;font-size:12;" x="78" y="76">height=100</text>
+ <rect id="Simple-rect-no-fill" style="fill:none;stroke:#000000" x="0" y="0" width="50" height="100" transform="skewX(0.1);translate(30,86)" />
+ <rect id="Simple-rect-filled" style="fill:red" x="130" y="86" width="50" height="100" />
+ <text style="font-family:Helvetica;font-size:12;" x="36" y="202">stroked</text>
+ <text style="font-family:Helvetica;font-size:12;" x="142" y="202">filled</text>
+ <!-- ====================================================================== -->
+ <!-- Second set of rectangles this time with rounded corners. -->
+ <!-- ====================================================================== -->
+ <text style="font-family:Helvetica;font-size:12;" x="302" y="50">width=50</text>
+ <text style="font-family:Helvetica;font-size:12;" x="298" y="66">height=100</text>
+ <text style="font-family:Helvetica;font-size:12;" x="310" y="82">rx=30</text>
+ <rect id="Simple-round-rect-no-fill" style="fill:none;stroke:#000000" x="250" y="86" width="50" height="100" rx="30"/>
+ <rect id="Simple-round-rect-filled" style="fill:red" x="350" y="86" width="50" height="100" rx="30"/>
+ <text style="font-family:Helvetica;font-size:12;" x="256" y="202">stroked</text>
+ <text style="font-family:Helvetica;font-size:12;" x="362" y="202">filled</text>
+ <!-- ====================================================================== -->
+ <!-- Third set of rectangles. -->
+ <!-- ====================================================================== -->
+ <text style="font-family:Helvetica;font-size:12;" x="82" y="230">width=50</text>
+ <text style="font-family:Helvetica;font-size:12;" x="78" y="246">height=100</text>
+ <rect id="rect-03" style="fill:none;stroke:#0000FF;stroke-width:8" x="30" y="266" width="50" height="100" transform="scale(0.5, 0.2)" />
+ <rect id="rect-04" style="fill:#00FF00;stroke:#0000FF;stroke-width:8" x="130" y="266" width="50" height="100" transform="rotate(25)" />
+ <text style="font-family:Helvetica;font-size:12;" x="36" y="382">stroked</text>
+ <text style="font-family:Helvetica;font-size:12;" x="118" y="382">filled &amp; stroked</text>
+ <!-- ====================================================================== -->
+ <!-- Fourth set of rectangles. -->
+ <!-- ====================================================================== -->
+ <text style="font-family:Helvetica;font-size:12;" x="302" y="230">width=50</text>
+ <text style="font-family:Helvetica;font-size:12;" x="298" y="246">height=100</text>
+ <text style="font-family:Helvetica;font-size:12;" x="296" y="262">rx=30 ry=50</text>
+ <rect id="rect-05" style="fill:none;stroke:#0000FF;stroke-width:8" x="250" y="266" width="50" height="100" rx="30" ry="50"/>
+ <rect id="rect-06" style="fill:#00FF00" x="350" y="266" width="50" height="100" rx="30" ry="50"/>
+ <text style="font-family:Helvetica;font-size:12;" x="256" y="382">stroked</text>
+ <text style="font-family:Helvetica;font-size:12;" x="362" y="382">filled</text>
+ </g>
+ <!--======================================================================-->
+ <!--Legend and frame: Title, suite and SVG document serialization====-->
+ <!--======================================================================-->
+ <g id="test-legend" style="fill:black;font-family:Helvetica;font-size:10">
+ <rect x="10" y="390" width="275" height="50" style="fill:none;stroke:#000000" transform="rotate(25)" />
+ <path style="fill:none;stroke:#000000" d="M10 405 h275 M205 405 v35 M10 426 h195 M205 422 h80"/>
+ <text x="25" y="401">Scalable Vector Graphics (SVG) Conformance Suite</text>
+ <a xlink:href="copyright-documents-19990405.html">
+ <text x="12" y="437" style="fill:blue">Copyright 2000 W3C. All Rights Reserved.</text>
+ </a>
+ <text style="font-size:12" x="35" y="420">shapes-rect-BE-01</text>
+ <text style="font-size:10" x="210" y="417">$Revision$</text>
+ <text style="font-size:10" x="210" y="435">Release 2.0</text>
+ <rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none; stroke:#000000"/>
+ </g>
+</svg>
diff --git a/ksvg/test/tiger.svg b/ksvg/test/tiger.svg
new file mode 100644
index 00000000..f2c13913
--- /dev/null
+++ b/ksvg/test/tiger.svg
@@ -0,0 +1,722 @@
+<svg>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000">
+ <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/>
+ </g>
+ <g style="fill: #cc7226; stroke:#000000">
+ <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/>
+ </g>
+ <g style="fill: #e87f3a">
+ <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/>
+ </g>
+ <g style="fill: #ea8c4d">
+ <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/>
+ </g>
+ <g style="fill: #ec9961">
+ <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/>
+ </g>
+ <g style="fill: #eea575">
+ <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/>
+ </g>
+ <g style="fill: #f1b288">
+ <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/>
+ </g>
+ <g style="fill: #f3bf9c">
+ <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/>
+ </g>
+ <g style="fill: #f5ccb0">
+ <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/>
+ </g>
+ <g style="fill: #f8d8c4">
+ <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/>
+ </g>
+ <g style="fill: #fae5d7">
+ <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/>
+ </g>
+ <g style="fill: #fcf2eb">
+ <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/>
+ </g>
+ <g style="fill: #e5668c">
+ <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/>
+ </g>
+ <g style="fill: #b23259">
+ <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/>
+ </g>
+ <g style="fill: #a5264c">
+ <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/>
+ </g>
+ <g style="fill: #ff727f; stroke:#000000">
+ <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/>
+ </g>
+ <g style="fill: #cc3f4c">
+ <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/>
+ </g>
+ <g style="stroke:#a51926; stroke-width:2">
+ <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/>
+ </g>
+ <g style="fill: #b2b2b2">
+ <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/>
+ </g>
+ <g style="fill: #ea8e51">
+ <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/>
+ </g>
+ <g style="fill: #efaa7c">
+ <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/>
+ </g>
+ <g style="fill: #f4c6a8">
+ <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/>
+ </g>
+ <g style="fill: #f9e2d3">
+ <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/>
+ </g>
+ <g style="fill: #eb955c">
+ <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/>
+ </g>
+ <g style="fill: #f2b892">
+ <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/>
+ </g>
+ <g style="fill: #f8dcc8">
+ <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/>
+ </g>
+ <g style="fill: #323232">
+ <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/>
+ </g>
+ <g style="fill: #666666">
+ <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/>
+ </g>
+ <g style="fill: #999999">
+ <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/>
+ </g>
+ <g style="fill: #4c0000">
+ <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 9z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/>
+ </g>
+ <g style="fill: #e59999">
+ <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/>
+ </g>
+ <g style="fill: #b26565">
+ <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-89.25 169L-67.25 173.75"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/>
+ </g>
+</svg>
diff --git a/ksvg/test/tiger2.svg b/ksvg/test/tiger2.svg
new file mode 100644
index 00000000..1cb123e6
--- /dev/null
+++ b/ksvg/test/tiger2.svg
@@ -0,0 +1,725 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <g transform="translate(200,200)">
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172">
+ <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000">
+ <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/>
+ </g>
+ <g style="fill: #cc7226; stroke:#000000">
+ <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/>
+ </g>
+ <g style="fill: #e87f3a">
+ <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/>
+ </g>
+ <g style="fill: #ea8c4d">
+ <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/>
+ </g>
+ <g style="fill: #ec9961">
+ <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/>
+ </g>
+ <g style="fill: #eea575">
+ <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/>
+ </g>
+ <g style="fill: #f1b288">
+ <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/>
+ </g>
+ <g style="fill: #f3bf9c">
+ <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/>
+ </g>
+ <g style="fill: #f5ccb0">
+ <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/>
+ </g>
+ <g style="fill: #f8d8c4">
+ <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/>
+ </g>
+ <g style="fill: #fae5d7">
+ <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/>
+ </g>
+ <g style="fill: #fcf2eb">
+ <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/>
+ </g>
+ <g style="fill: #e5668c">
+ <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/>
+ </g>
+ <g style="fill: #b23259">
+ <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/>
+ </g>
+ <g style="fill: #a5264c">
+ <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/>
+ </g>
+ <g style="fill: #ff727f; stroke:#000000">
+ <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/>
+ </g>
+ <g style="fill: #cc3f4c">
+ <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/>
+ </g>
+ <g style="stroke:#a51926; stroke-width:2">
+ <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/>
+ </g>
+ <g style="stroke:#a5264c; stroke-width:2">
+ <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/>
+ </g>
+ <g style="fill: #b2b2b2">
+ <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/>
+ </g>
+ <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5">
+ <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/>
+ </g>
+ <g style="fill: #e5e5b2">
+ <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/>
+ </g>
+ <g style="fill: #ea8e51">
+ <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/>
+ </g>
+ <g style="fill: #efaa7c">
+ <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/>
+ </g>
+ <g style="fill: #f4c6a8">
+ <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/>
+ </g>
+ <g style="fill: #f9e2d3">
+ <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/>
+ </g>
+ <g style="fill: #eb955c">
+ <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/>
+ </g>
+ <g style="fill: #f2b892">
+ <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/>
+ </g>
+ <g style="fill: #f8dcc8">
+ <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/>
+ </g>
+ <g style="fill: #323232">
+ <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/>
+ </g>
+ <g style="fill: #666666">
+ <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/>
+ </g>
+ <g style="fill: #999999">
+ <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/>
+ </g>
+ <g style="fill: #cc7226">
+ <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/>
+ </g>
+ <g style="stroke:#4c0000; stroke-width:2">
+ <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/>
+ </g>
+ <g style="fill: #4c0000">
+ <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/>
+ </g>
+ <g style="fill: #99cc32">
+ <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/>
+ </g>
+ <g style="fill: #659900">
+ <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-65.4 9z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/>
+ </g>
+ <g style="fill: #e59999">
+ <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/>
+ </g>
+ <g style="fill: #b26565">
+ <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/>
+ </g>
+ <g style="fill: #ffffff">
+ <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/>
+ </g>
+ <g style="fill: #992600">
+ <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/>
+ </g>
+ <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1">
+ <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/>
+ </g>
+ <g style="fill: #000000">
+ <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/>
+ </g>
+ <g style="fill: #cccccc">
+ <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-89.25 169L-67.25 173.75"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/>
+ </g>
+ <g style="stroke:#000000">
+ <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/>
+ </g>
+</g>
+</svg>
+
diff --git a/ksvg/test/tigert.svg b/ksvg/test/tigert.svg
new file mode 100644
index 00000000..a8656d04
--- /dev/null
+++ b/ksvg/test/tigert.svg
@@ -0,0 +1,388 @@
+<svg width="20cm" height="20cm" >
+ <g id="g2072"
+ style="fill: #000000"> <path
+ d="M303.898 424.298C299.743 413.438 297.099 401.727 289.828 392.379C281.708 384.07 275.096 373.115 265.089 366.976C256.116 362.254 247.049 357.628 236.568 356.588C235.245 357.816 234.017 356.115 232.696 355.834C231.47 356.683 230.901 358.193 230.239 359.516L227.69 356.588C226.275 357.344 226.842 359.798 224.763 359.516C216.831 353.282 209.089 347.144 198.323 347.523C187.745 349.601 177.642 352.622 169.709 361.122C166.498 363.105 166.498 368.205 161.775 367.164C152.617 371.037 143.174 376.798 137.128 385.769C127.215 397.005 120.133 409.376 117.109 423.355C112.387 436.007 114.655 451.493 110.121 464.15C108.611 473.213 109.934 482.186 110.783 490.684C112.2 493.801 112.578 497.391 114.655 500.222C116.261 510.419 117.394 520.809 121.641 529.875C123.53 537.429 119.659 548.951 129.385 551.689C130.425 552.538 131.748 550.744 132.599 552.351C132.88 552.066 133.161 551.499 133.731 551.406C134.644 564.975 138.955 577.446 140.36 590.69C134.497 594.154 129.989 601.837 128.254 606.949C126.975 613.065 127.705 624.78 134.46 631.14C143.042 637.349 147.802 644.14 156.111 648.862C168.01 660.381 179.058 674.642 193.979 681.345C203.14 684.745 211.922 690.697 222.308 689.938C231.184 692.679 238.929 687.955 246.764 687.014C255.076 682.949 263.858 676.153 268.107 667.464C273.208 658.684 284.634 651.6 280.573 639.793C280.196 638.569 280.386 637.905 279.63 636.867C280.103 631.107 280.386 625.914 278.024 620.816C278.31 617.034 273.681 615.242 274.435 611.275C285.39 595.884 296.535 580.584 300.688 562.359C301.163 555.749 302.387 550.272 303.239 543.474C303.804 530.818 304.09 516.561 302.955 504.564L303.898 503.811C304.94 500.412 304.56 496.352 305.883 492.95C313.72 471.043 310.037 445.733 303.898 424.298z"
+ id="path2073">
+ </path>
+
+ </g>
+ <g
+ id="g2074"
+ style="fill: #e2c78c"> <path
+ d="M213.716 352.432C217.307 354.888 220.325 357.532 223.442 360.837C224.197 360.46 224.954 362.162 225.237 360.65L226.18 361.97C227.69 361.405 226.842 359.423 227.69 358.384C228.54 359.516 229.675 360.65 231.092 360.837C231.94 359.798 231.659 358.003 232.696 357.249C235.908 359.61 241.195 357.532 244.5 359.516C251.679 360.837 257.343 365.653 264.238 367.636C269.524 372.076 275.284 376.798 279.44 382.651C283.783 386.711 287.469 391.907 291.148 396.629C297.574 405.034 299.179 415.231 302.766 424.767C305.599 429.775 304.56 436.386 307.015 441.485C308.149 448.094 309.563 455.082 309.281 461.692L309.756 462.166C309.188 469.721 309.281 477.747 307.015 484.357C307.015 487.378 305.315 490.211 305.032 493.422C303.994 495.69 303.616 498.43 303.239 500.695C304.183 490.874 297.287 481.62 296.44 471.231C296.535 462.354 297.099 453.381 296.815 444.695C295.684 441.39 295.495 437.613 294.36 434.308C290.019 419.008 280.292 405.6 268.296 393.986C258.571 386.148 248.279 378.97 236.382 376.043C234.868 376.134 232.883 375.57 232.223 377.365C228.352 375.097 224.197 372.831 220.515 370.562C218.813 370.469 217.776 370.092 216.456 369.716C217.114 370.943 219.288 370.753 220.515 371.698C223.348 374.058 227.501 375.191 230.714 377.647C225.992 377.269 221.554 378.592 219.098 382.651C215.886 379.724 212.109 373.871 206.916 375.57C188.217 379.348 183.402 406.827 162.72 405.504C157.718 405.504 153.371 401.727 151.578 397.385C156.677 399.744 163.57 400.218 167.915 395.968C176.224 388.413 181.606 376.517 193.507 376.043C193.791 375.759 194.073 375.57 193.979 375.097C192.846 374.248 191.426 376.043 190.578 374.436C184.063 377.837 177.263 382.275 172.92 388.98C174.997 382.934 177.073 375.191 184.25 372.831C184.441 372.453 185.196 372.266 184.912 371.698C182.081 370.469 180.57 373.587 178.304 375.097C171.502 381.802 173.203 393.702 162.909 397.385C158.851 399.273 155.165 396.249 151.105 395.968C148.934 396.817 151.011 399.179 151.578 400.5L155.259 404.183L146.573 406.827C128.819 420.615 137.98 445.828 142.324 463.015C141.095 461.977 139.866 461.127 138.453 460.561C137.128 462.26 138.923 464.338 138.642 466.415C136.089 475.103 130.614 482.469 128.726 491.344C128.63 495.878 127.876 500.883 128.44 505.697C124.853 501.545 122.964 496.352 121.925 490.968C120.698 491.817 120.511 493.989 120.32 495.029C118.904 494.084 117.674 490.78 115.789 491.817C116.825 492.856 113.898 494.084 115.127 495.69C114.844 496.162 114.37 495.878 113.994 495.878C113.237 493.046 110.971 490.211 112.2 487.095C109.084 476.328 110.858 465.023 113.692 454.635C116.335 435.935 117.109 415.609 127.781 400.312C131.748 391.813 139.396 385.106 145.721 378.119C150.349 373.587 156.015 371.602 161.306 368.77L162.909 368.77C159.981 373.209 156.394 377.269 152.05 380.574C151.767 381.518 152.995 381.895 153.371 382.651C153.844 382.747 154.033 382.369 154.315 382.181L154.315 380.574C159.511 375.57 163.476 369.148 168.86 364.71C169.425 364.048 169.616 363.105 169.519 362.444C174.715 357.816 180 352.906 186.517 352.056C191.145 350.45 196.057 347.523 201.25 349.317C205.687 349.033 210.031 350.262 213.716 352.432z"
+ id="path2075">
+ </path>
+
+ </g>
+ <g
+ id="g2076"
+ style="fill: #000000"> <path
+ d="M207.768 359.234C208.521 359.704 209.653 359.423 210.503 359.516C210.503 360.178 209.466 360.366 208.9 360.837C205.309 359.516 200.496 360.837 197.188 358.856C189.068 356.966 182.647 363.388 177.642 366.976C181.419 360.744 187.369 356.401 194.166 355.172C199.076 356.306 203.894 356.21 207.768 359.234z"
+ id="path2077">
+ </path>
+
+ </g>
+ <g
+ id="g2078"
+ style="fill: #b6ab70"> <path
+ d="M201.439 357.44C202.478 358.1 203.799 358.003 204.648 359.045C200.021 359.234 195.489 356.588 190.767 357.912L184.722 360.65C186.517 358.193 189.257 357.722 191.523 356.306C194.263 356.588 198.417 356.401 201.439 357.44z"
+ id="path2079">
+ </path>
+
+ </g>
+ <g
+ id="g2080"
+ style="fill: #000000"> <path
+ d="M215.982 370.187C213.81 370.187 212.206 368.205 209.843 369.242C210.788 368.393 212.678 368.393 214.188 369.054C214.943 369.148 215.606 369.526 215.982 370.187z"
+ id="path2081">
+ </path>
+
+ </g>
+ <g
+ id="g2082"
+ style="fill: #b6ab70"> <path
+ d="M217.965 383.502C217.208 384.354 216.17 387.185 214.376 386.43C209.938 383.974 205.405 380.197 199.834 381.708L195.772 382.841C200.307 379.632 204.745 375.853 210.788 376.986C213.242 379.062 216.359 380.385 217.965 383.502z"
+ id="path2083">
+ </path>
+
+ </g>
+ <g
+ id="g2084"
+ style="fill: #edd6c9"> <path
+ d="M264.238 392.568L267.635 394.834C274.812 402.388 282.273 410.038 286.9 418.821C293.227 431.002 297.193 444.789 295.684 459.616C293.701 470.759 296.815 480.958 300.688 490.211C300.972 494.461 302.671 498.711 301.351 502.96C303.746 523.207 302.653 544.205 298.934 562.359C296.452 574.47 292.122 580.646 287.341 590.137C282.809 595.899 279.157 602.776 274.626 608.537C272.644 601.643 277.458 595.223 275.758 588.14L272.831 589.935C272.452 587.195 275.477 585.402 274.435 582.944L270.091 585.212C270.468 583.136 271.037 581.151 272.169 579.357C272.263 579.829 271.885 580.584 272.644 580.868C276.325 578.415 278.401 574.543 278.685 570.291C278.401 565.665 275.758 561.227 271.885 558.961C266.503 557.732 259.422 559.62 256.494 553.481C255.549 552.632 256.778 550.839 255.172 550.272C253.754 550.084 252.812 550.839 251.96 551.879C250.354 549.894 249.978 546.683 250.827 544.228C249.409 543.568 247.522 544.984 246.106 545.74C244.312 547.25 242.234 549.045 241.762 551.215C241.386 551.689 240.722 551.406 240.158 551.406L239.31 550.554C238.173 550.839 238.268 552.066 237.702 552.822C235.529 553.388 233.735 546.683 232.223 551.689L232.223 552.16C228.258 553.293 226.558 544.417 222.308 548.288C222.687 550.554 221.741 552.916 220.515 554.804C219.853 553.861 218.813 553.01 217.965 552.16C217.019 552.916 217.307 554.71 216.456 555.749C214.471 559.62 210.222 561.322 206.443 561.414C204.556 561.792 203.14 560.752 201.439 560.752C200.212 558.961 198.984 556.882 199.173 554.804C198.605 554.71 198.795 555.749 198.323 555.088C192.087 560.282 185.668 567.176 182.835 575.013C181.703 578.128 181.231 581.529 182.457 584.739L185.102 582.002C178.585 596.921 181.231 616.186 188.973 630.069L179.719 624.402C172.543 617.981 167.253 610.144 161.588 602.4C161.682 601.736 161.494 601.077 160.925 600.606C159.793 600.983 159.511 602.209 159.981 603.156C166.592 610.426 171.502 619.869 179.908 626.196C183.497 627.897 186.707 630.444 190.106 632.618C190.957 634.978 192.657 637.813 195.299 638.661C195.396 638.094 195.112 636.773 195.586 636.018C197.472 636.206 198.605 638.094 200.307 638.661C207.954 646.12 218.813 645.837 227.501 650.75C228.634 650.369 227.975 648.955 228.164 648.009C230.997 649.806 233.735 651.6 236.568 653.394L238.173 650.75L239.777 652.259C241.572 651.314 242.99 649.521 244.312 647.725C250.262 644.611 256.87 639.51 259.422 632.997C259.422 633.565 259.706 634.037 260.176 634.411C262.16 634.037 262.633 631.576 263.955 630.54C267.071 627.048 270.468 624.214 272.169 620.15C278.881 634.152 263.364 648.485 256.022 655.942C248.467 663.78 238.552 670.579 227.69 667.748C224.481 668.124 223.16 667.182 219.853 666.992C211.072 667.087 203.516 661.328 195.586 657.927C193.222 655.658 190.294 654.243 187.369 653.015C171.03 645.837 161.775 629.786 148.839 617.604C146.573 613.732 144.497 609.766 141.191 606.271C141.756 599.377 141.945 592.201 141.381 585.684C138.264 574.543 135.618 563.019 135.526 551.028C137.223 553.671 136.564 557.638 139.584 559.62C140.152 558.299 138.642 556.789 138.264 555.275C138.264 550.178 134.201 546.683 133.258 541.961C129.481 532.613 132.88 522.885 131.179 512.688C130.142 512.026 130.614 510.044 128.913 510.231C127.025 511.081 129.859 512.31 128.251 513.347C130.234 517.691 122.305 521.09 128.065 524.679C127.876 529.401 128.819 534.123 131.179 538.088C132.408 541.302 132.219 545.172 134.106 548.006C134.106 549.327 133.447 550.178 132.312 550.744C128.913 551.028 125.796 549.045 124.381 546.021C122.586 541.489 123.155 535.446 123.058 530.818C118.904 521.658 117.487 511.459 115.789 501.357C115.789 500.412 115.599 499.279 116.45 498.617C115.315 498.144 115.599 496.065 116.261 495.216C116.353 494.651 117.204 494.271 117.394 493.612C119.189 494.933 119.281 497.294 120.98 498.899C115.504 503.432 120.886 512.026 120.792 518.543C121.076 518.826 121.263 519.298 121.641 519.298L122.115 518.826C120.98 513.065 119.659 506.928 120.511 500.883C121.36 498.899 122.775 500.788 123.909 500.695C125.324 503.903 128.065 506.736 129.573 509.76C130.804 508.911 130.234 506.549 130.046 505.228C129.01 492.762 132.69 481.146 139.584 471.418L140.056 463.96L143.644 465.563C143.929 461.127 141.661 457.064 140.717 452.815C136.564 438.652 133.731 418.349 147.516 407.96C151.294 407.582 154.22 405.128 158.378 405.693C161.682 406.732 164.987 407.206 168.386 406.636C176.885 404.088 183.402 396.156 189.444 389.451C190.014 389.545 190.578 389.735 191.239 389.641C191.335 386.711 194.734 387.847 196.435 386.901C200.115 387.092 204.178 386.901 206.254 390.585C208.144 389.074 209.653 386.711 212.297 386.901C212.678 388.693 214.753 387.185 215.511 388.318C217.307 386.618 218.719 384.635 221.176 383.502C220.043 380.953 223.442 380.385 224.763 379.251C227.596 379.062 231.184 378.309 233.356 380.385C233.735 380.007 234.49 380.103 234.49 379.441C234.49 378.874 233.452 378.592 233.828 377.837C238.835 377.08 243.649 379.441 247.899 381.708C253.567 385.203 259.137 388.035 264.238 392.568z"
+ id="path2085">
+ </path>
+
+ </g>
+ <g
+ id="g2086"
+ style="fill: #b6ab70"> <path
+ d="M210.977 385.769C209.466 386.807 207.768 387.279 206.443 388.693C203.14 385.203 197.568 386.052 193.317 386.24C194.546 383.22 199.362 382.841 202.384 382.181C205.405 382.934 208.614 383.408 210.977 385.769z"
+ id="path2087">
+ </path>
+
+ </g>
+ <g
+ id="g2088"
+ style="fill: #000000"> <path
+ d="M212.771 419.102L212.771 419.576C208.994 418.443 205.217 418.725 200.967 419.294C200.776 419.198 200.307 418.537 200.776 418.159C204.837 417.688 208.806 418.063 212.771 419.102z"
+ id="path2089">
+ </path>
+
+ </g>
+ <g
+ id="g2090"
+ style="fill: #000000"> <path
+ d="M210.503 427.887L210.503 428.356C201.911 427.319 192.94 425.903 184.722 428.83C184.628 427.981 185.574 427.887 186.046 427.507C193.033 426.092 199.928 426.47 206.916 427.035L210.503 427.887z"
+ id="path2091">
+ </path>
+
+ </g>
+ <g
+ id="g2092"
+ style="fill: #000000"> <path
+ d="M226.842 441.957L226.842 442.429C218.53 444.036 212.206 438.652 204.178 439.691L204.648 438.842C212.583 438.462 219.098 442.429 226.842 441.957z"
+ id="path2093">
+ </path>
+
+ </g>
+ <g
+ id="g2094"
+ style="fill: #000000"> <path
+ d="M269.619 443.092L269.619 443.751C267.447 442.148 263.387 443.184 260.555 442.9C259.61 443.562 259.137 443.28 257.911 443.374C258.288 442.523 259.706 442.148 260.838 441.957C263.955 443.374 267.071 441.012 269.619 443.092z"
+ id="path2095">
+ </path>
+
+ </g>
+ <g
+ id="g2096"
+ style="fill: #000000"> <path
+ d="M207.768 444.223C217.87 446.771 230.524 449.323 240.158 444.695L241.291 444.695L241.291 445.166C238.647 446.112 236.001 447.812 233.168 447.906C223.063 449.984 213.337 445.074 203.234 445.166C194.354 442.9 185.384 445.45 176.981 447.906L174.715 449.039L174.902 448.094C184.347 444.885 195.207 441.767 205.781 444.695L207.768 444.223z"
+ id="path2097">
+ </path>
+
+ </g>
+ <g
+ id="g2098"
+ style="fill: #000000"> <path
+ d="M289.642 470.949C292.003 473.025 292.378 476.328 293.227 478.692C290.68 479.73 290.961 476.328 289.356 475.292C288.033 472.457 285.202 474.064 283.029 474.346C275.19 472.457 269.053 477.464 262.819 480.769L261.688 479.636C258.477 480.862 255.076 481.712 252.433 484.545C252.056 484.263 251.11 484.451 251.11 483.696L251.11 482.563C249.978 482.373 248.845 483.602 247.708 484.17C248.09 481.995 246.576 479.164 249.032 477.747C252.433 474.913 256.209 472.931 260.176 471.231L260.367 472.551C268.677 469.532 277.739 473.025 286.239 469.624C287.75 469.248 288.602 470.285 289.642 470.949z"
+ id="path2099">
+ </path>
+
+ </g>
+ <g
+ id="g2100"
+ style="fill: #777777"> <path
+ d="M290.488 473.971L291.148 475.765C289.735 474.631 288.791 472.457 286.616 472.363C282.179 474.913 275.57 471.798 271.037 475.103L263.575 479.354L262.16 478.504C258.665 479.541 255.265 480.958 252.244 483.225C252.056 482.563 252.621 481.62 251.772 481.146L248.845 482.091C248.183 480.674 248.94 478.692 250.354 477.747C252.998 475.574 255.833 474.064 258.761 472.837C258.571 473.401 257.815 473.783 258.099 474.631C259.61 475.007 260.648 473.121 262.16 473.025C265.653 473.309 269.147 471.514 272.169 472.837C278.685 474.064 285.958 466.793 290.488 473.971z"
+ id="path2101">
+ </path>
+
+ </g>
+ <g
+ id="g2102"
+ style="fill: #000000"> <path
+ d="M184.25 475.765C185.857 472.649 188.312 476.707 190.389 477.369C192.562 476.99 194.073 472.837 196.718 475.765C198.131 476.328 199.267 475.481 200.588 476.426C201.157 477.275 201.157 478.692 201.439 479.354C199.076 477.275 198.131 484.076 195.112 481.62C193.979 483.98 191.712 482.373 189.918 482.563C188.407 482.657 186.8 479.825 185.857 482.091C180.758 477.747 173.392 477.179 166.592 477.369C163.665 479.258 160.361 481.995 157.054 483.884L152.995 487.567C153.467 483.037 158.566 479.354 161.306 475.292C166.878 470.949 174.997 474.064 181.324 474.631L184.25 475.765z"
+ id="path2103">
+ </path>
+
+ </g>
+ <g
+ id="g2104"
+ style="fill: #777777"> <path
+ d="M183.308 476.614C184.347 476.14 185.384 477.747 186.046 476.236C188.217 476.426 189.444 479.541 191.9 478.219L194.166 475.952C195.772 476.99 197.852 476.707 199.643 477.085C199.267 478.692 197.852 480.391 196.435 480.958L195.299 479.354C193.791 479.636 194.453 481.712 192.846 482.091C190.578 481.43 187.839 481.808 186.235 479.354C183.402 480.486 180.662 477.464 177.453 477.559C172.92 476.802 167.253 474.913 163.57 478.219C163.005 479.825 161.398 479.73 160.173 480.486L155.259 484.357C156.677 482.091 159.793 478.504 162.437 475.765C164.326 475.858 165.933 474.064 167.915 473.971C172.637 475.197 178.868 474.064 183.308 476.614z"
+ id="path2105">
+ </path>
+
+ </g>
+ <g
+ id="g2106"
+ style="fill: #000000"> <path
+ d="M281.708 490.684C281.988 491.062 282.841 490.874 282.558 491.629C280.765 491.344 278.212 491.44 276.42 490.495C270.091 495.312 260.459 493.046 253.567 495.878C250.543 497.011 247.522 496.352 245.443 494.084C246.295 491.44 248.75 488.7 251.297 487.285C248.09 487.756 244.122 488.606 242.234 492.101C239.685 495.312 240.533 499.938 239.777 503.811C239.31 509.948 242.141 515.142 243.367 520.809C248.279 524.585 256.682 529.024 254.888 536.956C254.132 538.939 254.038 541.489 251.486 542.34C251.205 541.111 253.377 540.45 253.567 538.939C254.699 536.39 254.606 532.517 252.904 530.159C251.017 526.474 247.428 525.908 244.975 523.075C244.405 524.398 246.201 525.908 244.312 526.474C243.935 524.02 243.273 521.658 242.045 519.486C239.31 511.365 237.324 500.125 241.101 492.101C244.975 487.475 250.449 484.923 256.778 485.301C265.558 483.98 274.151 487.095 281.708 490.684z"
+ id="path2107">
+ </path>
+
+ </g>
+ <g
+ id="g2108"
+ style="fill: #ffffff"> <path
+ d="M261.688 488.228C261.688 489.08 260.555 489.268 259.894 489.549C258.947 490.022 259.042 488.796 258.571 488.418C258.383 487.095 259.987 487.946 260.367 487.095C261.026 487.002 261.5 487.756 261.688 488.228z"
+ id="path2109">
+ </path>
+
+ </g>
+ <g
+ id="g2110"
+ style="fill: #000000"> <path
+ d="M203.988 488.89C205.122 489.173 206.443 490.495 207.575 489.361C209.37 490.59 212.206 489.457 213.242 492.101C214.376 497.766 210.788 502.865 207.768 507.21C209.653 502.394 213.716 498.144 212.109 492.101C210.788 491.156 208.994 490.968 207.575 491.156C207.768 493.328 206.351 495.404 204.648 496.162C198.605 496.448 192.562 498.711 186.991 495.878C182.081 496.728 178.018 493.422 173.582 495.216C169.331 495.312 165.838 497.956 161.306 496.823C165.838 495.502 171.22 495.404 175.187 492.289C183.497 490.59 191.335 486.246 200.307 487.567C201.157 488.985 202.762 488.418 203.988 488.89z"
+ id="path2111">
+ </path>
+
+ </g>
+ <g
+ id="g2112"
+ style="fill: #dddddd"> <path
+ d="M274.909 490.022C271.885 491.344 269.053 493.14 265.558 493.234C266.032 491.344 267.635 489.08 266.032 487.285C269.147 487.756 271.793 489.361 274.909 490.022z"
+ id="path2113">
+ </path>
+
+ </g>
+ <g
+ id="g2114"
+ style="fill: #dddddd"> <path
+ d="M256.022 493.422C254.038 495.029 250.543 495.974 247.899 494.557C247.618 493.895 246.576 494.179 246.957 493.234C248.653 490.495 251.679 489.361 254.227 487.946C253.19 490.211 255.076 492.007 256.022 493.422z"
+ id="path2115">
+ </path>
+
+ </g>
+ <g
+ id="g2116"
+ style="fill: #dddddd"> <path
+ d="M206.254 491.344C205.973 492.856 205.5 494.461 203.988 495.216L202.102 495.69C203.423 495.029 204.272 493.707 204.178 492.289C204.272 491.817 204.084 491.44 203.704 491.156C201.816 491.344 202.854 493.612 201.25 494.084C198.417 494.651 195.868 495.878 193.317 495.216C194.263 493.895 194.263 492.101 194.166 490.211C197.472 488.512 200.399 489.741 203.234 490.211L206.254 491.344z"
+ id="path2117">
+ </path>
+
+ </g>
+ <g
+ id="g2118"
+ style="fill: #ffffff"> <path
+ d="M188.312 490.211C188.407 491.062 188.217 491.726 187.65 492.289C187.178 492.385 186.8 492.194 186.517 491.817C186.613 490.874 186.991 489.835 188.312 490.211z"
+ id="path2119">
+ </path>
+
+ </g>
+ <g
+ id="g2120"
+ style="fill: #dddddd"> <path
+ d="M179.719 492.289C179.247 492.762 179.53 493.518 179.437 494.084C178.207 493.989 177.073 493.328 175.847 493.895C176.51 492.95 178.304 492.575 179.719 492.289z"
+ id="path2121">
+ </path>
+
+ </g>
+ <g
+ id="g2122"
+ style="fill: #edd6c9"> <path
+ d="M123.058 498.899C120.886 499.279 121.454 496.255 121.641 495.029C121.925 496.448 122.775 497.484 123.058 498.899z"
+ id="path2123">
+ </path>
+
+ </g>
+ <g
+ id="g2124"
+ style="fill: #000000"> <path
+ d="M243.367 498.144C244.5 502.113 247.994 505.322 251.772 506.832C247.522 507.022 244.594 502.582 242.897 499.279L242.897 498.144L243.367 498.144z"
+ id="path2125">
+ </path>
+
+ </g>
+ <g
+ id="g2126"
+ style="fill: #ffffff"> <path
+ d="M129.859 513.633L130.046 514.292L129.859 513.633z"
+ id="path2127">
+ </path>
+
+ </g>
+ <g
+ id="g2128"
+ style="fill: #edd6c9"> <path
+ d="M130.046 532.423C128.251 529.024 131.936 523.734 127.781 521.752C127.403 519.77 129.197 518.069 130.046 516.275C130.708 520.902 129.764 527.797 130.046 532.423z"
+ id="path2129">
+ </path>
+
+ </g>
+ <g
+ id="g2130"
+ style="fill: #000000"> <path
+ d="M213.904 527.229C210.315 527.797 208.806 531.952 208.049 535.161C207.768 538.752 209.089 541.772 211.638 544.228C213.242 545.644 215.414 545.644 217.307 546.211L217.307 547.157C213.056 547.061 209.653 543.943 207.575 540.356C206.254 536.106 207.672 531.952 209.843 528.551C210.882 527.797 214.093 524.208 213.904 527.229z"
+ id="path2131">
+ </path>
+
+ </g>
+ <g
+ id="g2132"
+ style="fill: #000000"> <path
+ d="M146.195 531.479C145.158 541.302 147.233 551.499 151.389 560.091C146.101 552.16 144.497 541.489 145.721 531.479L146.195 531.479z"
+ id="path2133">
+ </path>
+
+ </g>
+ <g
+ id="g2134"
+ style="fill: #000000"> <path
+ d="M244.5 538.28C245.917 538.28 247.994 537.239 249.504 538.28C248.279 540.546 244.5 539.601 243.179 541.489C240.63 541.489 239.968 544.795 237.702 545.55C234.49 548.477 230.997 545.928 227.501 545.362C224.386 545.078 223.536 540.072 220.043 541.489C218.152 540.167 217.87 544.039 215.982 542.151C215.606 541.207 214.471 540.263 215.037 539.224C218.53 536.2 221.835 540.64 224.763 541.961C226.937 545.55 232.223 546.211 236.096 545.74C240.346 542.623 244.219 538.939 245.443 533.746L246.106 533.746L244.5 538.28z"
+ id="path2135">
+ </path>
+
+ </g>
+ <g
+ id="g2136"
+ style="fill: #000000"> <path
+ d="M289.356 560.752C288.129 557.921 289.735 554.992 289.828 552.16C290.584 549.139 290.868 545.74 292.757 543.474C291.245 548.571 290.112 555.088 289.356 560.752z"
+ id="path2137">
+ </path>
+
+ </g>
+ <g
+ id="g2138"
+ style="fill: #8e8e8e"> <path
+ d="M251.96 553.955L254.227 551.689C255.358 556.031 259.894 559.339 264.426 559.81C267.353 559.339 271.037 559.526 273.491 561.414C275.664 564.532 277.648 567.648 277.176 571.804C276.607 574.258 275.758 576.808 273.776 578.415C273.019 578.035 274.34 575.863 272.644 576.333C269.715 579.545 268.677 584.364 269.242 588.14C271.037 587.573 271.037 585.307 273.019 585.025C272.169 586.533 270.942 590.122 272.357 592.482L274.626 590.216C275.853 597.205 271.413 603.439 273.491 610.613C272.927 611.088 272.736 611.654 272.831 612.408C273.019 612.597 273.208 612.977 273.491 612.882C273.776 613.446 273.113 613.353 272.831 613.542C272.075 620.908 266.126 627.235 260.838 632.332C259.706 631.862 261.31 630.731 260.176 630.069C258.477 631.483 258.099 633.372 257.627 635.26C253.281 642.628 244.975 644.423 239.968 650.75L238.647 649.146C237.418 649.332 237.134 650.652 236.382 651.408C233.452 650.183 229.675 648.009 227.312 645.272C226.463 646.218 226.937 647.633 226.842 648.862C218.438 644.798 208.144 644.705 201.25 637.529C199.362 636.867 197.472 635.545 196.245 633.753C194.734 633.846 195.016 635.828 193.791 636.018C186.613 624.309 181.606 611.181 182.835 596.545C183.778 591.349 184.347 585.968 187.65 581.811C187.462 581.248 188.03 580.303 187.178 580.017C185.762 580.491 184.159 580.773 183.119 582.002C183.213 572.463 189.444 564.908 196.245 557.825L198.323 556.411C198.323 556.789 198.04 557.354 198.513 557.544L199.173 557.544C198.984 559.054 199.928 560.66 201.25 561.886C205.592 562.642 210.127 563.019 213.904 560.282C215.982 558.489 217.493 556.315 218.719 554.427C219.853 555.182 219.288 556.694 220.043 557.544C221.647 554.898 223.536 551.973 223.914 548.477C227.69 549.421 229.294 552.916 232.223 555.275C233.735 554.804 233.641 553.199 234.301 552.16C235.15 553.388 236.664 553.955 237.889 554.617C239.023 554.332 239.023 553.199 239.31 552.351C240.158 552.822 241.478 553.388 242.234 552.538C243.367 549.705 246.013 546.118 249.223 545.55C248.371 548.856 249.601 551.782 251.96 553.955z"
+ id="path2139">
+ </path>
+
+ </g>
+ <g
+ id="g2140"
+ style="fill: #000000"> <path
+ d="M262.16 563.868L261.026 566.42C258.854 564.813 255.457 566.608 252.621 565.759C251.486 566.043 250.639 563.211 249.978 565.003C250.449 565.665 249.978 566.42 249.504 566.895C247.808 566.988 246.485 565.853 245.161 565.003C244.69 566.136 244.312 567.176 243.839 568.213C242.705 568.403 241.386 567.932 240.158 567.741C238.552 564.436 237.324 568.213 235.623 568.877C234.397 569.252 234.775 567.741 234.113 567.271L229.769 569.348L229.294 570.009C228.731 569.348 229.203 568.119 228.445 567.554C225.705 570.385 221.271 570.291 217.776 571.614L217.587 568.877C213.527 572.369 208.144 572.463 203.704 575.013C202.949 573.787 204.648 572.653 203.704 571.424C203.649 571.502 203.595 571.589 203.541 571.671L203.541 571.524C200.425 573.223 195.299 577.184 193.979 580.491C193.883 582.85 192.087 585.684 193.791 587.667C194.64 585.59 195.396 583.418 197.188 581.623C198.131 581.057 199.267 580.303 200.307 580.681C200.307 582.472 200.212 584.457 201.25 585.684C201.911 585.212 202.194 584.173 203.045 583.606C204.272 581.435 206.632 582.286 208.71 582.002C208.427 584.832 208.144 588.612 209.843 591.067C210.599 589.651 210.977 588.045 212.109 586.817C213.148 588.14 213.43 590.404 215.321 590.878C216.831 589.273 218.152 585.872 220.703 586.346C222.215 588.516 224.009 591.635 227.031 591.54C228.731 592.013 230.239 590.878 231.374 589.555C231.659 590.404 232.412 591.067 233.356 591.067C239.777 588.328 246.957 589.651 252.433 584.739L253.754 587.953C257.154 588.801 259.61 591.729 263.292 591.54L263.575 590.69C262.254 588.421 260.555 585.968 260.555 583.418C261.875 584.457 264.048 584.929 265.558 584.081C266.503 581.905 264.897 579.545 265.089 577.09C264.993 575.863 263.67 574.919 263.955 573.88L266.692 573.692C267.353 572.182 265.94 570.67 266.692 569.158L267.164 570.291C268.107 569.915 267.259 568.877 267.827 568.403C269.999 568.119 271.603 569.726 272.644 571.143C272.644 564.719 263.575 570.103 262.16 563.868z"
+ id="path2141">
+ </path>
+
+ </g>
+ <g
+ id="g2142"
+ style="fill: #eca6a3"> <path
+ d="M257.44 566.895C252.433 570.952 246.764 573.692 240.63 575.013C236.096 576.526 231.847 574.258 227.312 574.352C224.009 575.013 221.176 573.219 217.965 573.219C220.703 570.952 224.954 571.33 227.975 569.348C228.352 570.198 228.071 571.33 229.107 571.804C230.147 569.822 231.659 571.897 232.979 571.804C237.134 571.71 242.141 571.614 245.161 568.403L245.443 566.895C247.049 567.271 248.75 568.877 250.354 567.741C250.924 565.288 254.227 567.46 255.833 567.082C256.4 567.082 256.778 566.702 257.44 566.895z"
+ id="path2143">
+ </path>
+
+ </g>
+ <g
+ id="g2144"
+ style="fill: #edd6c9"> <path
+ d="M242.045 569.158C240.253 569.822 238.552 570.573 236.382 570.291L238.363 568.027C239.685 568.119 240.441 569.726 242.045 569.158z"
+ id="path2145">
+ </path>
+
+ </g>
+ <g
+ id="g2146"
+ style="fill: #000000"> <path
+ d="M172.92 570.479C174.619 576.147 172.071 583.514 176.036 588.14C170.748 583.041 174.241 574.73 171.313 568.403C172.071 568.684 172.543 569.726 172.92 570.479z"
+ id="path2147">
+ </path>
+
+ </g>
+ <g
+ id="g2148"
+ style="fill: #eca6a3"> <path
+ d="M246.576 581.151C243.557 582.002 240.06 583.231 237.041 582.757C228.919 581.151 220.043 579.168 214.376 573.88C222.875 574.919 229.485 576.333 238.173 577.09C244.69 574.73 251.679 573.88 256.966 568.684C255.457 573.598 252.527 580.208 246.576 581.151z"
+ id="path2149">
+ </path>
+
+ </g>
+ <g
+ id="g2150"
+ style="fill: #edd6c9"> <path
+ d="M234.49 570.479C233.544 570.479 232.507 570.67 231.847 569.822C232.412 568.877 233.641 568.591 234.301 569.536C234.775 569.726 234.49 570.198 234.49 570.479z"
+ id="path2151">
+ </path>
+
+ </g>
+ <g
+ id="g2152"
+ style="fill: #eca6a3"> <path
+ d="M216.456 572.935C215.321 572.841 214.279 572.369 213.056 572.558C214.188 572.086 215.414 571.71 216.456 570.67L216.456 572.935z"
+ id="path2153">
+ </path>
+
+ </g>
+ <g
+ id="g2154"
+ style="fill: #000000"> <path
+ d="M228.826 598.812C228.634 600.699 228.164 603.909 229.294 605.798C230.524 603.909 232.883 601.549 234.963 601.077C235.245 602.4 234.207 604.289 234.49 605.798C236.001 605.987 236.757 603.156 238.647 603.53C238.268 606.365 236.282 609.671 237.702 612.882C238.739 615.715 239.115 618.928 240.911 621.474C236.664 618.928 237.889 613.353 236.382 609.198L237.515 604.948C236.282 605.233 235.057 607.027 234.49 608.347C233.641 606.933 233.356 604.57 233.828 602.682C231.94 602.965 230.428 604.948 229.959 606.933C230.239 607.498 229.675 607.782 229.578 608.065L229.107 608.065C228.164 605.328 226.937 601.736 228.445 598.812L228.826 598.812z"
+ id="path2155">
+ </path>
+
+ </g>
+ <g
+ id="g2156"
+ style="fill: #000000"> <path
+ d="M265.371 616.281C264.707 617.981 263.955 619.775 263.292 621.285C262.912 618.736 264.897 616.751 265.089 614.204C264.803 608.631 263.764 603.062 259.042 599.754L259.422 598.999C265.371 602.776 266.313 610.426 265.371 616.281z"
+ id="path2157">
+ </path>
+
+ </g>
+ <g
+ id="g2158"
+ style="fill: #000000"> <path
+ d="M226.558 599.282C220.043 605.609 216.644 613.826 218.248 623.08L219.098 623.93C219.002 624.402 218.53 624.119 218.248 624.214C217.307 623.178 216.737 621.474 217.307 620.344C216.831 612.502 220.515 605.328 225.705 599.282L226.558 599.282z"
+ id="path2159">
+ </path>
+
+ </g>
+ <g
+ id="g2160"
+ style="fill: #000000"> <path
+ d="M206.916 605.139C203.327 609.103 202.384 614.392 202.571 619.678L202.384 612.408C204.46 608.631 206.351 604.289 210.031 601.549C210.503 603.345 207.768 603.439 206.916 605.139z"
+ id="path2161">
+ </path>
+
+ </g>
+ <g
+ id="g2162"
+ style="fill: #000000"> <path
+ d="M250.354 608.065C250.924 610.048 251.394 612.597 250.827 614.485C250.543 611.088 249.693 607.216 247.428 604.948C249.317 604.854 249.693 606.933 250.354 608.065z"
+ id="path2163">
+ </path>
+
+ </g>
+ <g
+ id="g2164"
+ style="fill: #edd6c9"> <path
+ d="M265.497 572.982L262.478 572.791C262.194 572.886 261.627 573.266 261.817 573.738C264.46 576.381 265.405 580.063 264.364 583.652C262.569 584.03 261.154 583.275 259.832 582.52C258.89 583.182 259.832 584.218 259.832 585.069C261.438 586.864 261.249 588.94 261.817 590.922C259.267 590.17 256.623 588.658 254.545 587.052L254.828 586.393L253.695 585.919C251.239 583.463 255.204 581.858 255.961 579.782C255.773 579.402 255.393 579.686 255.017 579.591C251.428 586.864 243.778 588.089 236.697 588.847C235.279 589.32 233.39 590.829 232.163 589.601C230.843 585.731 229.235 592.342 226.685 590.735C224.514 590.735 223.099 588.658 221.682 587.052C220.737 586.58 221.682 585.164 221.022 584.786C218.378 585.258 216.394 587.997 214.504 589.792L214.033 589.32C212.806 588.185 213.274 585.919 212.238 585.069C211.766 586.58 210.16 587.619 209.499 589.13C208.461 586.864 209.026 583.369 209.499 580.916C206.1 581.199 203.362 581.009 201.093 583.937C199.866 582.615 201.472 581.292 201.379 579.782C198.829 579.309 195.715 581.102 194.107 582.991C194.019 579.076 199.398 575.568 202.461 573.121C201.981 574.338 201.788 575.754 202.228 577.136C205.251 575.626 208.084 572.323 211.766 573.925C219.037 580.16 229.142 583.275 238.963 584.125C243.401 582.52 248.785 583.087 252.275 579.119C256.055 575.72 255.961 570.338 259.362 567.127L261.154 568.259C262.004 567.882 261.627 567.033 262.098 566.467C263.043 567.6 265.122 567.789 266.16 568.921C264.177 569.677 266.067 571.849 265.497 572.982z"
+ id="path2165">
+ </path>
+
+ </g>
+ <g
+ id="g2166"
+ style="fill: #3c0300"> <path
+ d="M274.737 615.47C277.006 619.721 278.608 624.253 278.988 629.259C280.497 635.963 276.06 640.873 273.603 646.256C272.565 648.709 270.205 650.6 269.449 653.243L269.92 653.243C273.509 648.523 276.06 643.421 278.799 638.322L280.593 641.723C282.197 653.526 269.828 660.986 264.918 670.524C260.949 677.893 253.302 683.085 246.124 686.104C238.948 687.524 232.374 690.411 225.008 688.709C214.335 690.221 205.989 684.501 197.019 681.857C192.768 680.631 189.275 677.985 185.402 675.909C180.68 672.224 176.526 667.88 172.465 663.726C165.034 656.621 158.772 648.239 149.424 643.045C145.648 639.171 141.664 635.577 137.417 631.896C135.052 630.762 133.665 628.904 132.153 626.634C128.28 620.78 127.888 608.866 128.801 607.131C129.805 604.027 135.284 594.641 140.254 591.2C140.681 595.533 140.793 599.946 140.356 604.516L139.225 605.273C142.34 609.143 145.459 613.485 147.817 617.926C161.322 631.239 171.048 648.789 188.707 655.307C191.823 656.721 195.468 660.335 198.966 661.093C206.236 665.908 214.3 667.599 222.988 668.447C233.374 670.998 243.755 668.147 251.402 661.631C260.44 652.685 273.417 642.385 274.737 627.933C275.398 623.213 270.392 619.153 273.792 614.998L274.737 615.47z"
+ id="path2167">
+ </path>
+
+ </g>
+
+ </g>
+
+</svg>
diff --git a/ksvg/test/tux.svg b/ksvg/test/tux.svg
new file mode 100644
index 00000000..4b5981e1
--- /dev/null
+++ b/ksvg/test/tux.svg
@@ -0,0 +1,298 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG August 1999//EN"
+"http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
+<svg
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/Graphics/SVG/SVG-19991203.dtd"
+ width = "595.7"
+ height = "841.89"
+ sodipodi:docname="/home/lauris/src/sodipodi/samples/tux.svg"
+ sodipodi:docbase="/home/lauris/src/sodipodi/samples/"
+ transform="matrix (1.0 0.0 0.0 -1.0 0.0 841.889764)"
+ id="svg2">
+ <g id="g3"> <path
+ transform="matrix(1.000000 0.000000 0.000000 1.000000 -188.771027 11.293993)"
+ id="path4"
+ style="stroke-width:1; stroke:none; fill-opacity:100%; fill:#ffffff; "
+ d="M 344.427 534.692 L 396.057 616.976 L 463.014 650.858 L 564.66 617.783 L 625.97 522.591 L 619.517 433.852 L 569.5 322.526 L 546.106 278.157 L 421.065 279.77 L 414.611 317.686 L 371.049 391.096 L 342.007 470.961 L 344.427 534.692 z ">
+ </path>
+ <g
+ transform="matrix(1.000000 0.000000 0.000000 1.000000 107.656192 -154.860742)"
+ id="g5"> <g
+ id="g6"
+ style="fill: #c1c1bf"> <path
+ id="path7"
+ d="M329.336 727.552C315.224 726.328 304.136 715.816 303.128 694.936C306.368 639.496 309.608 582.112 271.232 545.104C265.256 499.024 244.016 482.104 234.008 452.512L218.24 441.208L237.104 411.688L245.168 411.904L323.936 571.168L340.424 651.448L329.336 727.552z">
+ </path>
+
+ </g>
+ <g
+ id="g8"
+ style="fill: #c1c1bf"> <path
+ id="path9"
+ d="M136.232 439.696C133.856 455.248 132.56 470.512 134.792 485.272C118.376 507.592 105.92 530.128 104.48 553.312C92.024 586.504 62.432 614.584 67.544 680.104C84.176 697.456 107.432 713.584 127.376 730.36C152.432 751.312 137.528 778.96 102.248 772.408C94.4 763.768 76.616 709.624 42.92 676.288L49.544 632.584L81.368 547.408L120.968 484.048L125.36 456.688L119.816 386.776L124.424 361.216L136.232 439.696L136.232 439.696z">
+ </path>
+
+ </g>
+ <g
+ id="g10"
+ style="fill: #c1c1bf"> <path
+ id="path11"
+ d="M115.64 341.416C116.576 336.376 117.8 331.624 119.312 327.16L121.688 342.784L115.64 341.416z">
+ </path>
+
+ </g>
+ <g
+ id="g12"
+ style="fill: #c1c1bf"> <path
+ id="path13"
+ d="M120.968 500.464C108.368 523.792 103.976 546.256 132.92 550.216C117.008 553.888 97.208 568.648 77.192 593.488L77.624 543.016L101.456 503.272L120.968 500.464z">
+ </path>
+
+ </g>
+ <g
+ id="g14"
+ style="fill: #c1c1bf"> <path
+ id="path15"
+ d="M-33.256 818.488C10.52 838.144 41.408 837.064 69.272 850.96C91.304 862.552 113.552 861.184 126.944 847.144C138.32 832.456 146.744 831.736 163.52 830.224C190.952 828.568 217.736 828.28 241.928 830.8L269.576 833.032C269.072 864.064 328.04 867.88 345.392 844.336C366.344 819.424 395.144 808.264 419.84 790.192L289.304 725.536C255.824 806.464 131.048 827.632 113.768 763.264L-33.256 818.488z">
+ </path>
+
+ </g>
+ <g
+ id="g16"
+ style="fill: #c1c1bf"> <path
+ id="path17"
+ d="M286.424 711.568C273.824 711.496 260.936 715.6 261.944 732.16L266.192 776.44L304.424 756.64L286.424 711.568z">
+ </path>
+
+ </g>
+ <g
+ id="g18"
+ style="fill: #000000"> <path
+ id="path19"
+ d="M-37.36 821.224C7.136 840.88 38.6 839.728 66.968 853.696C89.36 865.216 111.968 863.92 125.648 849.808C137.24 835.192 145.808 834.472 162.872 832.96C190.736 831.232 218.024 831.016 242.648 833.464L270.728 835.768C270.224 866.8 330.272 870.544 347.912 847C369.224 822.088 398.528 811 423.656 792.856L290.816 728.272C256.76 809.128 129.824 830.296 112.256 766L-37.36 821.224z">
+ </path>
+
+ </g>
+ <g
+ id="g20"
+ style="fill: #b77200"> <path
+ id="path21"
+ d="M382.328 691.984C403.64 698.968 389.888 720.28 400.76 732.52C405.44 742.888 415.304 752.032 431.792 760.528C459.368 774.424 426.248 799.336 392.768 812.08C351.944 825.616 344.024 862.912 299.312 851.896C283.112 846.496 278.36 831.808 278.864 809.128C284.264 762.76 277.784 730.432 278.792 698.824C278.72 686.152 283.544 684.64 307.232 687.952C310.04 726.328 352.376 727.336 382.328 691.984z">
+ </path>
+
+ </g>
+ <g
+ id="g22"
+ style="fill: #f2b700"> <path
+ id="path23"
+ d="M339.632 826.624C371.6 814.312 403.856 798.112 429.848 782.128C437.84 777.448 438.92 765.928 427.688 762.328C403.352 748.504 390.104 731.224 392.912 708.76C393.344 700.912 383.696 692.56 381.104 700.048C359.864 771.472 291.32 767.656 300.752 696.952C301.256 694.864 301.76 692.776 302.264 690.76C289.952 688.24 285.2 690.976 285.776 700.408L295.28 806.608C297.656 830.8 317.312 836.128 339.632 826.624z">
+ </path>
+
+ </g>
+ <g
+ id="g24"
+ style="fill: #000000"> <path
+ id="path25"
+ d="M354.464 537.544C379.16 569.8 404.432 651.088 384.416 691.552C360.944 737.776 307.808 743.248 305.504 695.8C308.816 639.64 311.984 581.536 273.68 544.096C267.704 497.368 246.392 480.232 236.384 450.28L203.12 426.088L133.568 435.088C130.76 452.152 129.104 468.784 131.552 484.912C115.064 507.376 102.608 530.056 101.168 553.312C88.712 586.648 59.12 614.944 64.232 680.752C80.864 698.248 104.12 714.448 124.064 731.296C149.12 752.392 135.512 776.296 100.232 769.672C78.848 746.056 56.744 722.872 35.288 699.328C12.392 683.056 3.896 662.176 27.368 630.496C43.424 609.04 47.96 562.456 62 543.664C74.312 525.16 92.24 508.6 105.272 490.096C112.184 477.928 114.344 468.568 113.264 454.456L110.312 369.136C108.368 307.216 142.424 274.24 189.8 275.248C243.512 275.752 287.576 312.472 288.152 378.28C292.688 410.32 283.256 428.68 308.672 474.472C334.52 522.712 338.552 520.12 354.464 537.544z">
+ </path>
+
+ </g>
+ <g
+ id="g26"
+ style="fill: #c1c1bf"> <path
+ id="path27"
+ d="M261.296 503.632L263.528 512.2C257.696 501.688 250.712 483.616 241.928 475.696C239.264 473.536 235.808 473.608 233.72 475.624C222.056 486.928 193.112 510.112 169.928 507.088C152.072 505.288 134.648 493.264 130.832 480.232C128.816 470.872 129.752 463.168 130.976 455.32L240.704 453.52C238.472 463.168 253.088 487 261.296 503.632z">
+ </path>
+
+ </g>
+ <g
+ id="g28"
+ style="fill: #c1c1bf"> <path
+ id="path29"
+ d="M143.144 363.232C154.088 363.232 163.88 376.84 163.808 395.632C163.736 408.232 155.528 411.472 149.336 417.016C146.6 419.536 145.952 433.144 142.568 433.144C131.696 433.144 123.488 413.776 123.488 395.632C123.488 377.56 132.272 363.232 143.144 363.232z">
+ </path>
+
+ </g>
+ <g
+ id="g30"
+ style="fill: #ffffff"> <path
+ id="path31"
+ d="M144.368 375.04C154.088 375.04 160.856 379.936 161.648 391.312C162.224 399.16 160.136 411.76 154.664 414.424C152.144 415.648 143.432 426.664 140.408 426.52C128.096 425.944 125 402.112 125.936 390.736C126.8 379.36 134.72 375.04 144.368 375.04z">
+ </path>
+
+ </g>
+ <g
+ id="g32"
+ style="fill: #000000"> <path
+ id="path33"
+ d="M141.848 382.672C148.544 382.096 154.736 389.728 155.6 399.664C156.464 409.6 151.64 418.24 144.944 418.816C138.248 419.392 132.056 411.76 131.192 401.752C130.328 391.816 135.152 383.248 141.848 382.672z">
+ </path>
+
+ </g>
+ <g
+ id="g34"
+ style="fill: #c1c1bf"> <path
+ id="path35"
+ d="M151.064 397.288C151.424 399.088 149.408 400.024 148.832 398.224C148.256 395.992 146.888 393.328 145.088 391.168C143.936 389.872 145.088 388.432 146.528 389.44C149.048 391.528 150.488 394.12 151.064 397.288z">
+ </path>
+
+ </g>
+ <g
+ id="g36"
+ style="fill: #c1c1bf"> <path
+ id="path37"
+ d="M216.944 360.712C232.712 360.712 245.6 377.416 245.6 397.792C245.6 418.24 232.712 434.872 216.944 434.872C201.176 434.872 188.432 418.24 188.432 397.792C188.432 377.416 201.176 360.712 216.944 360.712z">
+ </path>
+
+ </g>
+ <g
+ id="g38"
+ style="fill: #ffffff"> <path
+ id="path39"
+ d="M224.792 374.968C235.664 378.856 241.928 387.424 242.72 396.568C243.656 407.08 239.408 418.96 230.264 425.944C227.672 427.888 197.72 416.08 195.992 411.616C193.4 405.208 191.816 392.896 193.76 385.624C194.552 382.744 197.216 378.568 201.176 376.336C207.44 372.808 216.656 372.088 224.792 374.968z">
+ </path>
+
+ </g>
+ <g
+ id="g40"
+ style="fill: #000000"> <path
+ id="path41"
+ d="M216.872 380.944C225.584 380.944 232.712 389.296 232.712 399.448C232.712 409.672 225.584 418.024 216.872 418.024C208.16 418.024 201.032 409.672 201.032 399.448C201.032 389.296 208.16 380.944 216.872 380.944z">
+ </path>
+
+ </g>
+ <g
+ id="g42"
+ style="fill: #c1c1bf"> <path
+ id="path43"
+ d="M227.096 392.392C228.104 394.048 226.448 395.776 225.224 394.12C223.784 392.104 221.408 389.944 218.888 388.432C217.232 387.568 217.808 385.624 219.68 386.2C222.92 387.28 225.368 389.368 227.096 392.392z">
+ </path>
+
+ </g>
+ <g
+ id="g44"
+ style="fill: #b77200"> <path
+ id="path45"
+ d="M164.96 404.488C172.376 402.328 184.112 403.048 192.248 404.632C200.384 406.792 222.056 418.24 245.024 430.696C247.976 432.208 248.84 437.104 245.024 438.688C239.12 439.12 249.272 453.664 238.904 458.848C223.352 462.88 198.44 485.992 186.128 487.864C179.288 489.376 172.232 489.592 164.6 487.864C140.552 482.968 134.216 455.608 122.912 450.064C119.816 446.824 121.4 441.208 122.408 440.056C123.632 434.224 149.696 406.216 164.96 404.488z">
+ </path>
+
+ </g>
+ <g
+ id="g46"
+ style="fill: #f2b700"> <path
+ id="path47"
+ d="M185.408 405.856C198.44 407.296 226.088 423.928 239.408 430.624C242.72 432.424 242.504 437.824 239.552 438.688C236.384 440.488 235.448 438.256 232.928 437.896C228.896 435.736 222.272 440.92 217.016 444.88C186.704 467.776 180.656 465.256 156.176 462.664C147.68 460.576 142.136 457.984 139.688 455.968C141.488 445.888 160.496 407.656 166.76 406.792C168.344 404.704 179.936 404.632 185.408 405.856z">
+ </path>
+
+ </g>
+ <g
+ id="g48"
+ style="fill: #b77200"> <path
+ id="path49"
+ d="M190.664 412.048L193.76 413.416C196.064 414.712 193.256 418.168 190.736 417.088L186.2 415.504C183.536 413.272 186.704 410.104 190.664 412.048z">
+ </path>
+
+ </g>
+ <g
+ id="g50"
+ style="fill: #b77200"> <path
+ id="path51"
+ d="M268.568 452.368C273.032 454.384 279.224 457.192 282.536 460.144C285.488 464.104 286.784 468.064 286.424 472.024C285.776 474.544 284.12 476.344 281.24 477.424C277.856 478.216 273.68 477.424 271.376 474.112C269.864 471.448 265.256 462.16 263.96 460.576C262.232 457.12 261.944 454.456 262.88 452.368C264.032 451.288 266.048 451 268.568 452.368z">
+ </path>
+
+ </g>
+ <g
+ id="g52"
+ style="fill: #c1c1bf"> <path
+ id="path53"
+ d="M273.752 461.584C275.48 462.376 277.928 463.456 279.224 464.68C280.376 466.264 280.88 467.776 280.736 469.36C280.52 470.296 279.8 471.016 278.72 471.448C277.352 471.808 275.768 471.448 274.832 470.152C274.256 469.144 272.456 465.472 271.952 464.824C271.232 463.456 271.088 462.448 271.448 461.584C271.952 461.152 272.744 461.08 273.752 461.584z">
+ </path>
+
+ </g>
+ <g
+ id="g54"
+ style="fill: #b77200"> <path
+ id="path55"
+ d="M238.616 358.552C239.048 359.2 238.976 359.776 238.4 360.28C237.896 360.784 237.176 360.712 236.24 360.208L231.632 356.248C231.056 355.744 230.912 354.952 231.272 354.088C232.28 353.44 233.144 353.44 233.936 354.088L238.616 358.552z">
+ </path>
+
+ </g>
+ <g
+ id="g56"
+ style="fill: #b77200"> <path
+ id="path57"
+ d="M235.592 305.992C239.624 308.224 240.848 313.912 238.184 318.592C235.592 323.2 230.12 325.144 226.016 322.84C221.984 320.536 220.76 314.92 223.424 310.24C226.016 305.56 231.488 303.688 235.592 305.992z">
+ </path>
+
+ </g>
+ <g
+ id="g58"
+ style="fill: #b77200"> <path
+ id="path59"
+ d="M374.912 680.536C378.296 683.128 373.256 687.376 371.024 686.296C369.152 685.648 367.784 683.488 366.92 682.408C366.128 681.184 366.2 679.168 366.92 678.448C367.712 677.44 369.728 677.656 371.024 678.52C372.32 679.168 373.616 679.888 374.912 680.536z">
+ </path>
+
+ </g>
+ <g
+ id="g60"
+ style="fill: #b77200"> <path
+ id="path61"
+ d="M297.44 551.512C338.984 572.896 350 611.56 332.072 664.192C330.992 666.64 334.16 668.368 335.24 666.064C354.824 610.336 341.432 571.312 299.024 548.56C296.864 547.552 295.28 550.432 297.44 551.512z">
+ </path>
+
+ </g>
+ <g
+ id="g62"
+ style="fill: #b77200"> <path
+ id="path63"
+ d="M72.008 569.512C38.312 627.256 38.096 662.68 62.504 681.328C63.728 682.264 64.448 680.032 63.296 679.168C36.296 655.48 48.896 615.52 74.168 570.88C74.888 569.584 72.512 568.432 72.008 569.512z">
+ </path>
+
+ </g>
+ <g
+ id="g64"
+ style="fill: #c1c1bf"> <path
+ id="path65"
+ d="M289.376 586.864C289.232 589.168 288.368 589.528 286.424 587.368C279.8 575.848 235.088 551.44 213.344 548.704C209.24 547.264 209.456 545.392 213.488 544.816C229.184 544.816 241.28 537.904 254.96 537.904C258.704 538.048 262.304 539.488 264.392 541.648C269.504 544.96 288.08 570.592 289.376 586.864z">
+ </path>
+
+ </g>
+ <g
+ id="g66"
+ style="fill: #c1c1bf"> <path
+ id="path67"
+ d="M180.152 546.832C180.872 550.792 163.808 545.68 164.744 556.696C165.032 559.72 160.496 561.376 160.64 556.696C160.64 548.272 161.072 548.416 152.72 546.832C151.208 546.76 151.352 544.528 152.72 544.816L152.72 544.816C158.696 546.472 166.76 542.872 166.4 538.84C166.256 537.472 168.56 537.688 168.488 538.84C167.984 545.248 181.664 542.152 180.152 546.832z">
+ </path>
+
+ </g>
+ <g
+ id="g68"
+ style="fill: #c1c1bf"> <path
+ id="path69"
+ d="M151.568 705.376C151.64 708.328 148.76 707.68 148.544 705.592C140.192 680.536 143.72 618.832 151.856 598.96C152.432 596.08 156.248 596.944 155.744 598.96C147.104 635.464 147.248 673.048 151.568 705.376z">
+ </path>
+
+ </g>
+ <g
+ id="g70"
+ style="fill: #b77200"> <path
+ id="path71"
+ d="M51.704 684.424C75.68 707.824 91.376 743.248 114.632 775.288C148.472 816.04 121.472 858.304 66.464 845.56C38.888 835.192 -0.784 836.344 -32.68 825.832C-55.072 820.36 -55.864 809.272 -44.416 787.6C-40.384 773.776 -40.024 751.312 -43.768 732.592C-45.784 718.408 -39.232 710.488 -24.112 708.832L-24.112 708.832C-11.296 708.688 6.56 713.872 16.28 686.44C23.552 673.336 40.976 672.976 51.704 684.424z">
+ </path>
+
+ </g>
+ <g
+ id="g72"
+ style="fill: #f2b700"> <path
+ id="path73"
+ d="M24.632 699.04C23.84 680.968 39.32 677.296 49.688 688.312C68.192 710.992 85.112 736.048 100.376 764.992C124.712 804.16 104.624 842.68 67.904 828.064C49.688 817.84 6.128 813.304 -17.344 809.128C-33.04 807.832 -35.128 797.608 -29.152 791.848C-20.944 782.416 -20.08 759.808 -27.856 740.512C-35.56 728.56 -21.088 715.384 -9.712 720.856C0.8 727.048 25.64 713.08 24.632 699.04z">
+ </path>
+
+ </g>
+
+ </g>
+
+ </g>
+
+</svg>
diff --git a/ksvg/test/tux2.svg b/ksvg/test/tux2.svg
new file mode 100644
index 00000000..7c43187f
--- /dev/null
+++ b/ksvg/test/tux2.svg
@@ -0,0 +1,287 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG August 1999//EN"
+"http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
+<svg
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/Graphics/SVG/SVG-19991203.dtd"
+ width = "595.7"
+ height = "841.89"
+ sodipodi:docname="/home/lauris/src/sodipodi/samples/tux.svg"
+ sodipodi:docbase="/home/lauris/src/sodipodi/samples/"
+ transform="matrix (1.0 0.0 0.0 -1.0 0.0 841.889764)"
+ id="svg2">
+ <g
+ id="g6"
+ style="fill: #c1c1bf"> <path
+ id="path7"
+ d="M329.336 727.552C315.224 726.328 304.136 715.816 303.128 694.936C306.368 639.496 309.608 582.112 271.232 545.104C265.256 499.024 244.016 482.104 234.008 452.512L218.24 441.208L237.104 411.688L245.168 411.904L323.936 571.168L340.424 651.448L329.336 727.552z">
+ </path>
+
+ </g>
+ <g
+ id="g8"
+ style="fill: #c1c1bf"> <path
+ id="path9"
+ d="M136.232 439.696C133.856 455.248 132.56 470.512 134.792 485.272C118.376 507.592 105.92 530.128 104.48 553.312C92.024 586.504 62.432 614.584 67.544 680.104C84.176 697.456 107.432 713.584 127.376 730.36C152.432 751.312 137.528 778.96 102.248 772.408C94.4 763.768 76.616 709.624 42.92 676.288L49.544 632.584L81.368 547.408L120.968 484.048L125.36 456.688L119.816 386.776L124.424 361.216L136.232 439.696L136.232 439.696z">
+ </path>
+
+ </g>
+ <g
+ id="g10"
+ style="fill: #c1c1bf"> <path
+ id="path11"
+ d="M115.64 341.416C116.576 336.376 117.8 331.624 119.312 327.16L121.688 342.784L115.64 341.416z">
+ </path>
+
+ </g>
+ <g
+ id="g12"
+ style="fill: #c1c1bf"> <path
+ id="path13"
+ d="M120.968 500.464C108.368 523.792 103.976 546.256 132.92 550.216C117.008 553.888 97.208 568.648 77.192 593.488L77.624 543.016L101.456 503.272L120.968 500.464z">
+ </path>
+
+ </g>
+ <g
+ id="g14"
+ style="fill: #c1c1bf"> <path
+ id="path15"
+ d="M-33.256 818.488C10.52 838.144 41.408 837.064 69.272 850.96C91.304 862.552 113.552 861.184 126.944 847.144C138.32 832.456 146.744 831.736 163.52 830.224C190.952 828.568 217.736 828.28 241.928 830.8L269.576 833.032C269.072 864.064 328.04 867.88 345.392 844.336C366.344 819.424 395.144 808.264 419.84 790.192L289.304 725.536C255.824 806.464 131.048 827.632 113.768 763.264L-33.256 818.488z">
+ </path>
+
+ </g>
+ <g
+ id="g16"
+ style="fill: #c1c1bf"> <path
+ id="path17"
+ d="M286.424 711.568C273.824 711.496 260.936 715.6 261.944 732.16L266.192 776.44L304.424 756.64L286.424 711.568z">
+ </path>
+
+ </g>
+ <g
+ id="g18"
+ style="fill: #000000"> <path
+ id="path19"
+ d="M-37.36 821.224C7.136 840.88 38.6 839.728 66.968 853.696C89.36 865.216 111.968 863.92 125.648 849.808C137.24 835.192 145.808 834.472 162.872 832.96C190.736 831.232 218.024 831.016 242.648 833.464L270.728 835.768C270.224 866.8 330.272 870.544 347.912 847C369.224 822.088 398.528 811 423.656 792.856L290.816 728.272C256.76 809.128 129.824 830.296 112.256 766L-37.36 821.224z">
+ </path>
+
+ </g>
+ <g
+ id="g20"
+ style="fill: #b77200"> <path
+ id="path21"
+ d="M382.328 691.984C403.64 698.968 389.888 720.28 400.76 732.52C405.44 742.888 415.304 752.032 431.792 760.528C459.368 774.424 426.248 799.336 392.768 812.08C351.944 825.616 344.024 862.912 299.312 851.896C283.112 846.496 278.36 831.808 278.864 809.128C284.264 762.76 277.784 730.432 278.792 698.824C278.72 686.152 283.544 684.64 307.232 687.952C310.04 726.328 352.376 727.336 382.328 691.984z">
+ </path>
+
+ </g>
+ <g
+ id="g22"
+ style="fill: #f2b700"> <path
+ id="path23"
+ d="M339.632 826.624C371.6 814.312 403.856 798.112 429.848 782.128C437.84 777.448 438.92 765.928 427.688 762.328C403.352 748.504 390.104 731.224 392.912 708.76C393.344 700.912 383.696 692.56 381.104 700.048C359.864 771.472 291.32 767.656 300.752 696.952C301.256 694.864 301.76 692.776 302.264 690.76C289.952 688.24 285.2 690.976 285.776 700.408L295.28 806.608C297.656 830.8 317.312 836.128 339.632 826.624z">
+ </path>
+
+ </g>
+ <g
+ id="g24"
+ style="fill: #000000"> <path
+ id="path25"
+ d="M354.464 537.544C379.16 569.8 404.432 651.088 384.416 691.552C360.944 737.776 307.808 743.248 305.504 695.8C308.816 639.64 311.984 581.536 273.68 544.096C267.704 497.368 246.392 480.232 236.384 450.28L203.12 426.088L133.568 435.088C130.76 452.152 129.104 468.784 131.552 484.912C115.064 507.376 102.608 530.056 101.168 553.312C88.712 586.648 59.12 614.944 64.232 680.752C80.864 698.248 104.12 714.448 124.064 731.296C149.12 752.392 135.512 776.296 100.232 769.672C78.848 746.056 56.744 722.872 35.288 699.328C12.392 683.056 3.896 662.176 27.368 630.496C43.424 609.04 47.96 562.456 62 543.664C74.312 525.16 92.24 508.6 105.272 490.096C112.184 477.928 114.344 468.568 113.264 454.456L110.312 369.136C108.368 307.216 142.424 274.24 189.8 275.248C243.512 275.752 287.576 312.472 288.152 378.28C292.688 410.32 283.256 428.68 308.672 474.472C334.52 522.712 338.552 520.12 354.464 537.544z">
+ </path>
+
+ </g>
+ <g
+ id="g26"
+ style="fill: #c1c1bf"> <path
+ id="path27"
+ d="M261.296 503.632L263.528 512.2C257.696 501.688 250.712 483.616 241.928 475.696C239.264 473.536 235.808 473.608 233.72 475.624C222.056 486.928 193.112 510.112 169.928 507.088C152.072 505.288 134.648 493.264 130.832 480.232C128.816 470.872 129.752 463.168 130.976 455.32L240.704 453.52C238.472 463.168 253.088 487 261.296 503.632z">
+ </path>
+
+ </g>
+ <g
+ id="g28"
+ style="fill: #c1c1bf"> <path
+ id="path29"
+ d="M143.144 363.232C154.088 363.232 163.88 376.84 163.808 395.632C163.736 408.232 155.528 411.472 149.336 417.016C146.6 419.536 145.952 433.144 142.568 433.144C131.696 433.144 123.488 413.776 123.488 395.632C123.488 377.56 132.272 363.232 143.144 363.232z">
+ </path>
+
+ </g>
+ <g
+ id="g30"
+ style="fill: #ffffff"> <path
+ id="path31"
+ d="M144.368 375.04C154.088 375.04 160.856 379.936 161.648 391.312C162.224 399.16 160.136 411.76 154.664 414.424C152.144 415.648 143.432 426.664 140.408 426.52C128.096 425.944 125 402.112 125.936 390.736C126.8 379.36 134.72 375.04 144.368 375.04z">
+ </path>
+
+ </g>
+ <g
+ id="g32"
+ style="fill: #000000"> <path
+ id="path33"
+ d="M141.848 382.672C148.544 382.096 154.736 389.728 155.6 399.664C156.464 409.6 151.64 418.24 144.944 418.816C138.248 419.392 132.056 411.76 131.192 401.752C130.328 391.816 135.152 383.248 141.848 382.672z">
+ </path>
+
+ </g>
+ <g
+ id="g34"
+ style="fill: #c1c1bf"> <path
+ id="path35"
+ d="M151.064 397.288C151.424 399.088 149.408 400.024 148.832 398.224C148.256 395.992 146.888 393.328 145.088 391.168C143.936 389.872 145.088 388.432 146.528 389.44C149.048 391.528 150.488 394.12 151.064 397.288z">
+ </path>
+
+ </g>
+ <g
+ id="g36"
+ style="fill: #c1c1bf"> <path
+ id="path37"
+ d="M216.944 360.712C232.712 360.712 245.6 377.416 245.6 397.792C245.6 418.24 232.712 434.872 216.944 434.872C201.176 434.872 188.432 418.24 188.432 397.792C188.432 377.416 201.176 360.712 216.944 360.712z">
+ </path>
+
+ </g>
+ <g
+ id="g38"
+ style="fill: #ffffff"> <path
+ id="path39"
+ d="M224.792 374.968C235.664 378.856 241.928 387.424 242.72 396.568C243.656 407.08 239.408 418.96 230.264 425.944C227.672 427.888 197.72 416.08 195.992 411.616C193.4 405.208 191.816 392.896 193.76 385.624C194.552 382.744 197.216 378.568 201.176 376.336C207.44 372.808 216.656 372.088 224.792 374.968z">
+ </path>
+
+ </g>
+ <g
+ id="g40"
+ style="fill: #000000"> <path
+ id="path41"
+ d="M216.872 380.944C225.584 380.944 232.712 389.296 232.712 399.448C232.712 409.672 225.584 418.024 216.872 418.024C208.16 418.024 201.032 409.672 201.032 399.448C201.032 389.296 208.16 380.944 216.872 380.944z">
+ </path>
+
+ </g>
+ <g
+ id="g42"
+ style="fill: #c1c1bf"> <path
+ id="path43"
+ d="M227.096 392.392C228.104 394.048 226.448 395.776 225.224 394.12C223.784 392.104 221.408 389.944 218.888 388.432C217.232 387.568 217.808 385.624 219.68 386.2C222.92 387.28 225.368 389.368 227.096 392.392z">
+ </path>
+
+ </g>
+ <g
+ id="g44"
+ style="fill: #b77200"> <path
+ id="path45"
+ d="M164.96 404.488C172.376 402.328 184.112 403.048 192.248 404.632C200.384 406.792 222.056 418.24 245.024 430.696C247.976 432.208 248.84 437.104 245.024 438.688C239.12 439.12 249.272 453.664 238.904 458.848C223.352 462.88 198.44 485.992 186.128 487.864C179.288 489.376 172.232 489.592 164.6 487.864C140.552 482.968 134.216 455.608 122.912 450.064C119.816 446.824 121.4 441.208 122.408 440.056C123.632 434.224 149.696 406.216 164.96 404.488z">
+ </path>
+
+ </g>
+ <g
+ id="g46"
+ style="fill: #f2b700"> <path
+ id="path47"
+ d="M185.408 405.856C198.44 407.296 226.088 423.928 239.408 430.624C242.72 432.424 242.504 437.824 239.552 438.688C236.384 440.488 235.448 438.256 232.928 437.896C228.896 435.736 222.272 440.92 217.016 444.88C186.704 467.776 180.656 465.256 156.176 462.664C147.68 460.576 142.136 457.984 139.688 455.968C141.488 445.888 160.496 407.656 166.76 406.792C168.344 404.704 179.936 404.632 185.408 405.856z">
+ </path>
+
+ </g>
+ <g
+ id="g48"
+ style="fill: #b77200"> <path
+ id="path49"
+ d="M190.664 412.048L193.76 413.416C196.064 414.712 193.256 418.168 190.736 417.088L186.2 415.504C183.536 413.272 186.704 410.104 190.664 412.048z">
+ </path>
+
+ </g>
+ <g
+ id="g50"
+ style="fill: #b77200"> <path
+ id="path51"
+ d="M268.568 452.368C273.032 454.384 279.224 457.192 282.536 460.144C285.488 464.104 286.784 468.064 286.424 472.024C285.776 474.544 284.12 476.344 281.24 477.424C277.856 478.216 273.68 477.424 271.376 474.112C269.864 471.448 265.256 462.16 263.96 460.576C262.232 457.12 261.944 454.456 262.88 452.368C264.032 451.288 266.048 451 268.568 452.368z">
+ </path>
+
+ </g>
+ <g
+ id="g52"
+ style="fill: #c1c1bf"> <path
+ id="path53"
+ d="M273.752 461.584C275.48 462.376 277.928 463.456 279.224 464.68C280.376 466.264 280.88 467.776 280.736 469.36C280.52 470.296 279.8 471.016 278.72 471.448C277.352 471.808 275.768 471.448 274.832 470.152C274.256 469.144 272.456 465.472 271.952 464.824C271.232 463.456 271.088 462.448 271.448 461.584C271.952 461.152 272.744 461.08 273.752 461.584z">
+ </path>
+
+ </g>
+ <g
+ id="g54"
+ style="fill: #b77200"> <path
+ id="path55"
+ d="M238.616 358.552C239.048 359.2 238.976 359.776 238.4 360.28C237.896 360.784 237.176 360.712 236.24 360.208L231.632 356.248C231.056 355.744 230.912 354.952 231.272 354.088C232.28 353.44 233.144 353.44 233.936 354.088L238.616 358.552z">
+ </path>
+
+ </g>
+ <g
+ id="g56"
+ style="fill: #b77200"> <path
+ id="path57"
+ d="M235.592 305.992C239.624 308.224 240.848 313.912 238.184 318.592C235.592 323.2 230.12 325.144 226.016 322.84C221.984 320.536 220.76 314.92 223.424 310.24C226.016 305.56 231.488 303.688 235.592 305.992z">
+ </path>
+
+ </g>
+ <g
+ id="g58"
+ style="fill: #b77200"> <path
+ id="path59"
+ d="M374.912 680.536C378.296 683.128 373.256 687.376 371.024 686.296C369.152 685.648 367.784 683.488 366.92 682.408C366.128 681.184 366.2 679.168 366.92 678.448C367.712 677.44 369.728 677.656 371.024 678.52C372.32 679.168 373.616 679.888 374.912 680.536z">
+ </path>
+
+ </g>
+ <g
+ id="g60"
+ style="fill: #b77200"> <path
+ id="path61"
+ d="M297.44 551.512C338.984 572.896 350 611.56 332.072 664.192C330.992 666.64 334.16 668.368 335.24 666.064C354.824 610.336 341.432 571.312 299.024 548.56C296.864 547.552 295.28 550.432 297.44 551.512z">
+ </path>
+
+ </g>
+ <g
+ id="g62"
+ style="fill: #b77200"> <path
+ id="path63"
+ d="M72.008 569.512C38.312 627.256 38.096 662.68 62.504 681.328C63.728 682.264 64.448 680.032 63.296 679.168C36.296 655.48 48.896 615.52 74.168 570.88C74.888 569.584 72.512 568.432 72.008 569.512z">
+ </path>
+
+ </g>
+ <g
+ id="g64"
+ style="fill: #c1c1bf"> <path
+ id="path65"
+ d="M289.376 586.864C289.232 589.168 288.368 589.528 286.424 587.368C279.8 575.848 235.088 551.44 213.344 548.704C209.24 547.264 209.456 545.392 213.488 544.816C229.184 544.816 241.28 537.904 254.96 537.904C258.704 538.048 262.304 539.488 264.392 541.648C269.504 544.96 288.08 570.592 289.376 586.864z">
+ </path>
+
+ </g>
+ <g
+ id="g66"
+ style="fill: #c1c1bf"> <path
+ id="path67"
+ d="M180.152 546.832C180.872 550.792 163.808 545.68 164.744 556.696C165.032 559.72 160.496 561.376 160.64 556.696C160.64 548.272 161.072 548.416 152.72 546.832C151.208 546.76 151.352 544.528 152.72 544.816L152.72 544.816C158.696 546.472 166.76 542.872 166.4 538.84C166.256 537.472 168.56 537.688 168.488 538.84C167.984 545.248 181.664 542.152 180.152 546.832z">
+ </path>
+
+ </g>
+ <g
+ id="g68"
+ style="fill: #c1c1bf"> <path
+ id="path69"
+ d="M151.568 705.376C151.64 708.328 148.76 707.68 148.544 705.592C140.192 680.536 143.72 618.832 151.856 598.96C152.432 596.08 156.248 596.944 155.744 598.96C147.104 635.464 147.248 673.048 151.568 705.376z">
+ </path>
+
+ </g>
+ <g
+ id="g70"
+ style="fill: #b77200"> <path
+ id="path71"
+ d="M51.704 684.424C75.68 707.824 91.376 743.248 114.632 775.288C148.472 816.04 121.472 858.304 66.464 845.56C38.888 835.192 -0.784 836.344 -32.68 825.832C-55.072 820.36 -55.864 809.272 -44.416 787.6C-40.384 773.776 -40.024 751.312 -43.768 732.592C-45.784 718.408 -39.232 710.488 -24.112 708.832L-24.112 708.832C-11.296 708.688 6.56 713.872 16.28 686.44C23.552 673.336 40.976 672.976 51.704 684.424z">
+ </path>
+
+ </g>
+ <g
+ id="g72"
+ style="fill: #f2b700"> <path
+ id="path73"
+ d="M24.632 699.04C23.84 680.968 39.32 677.296 49.688 688.312C68.192 710.992 85.112 736.048 100.376 764.992C124.712 804.16 104.624 842.68 67.904 828.064C49.688 817.84 6.128 813.304 -17.344 809.128C-33.04 807.832 -35.128 797.608 -29.152 791.848C-20.944 782.416 -20.08 759.808 -27.856 740.512C-35.56 728.56 -21.088 715.384 -9.712 720.856C0.8 727.048 25.64 713.08 24.632 699.04z">
+ </path>
+
+ </g>
+
+
+</svg>
diff --git a/ksvg/test/xlink.svg b/ksvg/test/xlink.svg
new file mode 100644
index 00000000..452eaa44
--- /dev/null
+++ b/ksvg/test/xlink.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN"
+ "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
+<svg width="5cm" height="5cm">
+ <desc>Link test
+ </desc>
+ <a xlink:href="http://www.w3.org">
+ <ellipse cx="2.5cm" cy="1.5cm" rx="2cm" ry="1cm" fill="red" />
+
+ <circle cx="1.5cm" cy="0.5cm" r="0.5cm" fill="green"/>
+ </a>
+</svg>
+