[cairo] Hit detection
Gustavo Carneiro
gjcarneiro at gmail.com
Mon Nov 27 09:54:15 PST 2006
On 11/27/06, Piotr Zurek <p.zurek at gmail.com> wrote:
>
> 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?
GooCanvas (one cairo based canvas widget) uses in_stroke and in_fill.
Simple but works pretty well.
--
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20061127/46e98a4f/attachment.htm
More information about the cairo
mailing list