Re: Printing a second page from the canvas
- From: Damon Chaplin <damon karuna eclipse co uk>
- To: Murray Cumming <murrayc murrayc com>
- Cc: goocanvas <goocanvas-list gnome org>, davidk <davidk openismus com>
- Subject: Re: Printing a second page from the canvas
- Date: Thu, 06 Oct 2011 10:32:05 +0100
On Thu, 2011-10-06 at 09:05 +0200, Murray Cumming wrote:
> I'm using goo_canvas_render() in a GtkPrintOperation::draw-page handler,
> but maybe I misunderstand the meaning of goo_canvas_render()'s bounds
> parameter.
>
> In this simple test case, the first page is fine, but the second page is
> always blank, as you can see in the print preview.
> https://bugzilla.gnome.org/show_bug.cgi?id=660553#c5
I think you just need to translate the output to the position you want
it on the page, e.g.:
In draw_page():
cr = gtk_print_context_get_cairo_context(context);
+ cairo_translate (cr, 0, -A4_PAGE_HEIGHT * page_nr);
goo_canvas_render(GOO_CANVAS(data->canvas), cr, &bounds, 0.0);
That seems to work here.
We should add some documentation for this.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]