mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-05 17:34:56 +01:00
Updated rectangle calculation
This commit is contained in:
parent
3972302569
commit
22aa388349
1 changed files with 10 additions and 11 deletions
21
zathura.c
21
zathura.c
|
@ -622,28 +622,28 @@ recalcRectangle(int page_id, PopplerRectangle* rectangle)
|
||||||
switch(rotate)
|
switch(rotate)
|
||||||
{
|
{
|
||||||
case 90:
|
case 90:
|
||||||
rectangle->x1 = (page_height - y2) * scale;
|
rectangle->x1 = y2 * scale;
|
||||||
rectangle->y1 = x1 * scale;
|
rectangle->y1 = x1 * scale;
|
||||||
rectangle->x2 = (page_height - y1) * scale;
|
rectangle->x2 = y1 * scale;
|
||||||
rectangle->y2 = x2 * scale;
|
rectangle->y2 = x2 * scale;
|
||||||
break;
|
break;
|
||||||
case 180:
|
case 180:
|
||||||
rectangle->x1 = (page_width - x2) * scale;
|
rectangle->x1 = (page_width - x2) * scale;
|
||||||
rectangle->y1 = (page_height - y2) * scale;
|
rectangle->y1 = y2 * scale;
|
||||||
rectangle->x2 = (page_width - x1) * scale;
|
rectangle->x2 = (page_width - x1) * scale;
|
||||||
rectangle->y2 = (page_height - y1) * scale;
|
rectangle->y2 = y1 * scale;
|
||||||
break;
|
break;
|
||||||
case 270:
|
case 270:
|
||||||
rectangle->x1 = y1 * Zathura.PDF.scale;
|
rectangle->x1 = (page_height - y1) * scale;
|
||||||
rectangle->y1 = (page_width - x2) * scale;
|
rectangle->y1 = (page_width - x2) * scale;
|
||||||
rectangle->x2 = y2 * Zathura.PDF.scale;
|
rectangle->x2 = (page_height - y2) * scale;
|
||||||
rectangle->y2 = (page_width - x1) * scale;
|
rectangle->y2 = (page_width - x1) * scale;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rectangle->x1 = x1 * scale;
|
rectangle->x1 = x1 * scale;
|
||||||
rectangle->y1 = y1 * scale;
|
rectangle->y1 = (page_height - y1) * scale;
|
||||||
rectangle->x2 = x2 * scale;
|
rectangle->x2 = x2 * scale;
|
||||||
rectangle->y2 = y2 * scale;
|
rectangle->y2 = (page_height - y2) * scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1917,7 +1917,6 @@ bcmd_zoom(char* buffer, Argument* argument)
|
||||||
gboolean
|
gboolean
|
||||||
scmd_search(char* input, Argument* argument)
|
scmd_search(char* input, Argument* argument)
|
||||||
{
|
{
|
||||||
printf("%s\n", input);
|
|
||||||
argument->data = input;
|
argument->data = input;
|
||||||
sc_search(argument);
|
sc_search(argument);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue