From ee512cdf169cba4c454b5ddaa71524d517b3c716 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 6 Dec 2011 21:19:58 +0100 Subject: [PATCH] gtk-tpdfv: Create an empty white page to draw the PDF page on. --- src/gtk-tpdfv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gtk-tpdfv.c b/src/gtk-tpdfv.c index cba2e1f..082872b 100644 --- a/src/gtk-tpdfv.c +++ b/src/gtk-tpdfv.c @@ -279,6 +279,15 @@ gtk_tpdfv_expose(GtkWidget *tpdfv, GdkEventExpose *event) cairo_translate(cr, x + pdf->delta_x, y + pdf->delta_y); + /* draw empty white page */ + cairo_save(cr); + + cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); + cairo_rectangle(cr, 0.0, 0.0, page_width, page_height); + cairo_fill(cr); + + cairo_restore(cr); + poppler_page_render(pdf->current_page, cr); cairo_destroy(cr); -- 2.30.2