Commit 80003dff authored by Michael Natterer's avatar Michael Natterer 😴

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.
parent d68a62d4
......@@ -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 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment