Can someone port this do pygtk2? Is enough functions wrapped
yet to do this?
> ----------------------------------------------------------
>
> from gtk import *
>
> def _on_expose(drawingarea, event):
> # get the GdkWindow
> window = event.window
>
> # get the GC
> gc = window.new_gc()
>
> # create a green color
> color = drawingarea.get_colormap().alloc(0x0000, 0xFFFF, 0x0000)
>
> # use this color for drawing
> gc.foreground = color
>
> # draw a line
> drawingarea.draw_line(gc, 0, 0, 200, 200)
>
>
> # the usual stuff
> win = GtkWindow()
> win.connect("destroy", mainquit)
> win.show()
>
> # create the drawing area
> drawingarea = GtkDrawingArea()
> drawingarea.connect("expose-event", _on_expose)
> drawingarea.show()
> win.add(drawingarea)
>
> # enter the mainloop
> mainloop()
>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk