vhardy 2003/07/01 06:27:26 Modified: test-resources/org/apache/batik/dom unitTesting.xml sources/org/apache/batik/dom/svg AbstractSVGPathSegList.java Added: test-resources/org/apache/batik/dom bug20332.svg Log: Fixed bug 20332 Revision Changes Path 1.13 +2 -1 xml-batik/test-resources/org/apache/batik/dom/unitTesting.xml Index: unitTesting.xml =================================================================== RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/dom/unitTesting.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- unitTesting.xml 30 Jun 2003 15:04:44 -0000 1.12 +++ unitTesting.xml 1 Jul 2003 13:27:26 -0000 1.13 @@ -20,6 +20,7 @@ class="org.apache.batik.dom.EcmaScriptDOMTest"> <test id="bug18143" /> <test id="bug20331" /> + <test id="bug20332" /> </testGroup> <!-- ========================================================================== --> 1.1 xml-batik/test-resources/org/apache/batik/dom/bug20332.svg Index: bug20332.svg =================================================================== <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- ========================================================================= --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software License --> <!-- version 1.1, a copy of which has been included with this distribution in --> <!-- the LICENSE file. --> <!-- ========================================================================= --> <!-- ========================================================================= --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: bug20332.svg,v 1.1 2003/07/01 13:27:26 vhardy Exp $ --> <!-- ========================================================================= --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:test="http://xml.apache.org/batik/test" width="350" height="350" onload="runTest(evt)" > <test:testResult id="testResult" result="failed" code="invalid.path.seg.value"/> <script type="text/ecmascript"><![CDATA[ var testNS = "http://xml.apache.org/batik/test"; var svgNS = "http://www.w3.org/2000/svg"; function runTest() { var result = document.getElementById("testResult"); var p = document.getElementById("path"); if (p == null) { return; } var psl = p.pathSegList; if (psl == null) { return; } if (psl.numberOfItems != 3) { result.setAttributeNS(null, "code", "wrong.number.of.path.seg"); return; } var ps = psl.getItem(0); if (ps == null || ps.pathSegType != 2) { result.setAttributeNS(null, "code", "wrong.first.seg.type.0.M.vs." + ps.pathSegType); return; } ps = psl.getItem(1); if (ps == null || ps.pathSegType != 16) { result.setAttributeNS(null, "code", "wrong.first.seg.type.1.S.vs." + ps.pathSegType); return; } if (ps.x2 != 1 || ps.y2 != 2 || ps.x != 3 || ps.y != 4) { result.setAttributeNS(null, "code", "wrong.x2.1.vs." + ps.x2 + " or y2.2.vs." + ps.y2 + " or x.3.vs." + ps.x + " or y.4.vs." + ps.y); return; } ps.x2 = 10; ps.y2 = 20; ps.x = 30; ps.y = 40; if (ps.x2 != 10 || ps.y2 != 20 || ps.x != 30 || ps.y != 40) { result.setAttributeNS(null, "code", "wrong.x2.10.vs." + ps.x2 + " or y2.20.vs." + ps.y2 + " or x.30.vs." + ps.x + " or y.40.vs." + ps.y); return; } ps = psl.getItem(2); if (ps == null || ps.pathSegType != 1) { result.setAttributeNS(null, "code", "wrong.first.seg.type.2.Z.vs." + ps.pathSegType); return; } var t = document.getElementById("text"); t.setAttributeNS(null, "fill", "#0F0"); result.setAttributeNS(null, "result", "passed"); } ]]></script> <text id="text" x="50%" y="50%" text-anchor="middle" fill="red">This string is red if test failed, green otherwise</text> <path d="M 0 0 S 1 2 3 4 Z" id="path"/> </svg> 1.5 +2 -2 xml-batik/sources/org/apache/batik/dom/svg/AbstractSVGPathSegList.java Index: AbstractSVGPathSegList.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/svg/AbstractSVGPathSegList.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AbstractSVGPathSegList.java 30 Jun 2003 15:04:44 -0000 1.4 +++ AbstractSVGPathSegList.java 1 Jul 2003 13:27:26 -0000 1.5 @@ -801,7 +801,7 @@ } public void setX2(float x2){ - this.x1 = x2; + this.x2 = x2; resetAttribute(); } public void setY2(float y2){
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]