Re: Size of a GtkImage

From: Date: Sat, 11 Feb 2006 00:00:45 +0000
Subject: Re: Size of a GtkImage
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6714@lists.php.net to get a copy of this message
Great - please could you stick that on the wiki? :) - Steph ----- Original Message ----- From: "Breizh Micro Services" <francois@bms-guer.com> Cc: "PHP-Gtk General List" <php-gtk-general@lists.php.net> Sent: Friday, February 10, 2006 5:33 PM Subject: Re: [PHP-GTK] Size of a GtkImage
For those who want to make zoom in or out, this is an example : $window = new GtkWindow(); $window->set_title('PHP Test'); $window->connect_simple('destroy', array('gtk', 'main_quit')); $image = GtkImage::new_from_file("test.jpg"); $scrolledWindow = new GtkScrolledWindow(); $scrolledWindow->add_with_viewport($image); $window->add($scrolledWindow); function zoom($width,$height){ global $image; $pixbuf = $image->get_pixbuf(); $image->set_from_pixbuf($pixbuf->scale_simple($width,$height,'GDK_INTERP_TILES')); } that's it ! Breizh. -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


« previous php.gtk.general (#6714) next »