PixbufWidget.pm
- From: Jens Luedicke <jens irs-net com>
- To: gtk-perl-list gnome org
- Subject: PixbufWidget.pm
- Date: Sat, 27 Jan 2001 15:18:36 UT
Hi there ...
I wasted my time to hack this little module.
It's based on test.pl in GdkPixbuf/samples
I hope someone likes it and/or uses it...
<snip>
package PixbufWidget;
sub new {
shift;
my ($file) = @_;
die "Usage: PixbufWidget->new(\"file\")\;"
if($file eq "");
my $box = new Gtk::VBox(0,0);
$box->set_app_paintable(1);
my $pixbuf = new_from_file Gtk::Gdk::Pixbuf($file);
$box->signal_connect('expose_event', sub {
$pixbuf->render_to_drawable_alpha(
$box->window,
0, 0, 0, 0,
$pixbuf->get_width(), $pixbuf->get_height(),
0, 50, 0, 0, 0
);
});
$box->set_usize($pixbuf->get_width(), $pixbuf->get_height());
$box->show_all();
return $box;
}
1;
</snap>
--
with friendly regards....
jens luedicke <jens irs-net com>
PMC - Perl Mail Client
http://www.irs-net.com/
wget it: wget -m -nH ftp://ftp.irs-net.com/pmc
Bush jr: FOAD ... perversion of justice ...
--
If's Beste Freundin: Else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]