On Tue, 2009-09-01 at 18:08 +1000, Peter Moulder wrote:
On Tue, Sep 01, 2009 at 08:39:35AM +0200, Tavmjong Bah wrote:
The inverse() function is used to find the bounding box of the image in drawing coordinates. Setting EPSILON to 1.5e-8 would make this test case work but would cause trouble if anybody wanted to use the feImage filter with an image greater than 8000x8000 px (not common... but you never know). (There is the question of why a matrix inversion is necessary in the first place to find the bounding box but that is a separate issue for a filters expert.)
If we're literally talking px in the CSS sense (1px = 1/2688 of expected viewing distance) then it is indeed OK not to work on images wider than about 4/3 of viewing distance (3584px) wide. The number 4/3 is one I just made up based on trying to look at a picture and deciding how far away I need to move from a picture for it to be comfortable to look at the whole picture; certainly 8000px (112°) is too big for me to take in the whole picture, even though my peripheral vision extends beyond that.
While it's probably not common, one might use Inkscape to create a picture that is meant to be looked at piece by piece (Chinese scrolls, for example). Also, remember that one might want to use create a drawing with higher resolution to avoid sampling errors upon export at different resolutions.
Of course it's still useful to have an error margin for e.g. zoom-related uses, preferably an error margin bigger than a factor of 8000/3584, it's just a question of what costs we're willing to take to do so.
Fundamentally, I think having one value of EPSILON used everywhere in lib2geom is wrong as the way it is used is different in different functions.
Agreed. Presumably it arises because it's difficult to come up with the right number to use :) .
Anyway, note that njh has now changed the calculation a little (in upstream 2geom at least), so the best number to use may now be different again.
Can someone please see that this gets patched into Inkscape 0.47 before release. I will be gone for a week with little if any Internet connection so I won't be able to help. Thanks.
pjrm.
Tav