diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-10 17:28:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-10 17:28:53 +0000 |
commit | 7a8d3d6f8cf6989b43de24995171ab309a1c94fa (patch) | |
tree | 1703caebd3fe455c9f5e489a81b7e80bc57be627 /core/fpdfapi/page/cpdf_textobject.cpp | |
parent | 2c4c95d545c6e27b775a286e88130caadf8d5a7c (diff) | |
download | pdfium-7a8d3d6f8cf6989b43de24995171ab309a1c94fa.tar.xz |
Simplify some object rect calculations.
Change-Id: I46ae4fb4e0f8d51130f5e5beae286dae5466b629
Reviewed-on: https://pdfium-review.googlesource.com/c/43574
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_textobject.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_textobject.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_textobject.cpp b/core/fpdfapi/page/cpdf_textobject.cpp index b158376293..2b866baa25 100644 --- a/core/fpdfapi/page/cpdf_textobject.cpp +++ b/core/fpdfapi/page/cpdf_textobject.cpp @@ -293,10 +293,7 @@ void CPDF_TextObject::SetPosition(float x, float y) { float dy = y - m_Pos.y; m_Pos.x = x; m_Pos.y = y; - m_Rect.left += dx; - m_Rect.right += dx; - m_Rect.top += dy; - m_Rect.bottom += dy; + m_Rect.Translate(dx, dy); } void CPDF_TextObject::RecalcPositionData() { |