- # loading the picture image and getting some useful
- # information to draw it in the widget's background
- img = gtk.gdk.pixbuf_new_from_file(self.image)
- pixels = img.get_pixels()
- rowstride = img.get_rowstride()
- width = img.get_width()
- height = img.get_height()
- gc = draw.style.black_gc
-
- # sets the correct size of the eventbox, to show the scrollbar
- # when needed.
- self.evtbox.set_size_request(width, height)
-
- # drawing the picture in the background of the drawing area,
- # this is really important.
- draw.window.draw_rgb_image(gc, 0, 0, width, height,
- 'normal', pixels, rowstride,
- 0, 0)
-
- # this call makes the ball being drown be shown correctly.