summaryrefslogtreecommitdiff
path: root/testing/resources
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-09-13 18:02:11 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-13 22:12:47 +0000
commit24b0733a72bbc4013bff8628f198b0aea807aa06 (patch)
treead2d50860409b5746ac467534ca433890999a821 /testing/resources
parentcb32712be1e545e3ceb4f41b77a8bebc2bf2726f (diff)
downloadpdfium-24b0733a72bbc4013bff8628f198b0aea807aa06.tar.xz
Change behaviour of FPDF_RenderPageBitmapWithMatrix
This CL changes the behavior of FPDF_RenderPageBitmapWithMatrix so it transforms the bitmap. Before, the page would be transformed and the assumption was that it would be drawn on a bitmap with the same dimensions as the original page. This does not work well because a transformation generally changes the dimensions of the page. The rectangles test is modified to include small rectangles in the corner of the page, so that it's clear that the whole original page is being displayed. Bug: pdfium:849 Change-Id: Ie89f959a1605fea59a15d239ca871ccd939ec92b Reviewed-on: https://pdfium-review.googlesource.com/13510 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'testing/resources')
-rw-r--r--testing/resources/rectangles.in14
-rw-r--r--testing/resources/rectangles.pdf16
2 files changed, 19 insertions, 11 deletions
diff --git a/testing/resources/rectangles.in b/testing/resources/rectangles.in
index ed71cf830a..49932fff2a 100644
--- a/testing/resources/rectangles.in
+++ b/testing/resources/rectangles.in
@@ -6,7 +6,7 @@
endobj
{{object 2 0}} <<
/Type /Pages
- /MediaBox [ 0 0 200 200 ]
+ /MediaBox [ 0 0 200 300 ]
/Count 1
/Kids [ 3 0 R ]
>>
@@ -22,13 +22,17 @@ endobj
stream
q
0 0 0 rg
-10 80 50 30 re B*
+0 290 10 10 re B*
+10 150 50 30 re B*
0 0 1 rg
-70 135 50 30 re B*
+190 290 10 10 re B*
+70 232 50 30 re B*
0 1 0 rg
-130 80 50 30 re B*
+190 0 10 10 re B*
+130 150 50 30 re B*
1 0 0 rg
-70 25 50 30 re B*
+0 0 10 10 re B*
+70 67 50 30 re B*
Q
endstream
endobj
diff --git a/testing/resources/rectangles.pdf b/testing/resources/rectangles.pdf
index 718bee56d9..7bad251ba7 100644
--- a/testing/resources/rectangles.pdf
+++ b/testing/resources/rectangles.pdf
@@ -7,7 +7,7 @@
endobj
2 0 obj <<
/Type /Pages
- /MediaBox [ 0 0 200 200 ]
+ /MediaBox [ 0 0 200 300 ]
/Count 1
/Kids [ 3 0 R ]
>>
@@ -23,13 +23,17 @@ endobj
stream
q
0 0 0 rg
-10 80 50 30 re B*
+0 290 10 10 re B*
+10 150 50 30 re B*
0 0 1 rg
-70 135 50 30 re B*
+190 290 10 10 re B*
+70 232 50 30 re B*
0 1 0 rg
-130 80 50 30 re B*
+190 0 10 10 re B*
+130 150 50 30 re B*
1 0 0 rg
-70 25 50 30 re B*
+0 0 10 10 re B*
+70 67 50 30 re B*
Q
endstream
endobj
@@ -42,5 +46,5 @@ xref
0000000230 00000 n
trailer<< /Root 1 0 R /Size 5 >>
startxref
-382
+456
%%EOF