blob: 17fbeeaee27c1f16464e08ed5ff86297edff953f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Page.cc 2005/09/09 18:24:18 459064
+++ branches/KDE/3.5/kdegraphics/kpdf/xpdf/xpdf/Page.cc 2005/12/18 21:44:35 489480
@@ -66,6 +66,20 @@
if (!haveCropBox) {
cropBox = mediaBox;
}
+ else
+ {
+ // cropBox can not be bigger than 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
bleedBox = cropBox;
|