Faisal Javeed schrieb:

> Yes the getBoundingBox does not works. The ellipse below was rotated 12
> degrees, if u rotate it 45 degrees then the bounding box is no longer a
> tight bounding.
> Is there anywork around / algo for calculating the bounding box of a
> rotated ellipse correctly.


no, sorry i dont know how to calculate it correctly, but if you encode 
your ellipse like this,

<path d="M0 0A50 20 45 0 0 100 100 A50 20 45 0 0 0 0" />

the bounding  Box is calculated correctly in ASV. here is again the 
complete test.


<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg";
 xmlns:xlink="http://www.w3.org/1999/xlink"; viewBox="0 0 1024 768" 
onclick="init()">
<script>
function init(){
re=document.getElementById("re")
box=document.getElementById("e").getBBox()
re.setAttribute("x",box.x)
re.setAttribute("y",box.y)
re.setAttribute("width",box.width)
re.setAttribute("height",box.height)
}
</script>
<g id="e">

<path d="M0 0A50 20 45 0 0 100 100 A50 20 45 0 0 0 0" />

</g>
<rect id="re" x="0" y="0" width="100" height="100" fill="none" 
stroke="red"/>
</svg>

hth
Holger


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hjic2j8/M=362329.6886308.7839368.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1124115135/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

-----
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/
 


Reply via email to