From 118a8e28783f42e089721eac4880f3b3f683e832 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 9 Feb 2017 10:16:07 -0500 Subject: Replace rect.Transform(matrix) with matrix.TransformRect(rect) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Cl removes the rect based transform method which internally just called the matrix tranform method. The callers have been reversed to make it clearer the matrix is transforming the rect. Change-Id: I8ef57ccc2311e4e853b8180a6ff475f8eda2138e Reviewed-on: https://pdfium-review.googlesource.com/2572 Commit-Queue: dsinclair Reviewed-by: Nicolás Peña --- core/fpdfdoc/cpdf_annotlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index b1bc4c9ca9..ed1b60c287 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -136,12 +136,12 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, CFX_FloatRect annot_rect_f = pAnnot->GetRect(); CFX_Matrix matrix = *pMatrix; if (clip_rect) { - annot_rect_f.Transform(&matrix); + matrix.TransformRect(annot_rect_f); + FX_RECT annot_rect = annot_rect_f.GetOuterRect(); annot_rect.Intersect(*clip_rect); - if (annot_rect.IsEmpty()) { + if (annot_rect.IsEmpty()) continue; - } } if (pContext) { pAnnot->DrawInContext(pPage, pContext, &matrix, CPDF_Annot::Normal); -- cgit v1.2.3