#!/usr/bin/python
#
# I am a musician writing a GPL'ed program to help people
# do eartraining. I'm no programmer, so the question is
# probably quite simple, but I am totally confused by
# GtkPixmaps, GnomeCanvasImages, GdkImlib.Images and (for
# me) cryptical error messages:
#
# Is it possible to place images (xpm/png/gif/whatever)
# on the canvas using gnome-python-1.0.1? Drawing lines are 
# no problem, but I can't get images right. If someone
# give an example of how to do it, I'd be very thankfull.
#
# Tom Cato
#
from gtk import *
from gnome.ui import *

class MainWin(GnomeApp):
    def __init__(self):
        GnomeApp.__init__(self, '', 'Canvastesting')
        self.connect('destroy', mainquit)
        cnv = GnomeCanvas()
        self.set_contents(cnv)
        cnv.show()
        cnv.root().add('line', points=(0, 0, 20, 20))

win = MainWin()
win.show()
mainloop()


To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to