From: miklosh Date: Thu, 23 Aug 2007 11:23:22 +0000 (+0000) Subject: Clear Cairo surface to white before rendering preview X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3813663af1f94dff2fba7a0ab813fe79a2b3ecbe;p=inkscape.git Clear Cairo surface to white before rendering preview --- 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