mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 22:25:46 -04:00
scale up image
This commit is contained in:
parent
0acfa03e75
commit
724d8b7056
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,14 @@ class ImagesExample:
|
|||
# buttons
|
||||
image = gtk.Image()
|
||||
image.set_from_file("../../patches/wall40_1.gif")
|
||||
pixbuf = image.get_pixbuf()
|
||||
if pixbuf:
|
||||
scale = 2
|
||||
image.set_from_pixbuf(pixbuf.scale_simple(
|
||||
pixbuf.get_width() * scale,
|
||||
pixbuf.get_height() * scale,
|
||||
gtk.gdk.INTERP_NEAREST
|
||||
))
|
||||
image.show()
|
||||
# a button to contain the image widget
|
||||
button = gtk.Button()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue