Re: Gtk2::PrintOperation
- From: Emmanuele Bassi <ebassi gmail com>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2::PrintOperation
- Date: Sat, 07 Aug 2010 08:30:57 +0100
On Fri, 2010-08-06 at 22:54 +0200, Jeffrey Ratcliffe wrote:
On 5 August 2010 23:19, Mario Kemper <mario kemper googlemail com> wrote:
This should work:
Thanks for the help. This line got me one step further:
Gtk2::Gdk::Cairo::Context::set_source_pixbuf( $cr, $pixbuf, 0, 0 );
Why isn't set_source_pixbuf in Cairo::Context?
well, Cairo doesn't know anything about GdkPixbufs, so perl-Gtk2 has to
"sub-class" the Cairo::Context by adding a Gtk2::Gdk::Cairo::Context
type to its @ISA. while perl-Gtk2 does it for the one returned by
Gtk2::Gdk::Cairo::create(), it doesn't do it for the one created by the
Gtk2::PrintContext API[0].
ciao,
Emmanuele.
+++
[0] technically, it's *almost* correct: the surface used when printing
is fairly different than the one use to draw on screen. it all stems
from the fact that OOP with Cairo is a bit tricky - in C those are just
functions that take a cairo_t*.
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]