Update width/height on rotation

This commit is contained in:
Moritz Lipp 2010-12-26 00:54:07 +01:00
parent c0cfa407ca
commit 7627c56d30

View file

@ -205,14 +205,24 @@ djvu_page_render(zathura_page_t* page)
ddjvu_page_rotation_t rotation = DDJVU_ROTATE_0; ddjvu_page_rotation_t rotation = DDJVU_ROTATE_0;
unsigned int dim_temp = 0;
switch(Zathura.document->rotate) { switch(Zathura.document->rotate) {
case 90: case 90:
tmp = page_width;
page_width = page_height;
page_height = page_tmp;
rotation = DDJVU_ROTATE_90; rotation = DDJVU_ROTATE_90;
break; break;
case 180: case 180:
rotation = DDJVU_ROTATE_180; rotation = DDJVU_ROTATE_180;
break; break;
case 270: case 270:
tmp = page_width;
page_width = page_height;
page_height = page_tmp;
rotation = DDJVU_ROTATE_270; rotation = DDJVU_ROTATE_270;
break; break;
} }