mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 00:23:47 +01:00
Updated plugins
This commit is contained in:
parent
2eed47a314
commit
08117975d3
@ -218,13 +218,13 @@ djvu_page_form_fields_get(zathura_page_t* page)
|
||||
zathura_image_buffer_t*
|
||||
djvu_page_render(zathura_page_t* page)
|
||||
{
|
||||
if (!Zathura.document || !page || !page->document) {
|
||||
if (!page || !page->document) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* calculate sizes */
|
||||
unsigned int page_width = Zathura.document->scale * page->width;
|
||||
unsigned int page_height = Zathura.document->scale * page->height;
|
||||
unsigned int page_width = page->document->scale * page->width;
|
||||
unsigned int page_height = page->document->scale * page->height;
|
||||
|
||||
if (!page_width || !page_height) {
|
||||
goto error_out;
|
||||
|
@ -176,15 +176,15 @@ pdf_page_form_fields_get(zathura_page_t* page)
|
||||
zathura_image_buffer_t*
|
||||
pdf_page_render(zathura_page_t* page)
|
||||
{
|
||||
if (!Zathura.document || !page || !page->data || !page->document) {
|
||||
if (!page || !page->data || !page->document) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* calculate sizes */
|
||||
unsigned int page_width = Zathura.document->scale * page->width;
|
||||
unsigned int page_height = Zathura.document->scale * page->height;
|
||||
unsigned int page_width = page->document->scale * page->width;
|
||||
unsigned int page_height = page->document->scale * page->height;
|
||||
|
||||
if (Zathura.document->rotate == 90 || Zathura.document->rotate == 270) {
|
||||
if (page->document->rotate == 90 || page->document->rotate == 270) {
|
||||
unsigned int dim_temp = 0;
|
||||
dim_temp = page_width;
|
||||
page_width = page_height;
|
||||
@ -215,9 +215,9 @@ pdf_page_render(zathura_page_t* page)
|
||||
|
||||
fz_matrix ctm = fz_identity;
|
||||
ctm = fz_concat(ctm, fz_translate(0, -mupdf_page->page->mediabox.y1));
|
||||
ctm = fz_concat(ctm, fz_scale(Zathura.document->scale, -Zathura.document->scale));
|
||||
ctm = fz_concat(ctm, fz_scale(page->document->scale, -page->document->scale));
|
||||
ctm = fz_concat(ctm, fz_rotate(mupdf_page->page->rotate));
|
||||
ctm = fz_concat(ctm, fz_rotate(Zathura.document->rotate));
|
||||
ctm = fz_concat(ctm, fz_rotate(page->document->rotate));
|
||||
fz_bbox bbox = fz_roundrect(fz_transformrect(ctm, mupdf_page->page->mediabox));
|
||||
|
||||
fz_pixmap* pixmap = fz_newpixmapwithrect(fz_devicergb, bbox);
|
||||
|
@ -253,13 +253,13 @@ pdf_page_form_fields_get(zathura_page_t* page)
|
||||
zathura_image_buffer_t*
|
||||
pdf_page_render(zathura_page_t* page)
|
||||
{
|
||||
if (!Zathura.document || !page || !page->data || !page->document) {
|
||||
if (!page || !page->data || !page->document) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* calculate sizes */
|
||||
unsigned int page_width = Zathura.document->scale * page->width;
|
||||
unsigned int page_height = Zathura.document->scale * page->height;
|
||||
unsigned int page_width = page->document->scale * page->width;
|
||||
unsigned int page_height = page->document->scale * page->height;
|
||||
|
||||
/* create pixbuf */
|
||||
GdkPixbuf* pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
|
||||
@ -270,7 +270,7 @@ pdf_page_render(zathura_page_t* page)
|
||||
}
|
||||
|
||||
poppler_page_render_to_pixbuf(page->data, 0, 0, page_width, page_height,
|
||||
Zathura.document->scale, 90, pixbuf);
|
||||
page->document->scale, 90, pixbuf);
|
||||
|
||||
/* create image buffer */
|
||||
zathura_image_buffer_t* image_buffer = zathura_image_buffer_create(page_width, page_height);
|
||||
|
Loading…
Reference in New Issue
Block a user