Today KIU Shueng Chuan wrote:

>Is there a queue_draw_area method cos I can't find it in pygtk 
>(0.66) nor in the list archives?
>
>What I have is a drawingarea with a pixmap. I'm updating small 
>areas around the pixmap and I would like to show the changes 
>after each update. Right now, I just do a queue_draw followed by a 
>while(events_pending()): mainiteration() which seems rather 
>wasteful.
>(My expose event just pumps out the pixmap onto the drawingarea 
>like in the scribble example)
>
>The alternative that I've tried is to draw on the pixmap itself and 
>also draw on the drawingarea window which is faster than 
>redrawing the whole pixmap.
>
>Is there a better way?

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).

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.

have to append my drawing widgets are c++, but the method should work with
python all the same.

.tim

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

Reply via email to