summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-12-25 04:04:10 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-12-25 04:04:10 +0000
commitf70c2b82c8244701735afbeadba01a301b68a106 (patch)
treed84a3b9d6c9b38cffe90226c4c10fd7c8a7bad12 /Build/source/texk/web2c
parentce2303a1709aa9ba9659664b52111f568d29d7be (diff)
Simplify the support of Rotate.
git-svn-id: svn://tug.org/texlive/trunk@49499 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/xetexdir/pdfimage.cpp30
2 files changed, 12 insertions, 22 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
index c91e0d408b5..456b83ae4f3 100644
--- a/Build/source/texk/web2c/xetexdir/ChangeLog
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * pdfimage.cpp: Simplify the support of Rotate.
+
2018-12-24 Stefan Br\"uns <stefan.bruens@rwth-aachen.de>
* pdfimage.cpp: Avoid modification of internal poppler object,
diff --git a/Build/source/texk/web2c/xetexdir/pdfimage.cpp b/Build/source/texk/web2c/xetexdir/pdfimage.cpp
index b097b820df7..2e3a588f938 100644
--- a/Build/source/texk/web2c/xetexdir/pdfimage.cpp
+++ b/Build/source/texk/web2c/xetexdir/pdfimage.cpp
@@ -1,7 +1,7 @@
/****************************************************************************\
Part of the XeTeX typesetting system
Copyright (c) 1994-2008 by SIL International
- Copyright (c) 2009, 2017 by Jonathan Kew
+ Copyright (c) 2009, 2018 by Jonathan Kew
SIL Author(s): Jonathan Kew
@@ -98,33 +98,19 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box)
break;
}
- PDFRectangle r2 = *r;
int RotAngle = 0;
RotAngle = (int)page->getRotate() % 360;
if (RotAngle < 0)
RotAngle += 360;
if (RotAngle == 90 || RotAngle == 270) {
- double tmpvalue;
- if (r2.x1 > r2.x2) {
- tmpvalue = r2.x1;
- r2.x1 = r2.x2;
- r2.x2 = tmpvalue;
- }
- if (r2.y1 > r2.y2) {
- tmpvalue = r2.y1;
- r2.y1 = r2.y2;
- r2.y2 = tmpvalue;
- }
-
- tmpvalue = r2.x2;
- r2.x2 = r2.x1 + r2.y2 - r2.y1;
- r2.y2 = r2.y1 + tmpvalue - r2.x1;
+ box->wd = 72.27 / 72 * fabs(r->y2 - r->y1);
+ box->ht = 72.27 / 72 * fabs(r->x2 - r->x1);
+ } else {
+ box->wd = 72.27 / 72 * fabs(r->x2 - r->x1);
+ box->ht = 72.27 / 72 * fabs(r->y2 - r->y1);
}
-
- box->x = 72.27 / 72 * my_fmin(r2.x1, r2.x2);
- box->y = 72.27 / 72 * my_fmin(r2.y1, r2.y2);
- box->wd = 72.27 / 72 * fabs(r2.x2 - r2.x1);
- box->ht = 72.27 / 72 * fabs(r2.y2 - r2.y1);
+ box->x = 72.27 / 72 * my_fmin(r->x1, r->x2);
+ box->y = 72.27 / 72 * my_fmin(r->y1, r->y2);
delete doc;