diff options
author | Cody Russell <bratsche@gnome.org> | 2008-03-31 21:45:22 +0000 |
---|---|---|
committer | Cody Russell <bratsche@src.gnome.org> | 2008-03-31 21:45:22 +0000 |
commit | d4a3e5a6e47f474d6520c168c6edb9274dc3e6c4 (patch) | |
tree | fc2217420a64536562e7715cf320ecae44870d5c /demos/gtk-demo | |
parent | a63c87c5da959505c667ab8f23df196fd0aeb6e5 (diff) | |
download | gtk+-d4a3e5a6e47f474d6520c168c6edb9274dc3e6c4.tar.gz |
Move down each line in units of text_height rather than in units of
2008-03-31 Cody Russell <bratsche@gnome.org>
* demos/gtk-demo/printing.c (draw_page): Move down each line in
units of text_height rather than in units of data->font_size.
(totally awesome catch by Dom Lachowicz)
svn path=/trunk/; revision=19952
Diffstat (limited to 'demos/gtk-demo')
-rw-r--r-- | demos/gtk-demo/printing.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c index be1e066ca8..efa5838215 100644 --- a/demos/gtk-demo/printing.c +++ b/demos/gtk-demo/printing.c @@ -49,6 +49,7 @@ begin_print (GtkPrintOperation *operation, data->num_lines = i; data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1; + gtk_print_operation_set_n_pages (operation, data->num_pages); } @@ -122,7 +123,7 @@ draw_page (GtkPrintOperation *operation, { pango_layout_set_text (layout, data->lines[line], -1); pango_cairo_show_layout (cr, layout); - cairo_rel_move_to (cr, 0, data->font_size); + cairo_rel_move_to (cr, 0, text_height); line++; } |