Re: What is "is_pointer_event" in goo_canvas_get_item_at ?



On Mon, 2008-10-13 at 21:17 +0200, Till Harbaum / Lists wrote:
> Hi,
> 
> thanks to your help, my mapping application now runs with goocanvas 99% like it did with
> gnomecanvas. The only difference is that goocanvas clips the entire view to the bounds which
> i actually like. I still have to test run it on the n810 being my primary target and see if the 
> performace of goocanvas is sufficient.
> 
> I discovered that i have to set is_pointer_event to TRUE so that goo_canvas_get_item_at only
> returns polylines if you are actually on those lines. If i set it to FALSE polylines also are returned
> if the given coordinate is within the area sourrounded by the polyline. Why is that? The
> documentation also isn't very helpful:
> 
> is_pointer_event: TRUE if the "pointer-events" property of items should be used to determine 
> which parts of the item are tested. 

Have a look at the documentation for the GooCanvasPointerEvents enum
(and the "Events" page in the demo).

You have control over which parts of the item get pointer events (i.e.
the stroke or fill or both), and if the item has to be painted or
visible to get events. (It is very similar to the SVG property.)

The "is_pointer_event" argument tells goo_canvas_get_item_at() whether
to take this setting into account. If it is FALSE it should just return
the top item at that point.


Your problem with polylines might be a bug. (I have a feeling cairo
might connect the ends of the lines when doing the cairo_in_fill()
check.)

Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]