Updated plugins

This commit is contained in:
Moritz Lipp 2011-04-18 18:05:17 +02:00
parent 2eed47a314
commit 08117975d3
3 changed files with 13 additions and 13 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);