lack of a convert SVGElement.convertClientXY() or equivalent

There was a fairly confusing thread last month (http://lists.w3.org/Archives/Public/www-svg/2002Jan/0018.html) about the client coordinates reported by MouseEvent's, particularly for hybrid XHTML/SVG documents.

A quick review of the corresponding sections in the SVG 1.1 Last Call indicates that one half of what I consider a solution to the problem was addressed in the draft.  clientX and clientY coordinates are now expressed in terms of the DOM implementation's client space, instead of having a different coordinate space for events over SVG elements and those over XHTML elements.

However, the other half of the solution, a standard reliable mechanism for converting client coordinates into user units, did not appear to be addressed.  My suggestion was something like adding:

interface SVGElement {
    SVGPoint convertClientXY(float clientX, float clientY)
}

which would return you the equivalent point in the user coordinate space (before any transforms introduced on the element).  Such a method would be immediately useful for existing SVG script authors since doing that transformation currently requires knowing way too much about the rendering enviroment and constraining the document so that client area has fixed dimensions.  Attempting to do the conversion without assistance from the implementation for a hybrid XHTML and SVG document would appear to be intractable.

Received on Friday, 15 February 2002 14:45:40 UTC