tags:

views:

160

answers:

1

I have a drawing area, and an 'png' image I want to load that image to my drawing area as background.

the screen is bigger then my image and the problem is it does not 'tile' my image

I have tried adding image as pixbuf and pixmap but it doesnot help

i use this line

gc.set_tile(pixmap)
area.window.draw_drawable(gc, pimap, .....)

but it does not help

+1  A: 

i found the answer i put the code here for others

area=gtk.Drawingarea()

pixbuf=gtk.gdk.pixbuf_new_from_file('background.png')
pixmap, mask=pixbuf.render_pixmap_and_mask()

area.window.set_back_pixmap(pixmap, False)
ali