[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/khtml-svg
From:       Nikolas Zimmermann <wildfox () kde ! org>
Date:       2006-03-30 20:05:03
Message-ID: 1143749103.839838.23251.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 524623 by wildfox:

Add full linear & radial gradient support. Everything working quite nice.

(Though there is still a problem with getElementById which prevents it
to work out-of-the-box. I have a hacky local patch workarounding the
ElementMappingCache for now - I'll investigate now how to fix properly!)


 M  +3 -2      svg/Makefile.am  
 A             svg/SVGGradientElementImpl.cpp   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGGradientElementImpl.h   [License: LGPL (v2+) (wrong address)]
 M  +7 -0      svg/SVGLengthImpl.h  
 A             svg/SVGLinearGradientElementImpl.cpp   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGLinearGradientElementImpl.h   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGRadialGradientElementImpl.cpp   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGRadialGradientElementImpl.h   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGStopElementImpl.cpp   [License: LGPL (v2+) (wrong address)]
 A             svg/SVGStopElementImpl.h   [License: LGPL (v2+) (wrong address)]
 M  +19 -1     xml/dom_docimpl.cpp  


--- branches/work/khtml-svg/svg/Makefile.am #524622:524623
@@ -27,6 +27,7 @@
 						 SVGPathSegCurvetoQuadraticImpl.cpp SVGPathSegCurvetoQuadraticSmoothImpl.cpp \
 						 SVGPathSegLinetoHorizontalImpl.cpp SVGPathSegLinetoVerticalImpl.cpp \
 						 SVGPathSegLinetoImpl.cpp SVGPathSegMovetoImpl.cpp SVGPathElementImpl.cpp \
-						 SVGSwitchElementImpl.cpp SVGSymbolElementImpl.cpp \
-						 SVGDOMImplementationImpl.cpp \
+						 SVGSwitchElementImpl.cpp SVGSymbolElementImpl.cpp SVGStopElementImpl.cpp \
+						 SVGGradientElementImpl.cpp SVGLinearGradientElementImpl.cpp \
+						 SVGRadialGradientElementImpl.cpp SVGDOMImplementationImpl.cpp \
 						 svgpathparser.cpp KSVGPainterFactory.cpp
--- branches/work/khtml-svg/svg/SVGLengthImpl.h #524622:524623
@@ -47,6 +47,13 @@
 		SVG_LENGTHTYPE_PT			= 9,
 		SVG_LENGTHTYPE_PC			= 10
 	};
+
+	enum SVGUnitTypes
+	{
+		SVG_UNITTYPE_UNKNOWN			= 0,
+		SVG_UNITTYPE_USERSPACEONUSE		= 1,
+		SVG_UNITTYPE_OBJECTBOUNDINGBOX	= 2
+	};
 	
     class SVGLengthImpl : public khtml::Shared<SVGLengthImpl>
     {
--- branches/work/khtml-svg/xml/dom_docimpl.cpp #524622:524623
@@ -88,6 +88,7 @@
 #if SVG_SUPPORT
 #include "svg/SVGGElementImpl.h"
 #include "svg/SVGSVGElementImpl.h"
+#include "svg/SVGStopElementImpl.h"
 #include "svg/SVGDefsElementImpl.h"
 #include "svg/SVGDescElementImpl.h"
 #include "svg/SVGRectElementImpl.h"
@@ -100,6 +101,8 @@
 #include "svg/SVGEllipseElementImpl.h"
 #include "svg/SVGPolygonElementImpl.h"
 #include "svg/SVGPolylineElementImpl.h"
+#include "svg/SVGLinearGradientElementImpl.h"
+#include "svg/SVGRadialGradientElementImpl.h"
 #endif
 
 using namespace DOM;
@@ -1011,7 +1014,7 @@
 #if SVG_SUPPORT
 ElementImpl *DocumentImpl::createSVGElement( const DOMString &name )
 {
-    uint id = khtml::getTagID( name.string().lower().toLatin1().constData(), name.string().length() );
+    uint id = khtml::getTagID( name.string().toLatin1().constData(), name.string().length() );
 
     ElementImpl *n = 0;
     switch(id)
@@ -1086,6 +1089,21 @@
             n = new KSVG::SVGDefsElementImpl(docPtr());
             break;
         }
+        case SVGID_STOP:
+        {
+            n = new KSVG::SVGStopElementImpl(docPtr());
+            break;
+        }
+        case SVGID_LINEARGRADIENT:
+        {
+            n = new KSVG::SVGLinearGradientElementImpl(docPtr());
+            break;
+        }
+        case SVGID_RADIALGRADIENT:
+        {
+            n = new KSVG::SVGRadialGradientElementImpl(docPtr());
+            break;
+        }
         default:
             break;
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic