beaver-devel
[Top][All Lists]
Advanced

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

[Beaver-devel] Printing progress..


From: Double 12
Subject: [Beaver-devel] Printing progress..
Date: Sat, 27 Sep 2008 22:57:44 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hi,

I managed to print a test page with GtkPrintOperation, and I commited it to the CVS. GtkPrintOperation emits two important signals: begin-print and draw-page. When a user has chosen all properties in the Print dialog and clicks the Print button, the begin-print signal is emitted. You have to connect a function to that signal, in which you split the document into seperate pages and tell GTK how many pages you are going to print. For every page, the draw-page signal is emitted and the draw_page function gets called. Now I just set the number of pages to 1, and just printed a test message in draw_page. If we want to use this for serious printing, we have to split the document into pages.

Another thing is that the Pango layout text is printed by first drawing the outline of the characters and then filling them. There's not a lot wrong with that, but it can leave the paper with a lot of ink if you set a too thick outline, so there must be a better way.

By the way, is the original tools.c file still in use? I thought you moved everything to the plugin. There are still some utility functions in the original tools.c (like get_text to get the text out of a buffer) that are still used. Do those functions have to be moved to other source files, or to the API? Or will we just leave them there?

Double 12




reply via email to

[Prev in Thread] Current Thread [Next in Thread]