[gimp] Bug 777233 - Printing an SVG file results in a black sheet of paper
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 777233 - Printing an SVG file results in a black sheet of paper
- Date: Sun, 15 Jan 2017 17:06:30 +0000 (UTC)
commit 80003dff38d55e35d8a7c6074df23e0c5209c8b7
Author: Michael Natterer <mitch gimp org>
Date: Sun Jan 15 18:04:54 2017 +0100
Bug 777233 - Printing an SVG file results in a black sheet of paper
Create a white rectangle behind everything, which should take care of
whatever print backend brokenness.
plug-ins/print/print-draw-page.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/print/print-draw-page.c b/plug-ins/print/print-draw-page.c
index 84b491b..ac21386 100644
--- a/plug-ins/print/print-draw-page.c
+++ b/plug-ins/print/print-draw-page.c
@@ -44,15 +44,22 @@ print_draw_page (GtkPrintContext *context,
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
cairo_surface_t *surface;
- gint width;
- gint height;
- gdouble scale_x;
- gdouble scale_y;
surface = print_surface_from_drawable (data->drawable_id, error);
if (surface)
{
+ gint width;
+ gint height;
+ gdouble scale_x;
+ gdouble scale_y;
+
+ /* create a white rectangle covering the entire page, just
+ * to be safe; see bug #777233.
+ */
+ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
+ cairo_paint (cr);
+
width = cairo_image_surface_get_width (surface);
height = cairo_image_surface_get_height (surface);
@@ -74,10 +81,8 @@ print_draw_page (GtkPrintContext *context,
return TRUE;
}
- else
- {
- return FALSE;
- }
+
+ return FALSE;
}
static cairo_surface_t *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]