Gnome2::Print - Buffer printing



Hi all,

I've just committed to CVS this example program that reads a (lined)
buffer, renders it, wrapping lines wider than the page width.  It's just
an example, so it has some rought edges, and it is indeed a little too
much verbose, but should be enough to understand how to manipulate a
buffer.

In C would have been more precise, since we could iterate over
characters via pointers, getting a more reliable calculation of every
word width; in Perl, however, the code is far more readable and simpler
to understand... I know, it sounds strange to say that of some Perl code
snippet, but whoever tried to understand how libgnomeprint works reading
gtksourceview source code knows what I mean.

Oh, well: you win some, you lose some. ;-)

+++

buffer_print.pl will be included in the next revision of Gnome2::Print
(0.60), which is ready to be rolled out.

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)                 [ http://www.emmanuelebassi.net ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4

Attachment: buffer_print.pl
Description: buffer printing with gnome2::print



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]