Re: GTK Drawing Area help



On Fri, 10 Oct 2008 06:34:17 -0700 (PDT)
paskari <paskari007 yahoo ca> wrote:

>
>I've had some problems with the Drawing Area widget, and was wondering if
>anyone new of a comprehensive tutorial on it. I've been using this tutorial:
>
>http://www.pygtk.org/pygtk2tutorial/ch-DrawingArea.html
>
>But it is rather topical. For example, calling draw_line() works from inside
>some functions (on_expose_event), but not others. I just wish there was a
>site to address such things
>
>Thanks

See:    http://perlmonks.org?node_id=583578  

My code there has been critisized a bit, by too many calls
to get colors from a colormap, ( I didn't quite understand it
then and just did what the demo did :-) ).
Any color code improvements would be appreciated.

But the code should give you the idea of what is going on.
Basically, you create a background pixmap, and write to the pixmap's
drawable, then every expose event, reload the pixmap.

zentara



-- 
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html 


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