mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
branchport r489480
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=489483
This commit is contained in:
parent
3dad5f6890
commit
9d2d7085f0
1 changed files with 10 additions and 3 deletions
|
@ -69,9 +69,16 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
|
|||
else
|
||||
{
|
||||
// cropBox can not be bigger than mediaBox
|
||||
if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1 ||
|
||||
cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
|
||||
cropBox = mediaBox;
|
||||
if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1)
|
||||
{
|
||||
cropBox.x1 = mediaBox.x1;
|
||||
cropBox.x2 = mediaBox.x2;
|
||||
}
|
||||
if (cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1)
|
||||
{
|
||||
cropBox.y1 = mediaBox.y1;
|
||||
cropBox.y2 = mediaBox.y2;
|
||||
}
|
||||
}
|
||||
|
||||
// other boxes
|
||||
|
|
Loading…
Reference in a new issue