mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 08:45:59 +01:00
Round values up when calculating width/height
This commit is contained in:
parent
fa6bc5a2e8
commit
97cad5a7a4
1 changed files with 4 additions and 4 deletions
8
render.c
8
render.c
|
@ -16,11 +16,11 @@ static void
|
||||||
page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned int* page_width, bool rotate)
|
page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned int* page_width, bool rotate)
|
||||||
{
|
{
|
||||||
if (rotate && page->document->rotate % 180) {
|
if (rotate && page->document->rotate % 180) {
|
||||||
*page_width = page->height * page->document->scale;
|
*page_width = ceil(page->height * page->document->scale);
|
||||||
*page_height = page->width * page->document->scale;
|
*page_height = ceil(page->width * page->document->scale);
|
||||||
} else {
|
} else {
|
||||||
*page_width = page->width * page->document->scale;
|
*page_width = ceil(page->width * page->document->scale);
|
||||||
*page_height = page->height * page->document->scale;
|
*page_height = ceil(page->height * page->document->scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue