mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -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
|
# buttons
|
||||||
image = gtk.Image()
|
image = gtk.Image()
|
||||||
image.set_from_file("../../patches/wall40_1.gif")
|
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()
|
image.show()
|
||||||
# a button to contain the image widget
|
# a button to contain the image widget
|
||||||
button = gtk.Button()
|
button = gtk.Button()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue