Static items (Was: Can this be done with goocanvas?)



On Wed, 2008-10-22 at 12:05 +0100, Damon Chaplin wrote:
> On Wed, 2008-10-22 at 11:04 +0100, Gustavo J. A. M. Carneiro wrote:
> 
> > So, in summary, I really do get the feeling that goocanvas using
> > g_signal_connect_after for the scrolled window adjustments would solve
> > my problem.  But I did not try it yet to make sure.
> 
> I'm not so sure that would help but you could try it.
> 
> GooCanvas uses the same scrolling technique as GtkLayout - it moves the
> large canvas GdkWindow around behind the small viewport window so that
> the windowing system (X Windows or win32) does the scrolling.
> 
> So I think it would be pretty hard to avoid flicker for the items that
> stay in one place, since your redrawing is always going to happen
> slightly after the item has already been scrolled.

I just had another go at this today. I've got it basically working, and
I've managed to avoid the problem where the static item is dragged with
the rest of the canvas. But I can't get rid of the flicker completely.

I'll hopefully commit it to svn in a day or two once I've finished it,
and maybe we'll be able to minimize the flicker in future.

(There is one way I tried which avoids flicker completely - redraw the
entire window when scrolling. Of course the problem then is performance,
but with only a few items on the canvas it works great.)

Damon




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