Re: Can this be done with goocanvas?



On Tue, 2008-10-21 at 16:01 +0100, Damon Chaplin wrote:
> On Sat, 2008-10-18 at 21:42 +0200, Till Harbaum / Lists wrote:
> > Hi,
> > 
> > goocanvas plays nice with my map application. But of course there's always some feature 
> > to ask for :-)
> 
> That's the problem with a canvas widget. The list of possible features
> is almost limitless.
> 
> 
> > There are two things so far that i would have a need for. These are:
> > 
> > - I'd like to place something in the canvas that isn't affected by scrolling and zooming.
> >  This is a compass rose and e.g. a scale (which of course needs to be updated on zooming).
> >  Can this be done with goocanvas? If goocanvas doesn't support this i might just do it
> >  aside the map instead on top of it.
> 
> This is mentioned in the TODO. I did try to add it at one point but
> didn't get too far.

What I did recently for my project[1] was to connect signals to the
scrolled window adjustments, and adjust my "overlay item" coordinates
accordingly.  It works, but there is a noticeable lag: while dragging
the view, the overlay items visually appear to be temporarily dragged
along the rest of the canvas items, and a few milliseconds later its
positions are adjusted to make them stay in their old place.  It's like
the goocanvas canvas reacts faster than I do to the same signal and I am
always one step too late to ajust the coordinates in time... :-/

Without looking at the code I am guessing that goocanvas is also
connecting to the same adjustment signals ("changed", "value-changed")
and so my signal handler comes after goocanvas.  If that is so, it would
help if goocanvas used connect_after instead of connect...

[1] http://code.nsnam.org/gjc/ns-3-pyviz/

> 
> 
> > - I'd like to be able to determine in which segment a polyline is being hit by item_at. Something
> >   like "this coordinate is on the line segment between points x and y". My mapping application
> >   has a use for it if one wants to cut ways. But normal sketching applications may have a very
> >   similar use for this. Can this be done with goocanvas?
> 
> No, it can't be done at present. It sounds mildly useful. The only
> problem is that if it was added then people might expect similar
> functionality in other items like GooCanvasPath which might be harder.
> 
> Damon
> 
> 
> _______________________________________________
> Goocanvas-list mailing list
> Goocanvas-list gnome org
> http://mail.gnome.org/mailman/listinfo/goocanvas-list
-- 
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
"The universe is always one step beyond logic" -- Frank Herbert



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