Me again, Just for other's info, if you're inlining SVG in an XHTML host document, Gecko (Firefox, Camino, etc) does getScreenCTM() correctly, taking into account that the outermost svg element itself might be offset somewhere in the page. Opera 9, however, doesn't take into account the outermost svg element's offset. This is an easy fix to take into account, but still a hassle to deal with. I'll report a bug on it soon.
Also, it seems that WebKit nightlies (which do render SVG rather nicely) don't support any of these (or any of the SVG DOM at all). -Jason Davis --- In [email protected], "jookeda" <[EMAIL PROTECTED]> wrote: > > Ah, very useful indeed! I had just discovered getTransformToElement() > almost immediately after posting, but getScreenCTM() is even more to > the point. > > Thanks, > Jason Davis > > --- In [email protected], "Andreas Neumann" <neumann@> > wrote: > > > > Hi Jason, > > > > have you looked at .getScreenCTM()? > > > > see also thread starting at > > http://groups.yahoo.com/group/svg-developers/message/55566 > > > > Note that ASV3 does not implement it, there you have to use a > workaround which is > > explained in the above mentioned thread. All other viewers implement > .getScreenCTM() > > > > Hope this helps, > > Andreas > > > > --- In [email protected], "jookeda" <jookeda@> wrote: > > > > > > I don't suppose there is something in the SVG spec I overlooked that > > > would allow me to translate/position elements via coordinates which > > > are relative to either the outermost document or the outermost svg > > > viewport? > > > > > > What I have currently is an recurrence upward from the element I want > > > to position, accumulating all of the transforms and new viewports into > > > one single transformation matrix, which I can then send > > > clientX/clientY coordinates (e.g. pixels of the rendering) and get the > > > userspace coordinates I want out. > > > > > > Alternatively, I could do some sort of 2D bisection method with > > > checkIntersection() to get the upper-left coordinate in initial > > > viewport coordinates, translate by (1,1), and repeat to figure out the > > > transform, though I feel that is a little more expensive than > > > iterating and multiplying the transforms (not to mention extremely > > > more hackish). > > > > > > Thanks, > > > Jason Davis > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Protect your PC from spy ware with award winning anti spy technology. It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- 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/

