Re: Gtk2::PrintOperation
- From: Mario Kemper <mario kemper googlemail com>
- To: Jeffrey Ratcliffe <jeffrey ratcliffe gmail com>
- Cc: "gtk-perl-list gnome org List" <gtk-perl-list gnome org>
- Subject: Re: Gtk2::PrintOperation
- Date: Thu, 05 Aug 2010 23:19:54 +0200
This should work:
$op->signal_connect( draw_page => sub {
my ($op, $context) = @_;
my $cr = $context->get_cairo_context;
#load pixbuf from file
my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file( 'filename.png' );
#set source pixbuf
Gtk2::Gdk::Cairo::Context::set_source_pixbuf( $cr, $pixbuf, 0, 0 );
#paint
$cr->paint;
});
Regards
Mario
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]