[cairo] Hit detection

Piotr Zurek p.zurek at gmail.com
Sun Nov 26 16:14:35 PST 2006


Hi there,

Don't worry - I'm not going to ask if cairo supports hit detection.
I was just wondering how do you guys usually approach that problem in 
your applications. What I'm doing is simply calculating a bounding box 
of some objects and then simply comparing them to hit coordinates. 
That's all good for rectangular (or almost rectangular) objects but what 
about things like bezier curves. Of course, I could calculate that as 
well but I hope there exists an easier way.
I guess I should simply ask what's the best way to utilize in_fill and 
in_stroke but maybe someone has different suggestion?

Cheers,
Piotr


More information about the cairo mailing list