[glom] Print Layout: Really print additional pages.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Print Layout: Really print additional pages.
- Date: Thu, 6 Oct 2011 14:09:29 +0000 (UTC)
commit 65349ab2e9b2784081bdb4376d05504abaf8fb51
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Oct 6 16:09:21 2011 +0200
Print Layout: Really print additional pages.
* glom/print_layout/printoperation_printlayout.cc: on_draw_page():
Use Cairo::Context::translate() before calling Goocanvas::Canvas::render().
Bug #660553 (Thanks to David King and Damon Chaplin)
ChangeLog | 8 ++++++++
glom/print_layout/printoperation_printlayout.cc | 9 +++++----
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 31481ac..c7ea80d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-10-06 Murray Cumming <murrayc murrayc com>
+ Print Layout: Really print additional pages.
+
+ * glom/print_layout/printoperation_printlayout.cc: on_draw_page():
+ Use Cairo::Context::translate() before calling Goocanvas::Canvas::render().
+ Bug #660553 (Thanks to David King and Damon Chaplin)
+
+2011-10-06 Murray Cumming <murrayc murrayc com>
+
Document: Avoid writing some unnecessary XML nodes.
* glom/libglom/document/document.cc: <formatting>: Do not write the
diff --git a/glom/print_layout/printoperation_printlayout.cc b/glom/print_layout/printoperation_printlayout.cc
index 4c8e446..f7314a2 100644
--- a/glom/print_layout/printoperation_printlayout.cc
+++ b/glom/print_layout/printoperation_printlayout.cc
@@ -78,14 +78,15 @@ void PrintOperationPrintLayout::on_draw_page(
m_canvas->hide_page_bounds();
Cairo::RefPtr<Cairo::Context> cairo_context = print_context->get_cairo_context();
+
//Render the canvas onto the cairo context:
const Goocanvas::Bounds bounds = m_canvas->get_page_bounds(page_nr);
//std::cout << G_STRFUNC << ": page_nr=" << page_nr << ", bounds: x1=" << bounds.get_x1() << ", y1=" << bounds.get_y1() << ", x2=" << bounds.get_x2() << ", y2=" << bounds.get_y2() << std::endl;
- m_canvas->render(cairo_context, bounds);
-
- //This doesn't seem to help:
+
//Shift the renderer context up into the page:
- //cairo_context->translate(0, - bounds.get_y1());
+ cairo_context->translate(0, - bounds.get_y1());
+
+ m_canvas->render(cairo_context, bounds);
//Call base class:
Gtk::PrintOperation::on_draw_page(print_context, page_nr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]