texlive[50990] Build/source/texk/dvipdfm-x: Only annotations with
commits+kakuto at tug.org
commits+kakuto at tug.org
Sun May 5 00:47:33 CEST 2019
Revision: 50990
http://tug.org/svn/texlive?view=revision&revision=50990
Author: kakuto
Date: 2019-05-05 00:47:33 +0200 (Sun, 05 May 2019)
Log Message:
-----------
Only annotations with auto-caluculated rect regions are affected by g option. (S. Hirata)
Modified Paths:
--------------
trunk/Build/source/texk/dvipdfm-x/ChangeLog
trunk/Build/source/texk/dvipdfm-x/pdfdoc.c
Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog 2019-05-04 22:47:27 UTC (rev 50989)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog 2019-05-04 22:47:33 UTC (rev 50990)
@@ -1,3 +1,10 @@
+2019-05-05 Shunsaku Hirata <shunsaku.hirata74 at gmail.com>
+
+ * pdfdoc.c: g option affects only annotations created by
+ "pdf:bann/eann" and html "a link" specials.
+ Report from Joseph Wright:
+ https://tug.org/pipermail/tex-live/2019-May/043612.html
+
2019-05-03 Shunsaku Hirata <shunsaku.hirata74 at gmail.com>
* specials.c: transformation applied to current point was not
Modified: trunk/Build/source/texk/dvipdfm-x/pdfdoc.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/pdfdoc.c 2019-05-04 22:47:27 UTC (rev 50989)
+++ trunk/Build/source/texk/dvipdfm-x/pdfdoc.c 2019-05-04 22:47:33 UTC (rev 50990)
@@ -1,6 +1,6 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2008-2018 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
+ Copyright (C) 2008-2019 by Jin-Hwan Cho, Matthias Franz, and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -1780,7 +1780,6 @@
pdf_doc *p = &pdoc;
pdf_page *page;
pdf_obj *rect_array;
- double annot_grow = p->opt.annot_grow;
double xpos, ypos;
pdf_rect annbox;
@@ -1812,10 +1811,10 @@
}
rect_array = pdf_new_array();
- pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.llx - annot_grow, 0.001)));
- pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.lly - annot_grow, 0.001)));
- pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.urx + annot_grow, 0.001)));
- pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.ury + annot_grow, 0.001)));
+ pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.llx, 0.001)));
+ pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.lly, 0.001)));
+ pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.urx, 0.001)));
+ pdf_add_array(rect_array, pdf_new_number(ROUND(annbox.ury, 0.001)));
pdf_add_dict (annot_dict, pdf_new_name("Rect"), rect_array);
pdf_add_array(page->annots, pdf_ref_obj(annot_dict));
@@ -2802,13 +2801,22 @@
void
pdf_doc_break_annot (void)
{
+ pdf_doc *p = &pdoc;
+ double g = p->opt.annot_grow;
+
if (breaking_state.dirty) {
pdf_obj *annot_dict;
+ pdf_rect rect;
/* Copy dict */
annot_dict = pdf_new_dict();
pdf_merge_dict(annot_dict, breaking_state.annot_dict);
- pdf_doc_add_annot(pdf_doc_current_page_number(), &(breaking_state.rect),
+ rect = breaking_state.rect;
+ rect.llx -= g;
+ rect.lly -= g;
+ rect.urx += g;
+ rect.ury += g;
+ pdf_doc_add_annot(pdf_doc_current_page_number(), &rect,
annot_dict, !breaking_state.broken);
pdf_release_obj(annot_dict);
More information about the tex-live-commits
mailing list