From 24b0733a72bbc4013bff8628f198b0aea807aa06 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 13 Sep 2017 18:02:11 -0400 Subject: Change behaviour of FPDF_RenderPageBitmapWithMatrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fpdfapi/page/cpdf_page.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/fpdfapi/page/cpdf_page.h') diff --git a/core/fpdfapi/page/cpdf_page.h b/core/fpdfapi/page/cpdf_page.h index 1891e651be..47fba3caec 100644 --- a/core/fpdfapi/page/cpdf_page.h +++ b/core/fpdfapi/page/cpdf_page.h @@ -38,11 +38,16 @@ class CPDF_Page : public CPDF_PageObjectHolder { int xSize, int ySize, int iRotate) const; + CFX_Matrix GetDisplayMatrixWithTransformation( + int xPos, + int yPos, + int xSize, + int ySize, + const CFX_Matrix& transformation); float GetPageWidth() const { return m_PageWidth; } float GetPageHeight() const { return m_PageHeight; } CFX_FloatRect GetPageBBox() const { return m_BBox; } - const CFX_Matrix& GetPageMatrix() const { return m_PageMatrix; } int GetPageRotation() const; CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender.get(); } -- cgit v1.2.3