Re: Static items (Was: Can this be done with goocanvas?)
- From: Damon Chaplin <damon karuna eclipse co uk>
- To: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- Cc: goocanvas-list gnome org
- Subject: Re: Static items (Was: Can this be done with goocanvas?)
- Date: Fri, 31 Oct 2008 17:16:55 +0000
On Tue, 2008-10-28 at 19:16 +0000, Gustavo J. A. M. Carneiro wrote:
> Today I tried replacing connect with connect_after for the adjustment
> signals. It does not solve the flicker, but it helps keep the static
> items more static. Not sure whether you did the same thing, but I'd
> like to just drop this node.
I've just committed my code so you can try it out.
It is easy to use - just get the static root item and add items to it
like the normal root item:
static_root = goo_canvas_get_static_root_item (canvas);
The demo shows a few static items.
Static items always use pixels for units at present. I don't know if we
want to support other units.
Also, static items are placed above normal items - I hope that is what
everyone wants.
> > (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.)
>
> I see. The performance would not be great, but for sure that is the
> only way this is ever going to work flicker free[1]. Maybe making this
> an option? Those that want to draw static overlay items would activate
> the option, otherwise it would be disabled by default.
We could add this as an option. The code needed is very simple.
> [1] either that or draw the static items on another X11 window with
> alpha channel and let a compositing manager do basically the same work
> but in hardware accelerated opengl ;-)
Using a shaped window might be an alternative as well. Though I don't
know how well they work in GTK. Too much work for me as well.
Damon
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]