|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/lib64/pygtk/2.0/demos/ |
Upload File : |
mò
e‡8Hc @ sÑ d Z d k Z d k Z d k Z e i i e i i e ƒ d ƒ Z e i i e d ƒ Z e i i e d ƒ Z
e i i e d ƒ Z d „ Z d „ Z
d e i f d „ ƒ YZ d
„ Z e d j o e ƒ n d S( sÿ Images
GtkImage is used to display an image; the image can be in a number of formats.
Typically, you load an image into a GdkPixbuf, then display the pixbuf.
This demo code shows some of the more obscure cases, in the simple case a call
to gtk_image_new_from_file() is all you need.
If you want to put image data in your program as a C variable, use the
make-inline-pixbuf program that comes with GTK+. This way you won't need to
depend on loading external files, your application binary can be self-contained.Nt imagess
alphatest.pngs gtk-logo-rgb.gifs floppybuddy.gifc C s* | i ƒ } | i d ƒ | i | ƒ d S( Ni ( t loadert
get_pixbuft pixbuft fillt imaget set_from_pixbuf( R R R ( ( t$ /usr/lib64/pygtk/2.0/demos/images.pyt progressive_prepared_callback s
c C s | i ƒ d S( sŠ We know the pixbuf inside the GtkImage has changed, but the image
itself doesn't know this; so queue a redraw. If we wanted to be
really efficient, we could use a drawing area or something
instead of a GtkImage, so we could control the exact position of
the pixbuf on the display, then we could queue a draw for only
the updated area of the image.
N( R t
queue_draw( R t xt yt widtht heightR ( ( R t progressive_updated_callback s t
ImagesDemoc B sJ t Z d Z d Z d Z d d „ Z d „ Z d „ Z d „ Z d „ Z
RS( Nc C s t i i | ƒ y | i | i ƒ ƒ Wn&