From: Nickolay V. Shmyrev Date: Sat, 23 Apr 2005 14:11:06 +0000 (+0000) Subject: Fix mixup between thumbnail width/height params X-Git-Tag: EVINCE_0_3_0~38 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=34a00793dc5c883672765f5c18ab001b22effa5d;p=evince.git Fix mixup between thumbnail width/height params --- diff --git a/ChangeLog b/ChangeLog index ae36929b..f49daa31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-23 James Bowes + + * dvi/dvi-document.c: (dvi_document_load), + (dvi_document_thumbnails_get_thumbnail), + (dvi_document_init_params): Fix up some mixups between + width and height to correct thumbnail rendering. + 2005-04-23 Nickolay V. Shmyrev * dvi/mdvi-lib/private.h: diff --git a/dvi/dvi-document.c b/dvi/dvi-document.c index 61526d2d..4285f688 100644 --- a/dvi/dvi-document.c +++ b/dvi/dvi-document.c @@ -92,10 +92,10 @@ dvi_document_load (EvDocument *document, mdvi_pixbuf_device_init (&dvi_document->context->device); dvi_document->base_width = dvi_document->context->dvi_page_w * dvi_document->context->params.conv - + 2 * unit2pix(dvi_document->params->dpi, MDVI_VMARGIN) / dvi_document->params->hshrink; + + 2 * unit2pix(dvi_document->params->dpi, MDVI_HMARGIN) / dvi_document->params->hshrink; dvi_document->base_height = dvi_document->context->dvi_page_h * dvi_document->context->params.vconv - + 2 * unit2pix(dvi_document->params->dpi, MDVI_VMARGIN) / dvi_document->params->vshrink; + + 2 * unit2pix(dvi_document->params->vdpi, MDVI_VMARGIN) / dvi_document->params->vshrink; dvi_context_mutex = g_mutex_new (); @@ -272,7 +272,7 @@ dvi_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, mdvi_set_shrink (dvi_document->context, (int)dvi_document->base_width * dvi_document->params->hshrink / thumb_width, - (int)dvi_document->base_width * dvi_document->params->vshrink / thumb_height); + (int)dvi_document->base_height * dvi_document->params->vshrink / thumb_height); proposed_width = dvi_document->context->dvi_page_w * dvi_document->context->params.conv; proposed_height = dvi_document->context->dvi_page_h * dvi_document->context->params.vconv; @@ -328,7 +328,7 @@ dvi_document_init_params (DviDocument *dvi_document) dvi_document->params->hdrift = 0; dvi_document->params->vdrift = 0; dvi_document->params->hshrink = MDVI_SHRINK_FROM_DPI(dvi_document->params->dpi); - dvi_document->params->vshrink = MDVI_SHRINK_FROM_DPI(dvi_document->params->dpi); + dvi_document->params->vshrink = MDVI_SHRINK_FROM_DPI(dvi_document->params->vdpi); dvi_document->params->orientation = MDVI_ORIENT_TBLR; dvi_document->spec = NULL;