summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 10:16:07 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 16:38:46 +0000
commit118a8e28783f42e089721eac4880f3b3f683e832 (patch)
tree879d6fb7b0442feff533c265fef3a48c71a4b91e /core/fpdfapi/font
parent21e954b59fcef1b84fdcdb9ae337e2d4c060b19e (diff)
downloadpdfium-118a8e28783f42e089721eac4880f3b3f683e832.tar.xz
Replace rect.Transform(matrix) with matrix.TransformRect(rect)
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 <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp2
-rw-r--r--core/fpdfapi/font/cpdf_type3font.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index e96f824bd5..a9ffbbdf71 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -488,7 +488,7 @@ FX_RECT CPDF_CIDFont::GetCharBBox(uint32_t charcode) {
CIDTransformToFloat(pTransform[4]) * 1000,
CIDTransformToFloat(pTransform[5]) * 1000);
CFX_FloatRect rect_f(rect);
- rect_f.Transform(&matrix);
+ matrix.TransformRect(rect_f);
rect = rect_f.GetOuterRect();
}
}
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp
index 9542945845..f6cd6ecf26 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -121,7 +121,7 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(uint32_t charcode) {
if (rcBBox.right <= rcBBox.left || rcBBox.bottom >= rcBBox.top)
char_rect = pNewChar->m_pForm->CalcBoundingBox();
- char_rect.Transform(&m_FontMatrix);
+ m_FontMatrix.TransformRect(char_rect);
rcBBox.left = FXSYS_round(char_rect.left * 1000);
rcBBox.right = FXSYS_round(char_rect.right * 1000);
rcBBox.top = FXSYS_round(char_rect.top * 1000);