I'm confused...

I found an example from the mailing list that does (almost) what I want.

#!/usr/bin/env python

import sys, pygtk

pygtk.require("2.0")

import gtk

def delete_event(win, event=None):
    gtk.mainquit()

def do_display(pixbuf, name):
    win=gtk.Window()
    win.connect("delete_event",delete_event)
    win.set_title(name)

    box=gtk.VBox()
    win.add(box)

    swin=gtk.ScrolledWindow()
    box.pack_start(swin, gtk.TRUE, gtk.TRUE, 0)

    image=gtk.Image()
    image.set_from_pixbuf(pixbuf)

    swin.add_with_viewport(image)
    win.set_default_size(600,480)

    win.show_all()

if len(sys.argv)==1:
    fname="/usr/share/wallpapers/linux_addict.jpg"
else:
    fname=sys.argv[1]
pixbuf=gtk.gdk.pixbuf_new_from_file(fname)
do_display(pixbuf,fname)

gtk.mainloop()

I would like to set the contents of the pixbuf with draw_lines from a series of 
points.  There has to be a way of doing this but I've been reading for a few days and 
trying things, and have managed to get myself even more confused.

Any pointers or examples would be most welcome.

tia

-- 
Luc Lefebvre

In the beginner's mind there are many possibilities,
in the expert's mind there are few.                     <Shunryu Suzuki>

Key fingerprint = D2E5 5E35 B910 6F4E 0242  EC63 0FD9 96D0 C7F4 784E
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to