Re: how to do a hit-test
- From: Damon Chaplin <damonachaplin gmail com>
- To: dmg <dmg uvic ca>
- Cc: goocanvas-list <goocanvas-list gnome org>
- Subject: Re: how to do a hit-test
- Date: Sun, 29 Sep 2013 21:15:48 +0100
On Sun, 2013-09-29 at 11:46 -0400, dmg wrote:
Hi everybody,
I have another question,
lets assume I have a closed polygon. Is there a way to do a hit-test (test if
a point is inside the polygon). I know this is supported in cairo:
cairo_bool_t cairo_in_fill (cairo_t *cr,
double x,
double y);
is there something equivalent in goocanvas?
Yes, you can set the "pointer-events" property to indicate which events
you want for an item. It defaults to only the painted parts of the item,
when visible, but you can change it to GOO_CANVAS_EVENTS_FILL so the
interior of the item always gets events.
(Have a look at the "Events" page in the demo.)
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]