--- In [email protected], "Sayed Arian Kooshesh" <[EMAIL PROTECTED]> wrote: > > can you show me an example?
Here is a simple example <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <title>bounding box example</title> <script type="text/ecmascript"><![CDATA[ function showBoundingBox (element) { var boundingBox; if (typeof element.getBBox != 'undefined') { boundingBox = element.getBBox(); var rect = element.ownerDocument.createElementNS('http://www.w3.org/2000/svg', 'rect'); rect.setAttributeNS(null, 'x', boundingBox.x); rect.setAttributeNS(null, 'y', boundingBox.y); rect.setAttributeNS(null, 'width', boundingBox.width); rect.setAttributeNS(null, 'height', boundingBox.height); rect.setAttributeNS(null, 'fill', 'lightblue'); element.parentNode.insertBefore(rect, element); } } ]]></script> <path onclick="showBoundingBox(evt.target);" d="M 100 100 L 120 120 L 140 100" fill="none" stroke="green" stroke-width="3" /> </svg> Works for me with Firefox 1.5, Opera 9, both with native SVG support, with IE 6 with Adobe SVG viewer 3.0, and with Batik squiggle viewer 1.6 ----- 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/ <*> 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/

