Very curious. I was surprised, since I believed Opera handled arcs okay. I did a different test: Adding the path to the document directly rather than through script, and then interrogating the path afterwards
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" onload="startup(evt)" > <script> <![CDATA[ function startup(evt){ G=document.getElementById("green") alert(G.getAttributeNS(null,"d")) R=G.cloneNode("false") R.setAttributeNS(null,"fill","red") document.documentElement.appendChild(R) alert(R.getAttributeNS(null,"d")) } //]]> </script> <path d="M100 100 A 30,50 0 0,0 200,150 z" id="green" fill="#080" stroke="#8f8" stroke-width="5" /> </svg> reveals just what you'd expect -- the "d" attribute for "green" has the same value as declared in Opera. But if we take the object, and clone it as above, then Opera does convert the path to Beziers just as you've written. IE and FF do not do this. Interesting. David ----- Original Message ----- From: brucerindahl To: [email protected] Sent: Tuesday, April 03, 2007 2:35 PM Subject: [svg-developers] Does Opera support SVG arc commands in paths? I have been testing some scripts to input paths to an SVG display. These paths include arc commands. The path is added to the DOM in the following fashion: var parcel = SVGDoc.getElementById("newParcel"); var n_path = SVGDoc.createElementNS("http://www.w3.org/2000/svg","path"); n_path.setAttribute("d","M -0.63 -189.43 l 101.32 -139.25 -7.93 -50.31 120.03 -0.16 a 500 500 0 0 0 -213.09 292.84 l -0.33 -103.12 " ); n_path.setAttribute("id","testParcel" ); parcel.appendChild(n_path); When this is completed as a test to debug I run: alert(SVGDoc.getElementById("testParcel").getAttributeNS(null,"d"); For IE7 and Firefox I get: "M -0.63 -189.43 l 101.32 -139.25 -7.93 -50.31 120.03 -0.16 a 500 500 0 0 0 -213.09 292.84 l -0.33 -103.12 " But for Opera I get: "M -0.63 -189.43 L 100.69 -328.68L 92.76 -378.99L 212.79 -379.15C 107.661 -311.595 31.6402 -207.122 -0.299988 -86.31C -0.299988 -86.31 -0.299988 -86.31 -0.299988 -86.31C -0.299988 -86.31 -0.299988 -86.31 -0.299988 -86.31C -0.299988 -86.31 -0.299988 -86.31 -0.299988 -86.31L -0.629988 -189.43" From the results it looks like Opera does not store arcs in path data but instead approximates the arc using multiple Bezier curves. Can someone confirm this and if true when will Opera support true arcs? Thanks Bruce Rindahl [Non-text portions of this message have been removed] ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

