Commit aea5024c authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

add argument printing to zathura_page_render

parent c2b9d22a
......@@ -546,7 +546,7 @@ zathura_page_image_save(zathura_page_t* page, zathura_image_t* image, const char
}
bool
zathura_page_render(zathura_page_t* page, cairo_t* cairo)
zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing)
{
if (page == NULL || page->document == NULL || cairo == NULL) {
return NULL;
......@@ -557,7 +557,7 @@ zathura_page_render(zathura_page_t* page, cairo_t* cairo)
return NULL;
}
return page->document->functions.page_render_cairo(page, cairo);
return page->document->functions.page_render_cairo(page, cairo, printing);
}
zathura_index_element_t*
......
......@@ -249,7 +249,7 @@ struct zathura_document_s
/**
* Renders the page
*/
bool (*page_render_cairo)(zathura_page_t* page, cairo_t* cairo);
bool (*page_render_cairo)(zathura_page_t* page, cairo_t* cairo, bool printing);
/**
* Free page
......@@ -420,9 +420,10 @@ bool zathura_page_image_save(zathura_page_t* page, zathura_image_t* image, const
*
* @param page The page object
* @param cairo Cairo object
* @param printing render for printing
* @return True if no error occured, otherwise false
*/
bool zathura_page_render(zathura_page_t* page, cairo_t* cairo);
bool zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing);
/**
* Create new index element
......
......@@ -89,5 +89,5 @@ cb_print_draw_page(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext*
return;
}
zathura_page_render(page, cairo);
zathura_page_render(page, cairo, true);
}
......@@ -194,7 +194,7 @@ render(zathura_t* zathura, zathura_page_t* page)
cairo_scale(cairo, zathura->document->scale, zathura->document->scale);
}
if (zathura_page_render(page, cairo) == false) {
if (zathura_page_render(page, cairo, false) == false) {
cairo_destroy(cairo);
cairo_surface_destroy(surface);
gdk_threads_leave();
......
Supports Markdown
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