[Ben Escoto]

>   FP> Within the update function:
>   FP>         [...]  # Redraw everything.

> Is the "update function" called in response to window expose events
> as in my previous post?

I presume yes.

> If so it seems that the window will still be redrawn a lot (and, in your
> example, the base pixmap also recreated?).

Yes.  It is allocated within the `update' function, and reclaimed by
Python by falling to the end of the function (I keep no other reference
to the variable).

The goal of the exercise was, for me, to evaluate if I could use `pygtk'
to produce a flicker-less animation of a possibly complex curve, and I
was pleasantly surprised.  By flicker, I mean seeing the lines, seeing the
background, seeing the lines, etc. in quick succession.  However, when the
curves go complex to compute, the animation gets jerky, but I expected this.

> It isn't a big deal, but at least the way I am doing it (and the way
> shown in the scribble example) everytime I switch desktops or screens
> I see the window get covered in the default gtk background (burnished
> metal or whatever it's called) and then the pixmap is drawn on top
> of it.

Using a pixmap as an intermediate will only hide the actual steps of
redrawing, and show the result all at once.  I'm guessing that the default
gtk background is the initial step of that redrawing, and this step like
the others, will get hidden by the technique.  Of course, using a pixmap
as an intermediate will not make the overall result to appear faster.
What background you will then see might depend of your window manager.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to