- From: Cameron McCormack <cam@mcc.id.au>
- Date: Mon, 14 Dec 2009 20:40:59 +1100
- To: Erik Dahlstrom <ed@opera.com>
- Cc: public-svg-wg@w3.org
Hi Erik. Erik Dahlstrom: > I've tested Batik 1.7 and Opera 10.10, and it seems like "initial > coordinate system" from the definitions of the above methods may > have been interpreted differently. Opera expects the rectangle that > is passed in to be in initial viewport coordinates[1], so to pass > the test the coordinates that are given in the test (which seem to > be in user units) need to be transformed first. The test works fine > if and only if the userspace coordinate system matches the initial > viewport coordinate system, or in other words when the computed size > of the svg image matches the viewBox. If loading the svg file > separately in Opera it fails because the two coordinate spaces > usually don't match. Do you have an opinion on whether the initial viewport coordinate system or the initial user coordinate system makes more sense? IMO, the latter does, since that’s the coordinate system that graphics elements are in. > Batik seems to not honor the 'pointer-events' property when > considering which elements to return, while Opera does. That is a bug, I suppose. (Although it would be good for the spec to state explicitly what honouring means, here.) > The test has a <g> element that has visibility="hidden" and it expects > the elements inside to be intersected. This is not the case unless e.g > pointer-events="painted" is specified. Ah. > Opera expects the elements to be within the viewport, while Batik > has no problems with elements outside the viewport. Anyway, moving > the elements in the test a bit and adding pointer-events="painted" > makes it pass in both viewers (as long as the testframe dimensions > matches the viewBox). OK. I don’t think there is anything that implies that elements outside the viewport are to be excluded, except perhaps the mention of pointer-events (which sort of ties the behaviour of these methods to the visibility of the elements). > To make the test more robust the userspace coordinates > used in the 'rect' parameter need to be transformed to the > initial viewport coordinate system before passing it to > checkIntersection/getIntersectionList. I’m OK with the test being modified to avoid these issues for now, but I think that the spec should be clarified wrt to the coordinate system being used (as well as for the viewport clipping issue). > Cheers > /Erik (part of ACTION-2695) Thanks, Cameron -- Cameron McCormack ≝ http://mcc.id.au/
Received on Monday, 14 December 2009 09:41:42 UTC