From 3813663af1f94dff2fba7a0ab813fe79a2b3ecbe Mon Sep 17 00:00:00 2001 From: miklosh Date: Thu, 23 Aug 2007 11:23:22 +0000 Subject: [PATCH] Clear Cairo surface to white before rendering preview --- src/extension/internal/pdfinput/pdf-input.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index c0982187a..ebe8c3ae2 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -522,6 +522,8 @@ void PdfImportDialog::_setPreviewPage(int page) { _cairo_surface = cairo_image_surface_create_for_data(_thumb_data, CAIRO_FORMAT_ARGB32, _thumb_width, _thumb_height, _thumb_rowstride); cairo_t *cr = cairo_create(_cairo_surface); + cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); // Set fill color to white + cairo_paint(cr); // Clear it cairo_scale(cr, scale_factor, scale_factor); // Use Cairo for resizing the image _preview_output_dev->setCairo(cr); // Render page -- 2.30.2