composite four patches

This commit is contained in:
Jon Dowland 2008-02-23 12:32:03 +00:00
parent 0291253742
commit ede6852539

View file

@ -54,14 +54,15 @@ class ImagesExample:
)) ))
pb = image2.get_pixbuf() pb = image2.get_pixbuf()
pb.composite( for (x,y) in [(0,0), (51,0), (104,0)]:
image.get_pixbuf(), pb.composite(
0, 0, image.get_pixbuf(),
pb.get_width(), pb.get_height(), x * scale, y * scale,
0, 0, # offsets pb.get_width(), pb.get_height(),
1, 1, # scale x * scale, y * scale, # offsets
gtk.gdk.INTERP_NEAREST, 255 1, 1, # scale
) gtk.gdk.INTERP_NEAREST, 255
)
# a button to contain the image widget # a button to contain the image widget
button = gtk.Button() button = gtk.Button()