summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-06 00:32:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-06 00:32:16 +0000
commitd9826495fe0e279c6e2d587a656c7452cc2dc71f (patch)
tree0256f8903da70445c5f8e21b62c01d2d70385201 /core/fpdfapi/render/cpdf_renderstatus.cpp
parenta0032a2a2c53794bbf0ccb412a5c70ce66f052fb (diff)
downloadpdfium-d9826495fe0e279c6e2d587a656c7452cc2dc71f.tar.xz
Encapsulate CPDF_PageObject's rect member.
At the same time, change it from 4 floats to a CFX_FloatRect. Change-Id: I00ded941723d6a264b7a17c73fd337e66b449308 Reviewed-on: https://pdfium-review.googlesource.com/c/43570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 19fea76d70..f77b6c654f 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1040,10 +1040,10 @@ void CPDF_RenderStatus::RenderObjectList(
if (!pCurObj)
continue;
- if (pCurObj->m_Left > clip_rect.right ||
- pCurObj->m_Right < clip_rect.left ||
- pCurObj->m_Bottom > clip_rect.top ||
- pCurObj->m_Top < clip_rect.bottom) {
+ if (pCurObj->GetRect().left > clip_rect.right ||
+ pCurObj->GetRect().right < clip_rect.left ||
+ pCurObj->GetRect().bottom > clip_rect.top ||
+ pCurObj->GetRect().top < clip_rect.bottom) {
continue;
}
RenderSingleObject(pCurObj.get(), mtObj2Device);
@@ -1972,12 +1972,9 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
path.m_ClipPath.AppendTexts(&pCopy);
path.m_ColorState = textobj->m_ColorState;
path.m_GeneralState = textobj->m_GeneralState;
- path.m_Path.AppendRect(textobj->m_Left, textobj->m_Bottom, textobj->m_Right,
- textobj->m_Top);
- path.m_Left = textobj->m_Left;
- path.m_Bottom = textobj->m_Bottom;
- path.m_Right = textobj->m_Right;
- path.m_Top = textobj->m_Top;
+ path.m_Path.AppendRect(textobj->GetRect().left, textobj->GetRect().bottom,
+ textobj->GetRect().right, textobj->GetRect().top);
+ path.SetRect(textobj->GetRect());
AutoRestorer<UnownedPtr<const CPDF_PageObject>> restorer2(&m_pCurObj);
RenderSingleObject(&path, mtObj2Device);