On 20 Apr 2001, at 19:36, Tim Goetze wrote:

> i set a background pixmap for the drawing_area's window and draw directly
> to this pixmap. after drawing, synthesize an expose event (or do the blit
> directly).

hmm... this seems to be exactly what I was doing.

> the X server will now update the window from the contents of the
> background pixmap in the fastest fashion whenever your window gets an
> expose event (don't know about how gtk on windows(r)(tm) handles this).
> 
> after drawing to the pixmap, synthesize an expose event or do the blit
> yourself.

What I wanted to do in my program was to animate the solving of a 
maze, ie show the wiggling around and backtracking of the path 
taken as it searches for the exit.

For each iteration, I only draw onto the pixmap a mini rectangle, 
the area of which is much much less than the area of the whole 
pixmap itself. (I want to update the screen for each iteration for the 
animation effect)

In other words, if I only update a small piece of the pixmap, is there 
any way to synthesize the expose event to tell it to only update the 
drawingarea from that small piece?

The way I do it currently is to update both the pixmap and the 
drawingarea without synthesizing any expose event for each 
iteration. This is much faster than blitting the whole pixmap for 
each iteration.
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to