From b3a5240832fce3f0b706c16070a1e69c2c1edb86 Mon Sep 17 00:00:00 2001 From: Ralf Sippl Date: Mon, 19 Mar 2018 23:30:28 +0000 Subject: Calculate AP for multi-line markup annotations correctly Currently, when constructing AP for multi-line markup annotations, we only take into account the first set of quadpoints, resulting in only the first line of the annotation being displayed if the annotation spans multiple lines. This CL, initially written by Jane Liu (https://pdfium-review.googlesource.com/12010) takes into account all the quadpoints, so multi-line annotations can be displayed correctly. BUG=pdfium:876 Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7 Reviewed-on: https://pdfium-review.googlesource.com/28590 Reviewed-by: Lei Zhang Commit-Queue: Lei Zhang --- .../resources/annotation_markup_multiline_no_ap.in | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 testing/resources/annotation_markup_multiline_no_ap.in (limited to 'testing/resources/annotation_markup_multiline_no_ap.in') diff --git a/testing/resources/annotation_markup_multiline_no_ap.in b/testing/resources/annotation_markup_multiline_no_ap.in new file mode 100644 index 0000000000..5107831ac9 --- /dev/null +++ b/testing/resources/annotation_markup_multiline_no_ap.in @@ -0,0 +1,97 @@ +{{header}} + +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R +>> +endobj + +{{object 2 0}} << + /Type /Pages + /Count 1 + /Kids [ 3 0 R ] +>> +endobj + +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 595 842] + /Annots [ + 4 0 R + 5 0 R + 6 0 R + 7 0 R + ] + /Tabs /R +>> +endobj + +{{object 4 0}} << + /Type /Annot + /Subtype /Highlight + /Rect [ 108 602 506 640 ] + /NM (Hilight-1) + /F 4 + /QuadPoints [ + 107.7896 639.9486 505.8939 639.9486 107.7896 629.1634 505.8939 629.1634 + 107.7896 626.2871 505.8939 626.2871 107.7896 615.5011 505.8939 615.5011 + 107.7896 612.6248 380.1389 612.6248 107.7896 601.8397 380.1389 601.8397 + ] + /C [ 1 1 0 ] + /Contents () +>> +endobj + +{{object 5 0}} << + /Type /Annot + /Subtype /Underline + /Rect [ 108 552 506 590 ] + /NM (Underline-1) + /F 4 + /QuadPoints [ + 107.7896 589.9486 505.8939 589.9486 107.7896 579.1634 505.8939 579.1634 + 107.7896 576.2871 505.8939 576.2871 107.7896 565.5011 505.8939 565.5011 + 107.7896 562.6248 380.1389 562.6248 107.7896 551.8397 380.1389 551.8397 + ] + /C [ 0 0 0 ] + /Contents () +>> +endobj + +{{object 6 0}} << + /Type /Annot + /Subtype /Squiggly + /Rect [ 108 502 506 540 ] + /NM (Squiggly-1) + /F 4 + /QuadPoints [ + 107.7896 539.9486 505.8939 539.9486 107.7896 529.1634 505.8939 529.1634 + 107.7896 526.2871 505.8939 526.2871 107.7896 515.5011 505.8939 515.5011 + 107.7896 512.6248 380.1389 512.6248 107.7896 501.8397 380.1389 501.8397 + ] + /C [ 0 0 0 ] + /Contents () +>> +endobj + +{{object 7 0}} << + /Type /Annot + /Subtype /StrikeOut + /Rect [ 108 452 506 490 ] + /NM (StrikeOut-1) + /F 4 + /QuadPoints [ + 107.7896 489.9486 505.8939 489.9486 107.7896 479.1634 505.8939 479.1634 + 107.7896 476.2871 505.8939 476.2871 107.7896 465.5011 505.8939 465.5011 + 107.7896 462.6248 380.1389 462.6248 107.7896 451.8397 380.1389 451.8397 + ] + /C [ 0 0 0 ] + /Contents () +>> +endobj + +{{xref}} +{{trailer}} +{{startxref}} +%%EOF -- cgit v1.2.3