mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 20:13:53 +01:00
add argument printing to zathura_page_render
This commit is contained in:
parent
c2b9d22ad1
commit
aea5024ce3
@ -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
|
||||
|
2
print.c
2
print.c
@ -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);
|
||||
}
|
||||
|
2
render.c
2
render.c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user