On Fri, Oct 21, 2016 at 7:28 PM, Andrew Eikum aeikum@codeweavers.com wrote:
- *contains = probe.x > geometry->u.rectangle.rect.left - tolerance &&
probe.x < geometry->u.rectangle.rect.right + tolerance &&
probe.y > geometry->u.rectangle.rect.top - tolerance &&
probe.y < geometry->u.rectangle.rect.bottom + tolerance;
Does it really work like that? I'd expect tolerance to be irrelevant for paths constructed purely from lines. So basically in general case path is approximated with lines (or enclosed area with triangles) with given tolerance, and then point is tested against this flattened path. While in rectangular case it's already flat to begin with.
On 21 October 2016 at 18:40, Nikolay Sivov bunglehead@gmail.com wrote:
On Fri, Oct 21, 2016 at 7:28 PM, Andrew Eikum aeikum@codeweavers.com wrote:
- *contains = probe.x > geometry->u.rectangle.rect.left - tolerance &&
probe.x < geometry->u.rectangle.rect.right + tolerance &&
probe.y > geometry->u.rectangle.rect.top - tolerance &&
probe.y < geometry->u.rectangle.rect.bottom + tolerance;
Does it really work like that? I'd expect tolerance to be irrelevant for paths constructed purely from lines. So basically in general case path is approximated with lines (or enclosed area with triangles) with given tolerance, and then point is tested against this flattened path. While in rectangular case it's already flat to begin with.
It would certainly be nice to have some tests for how "tolerance" is handled in general, even if those tests just end up as todo_wine. Similarly, it would be nice to have some tests for how problematic transformation matrices are handled.