Round values up when calculating width/height

This commit is contained in:
Moritz Lipp 2011-12-11 01:45:27 +01:00
parent fa6bc5a2e8
commit 97cad5a7a4

View file

@ -16,11 +16,11 @@ static void
page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned int* page_width, bool rotate)
{
if (rotate && page->document->rotate % 180) {
*page_width = page->height * page->document->scale;
*page_height = page->width * page->document->scale;
*page_width = ceil(page->height * page->document->scale);
*page_height = ceil(page->width * page->document->scale);
} else {
*page_width = page->width * page->document->scale;
*page_height = page->height * page->document->scale;
*page_width = ceil(page->width * page->document->scale);
*page_height = ceil(page->height * page->document->scale);
}
}