From 7a8d3d6f8cf6989b43de24995171ab309a1c94fa Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 10 Oct 2018 17:28:53 +0000 Subject: Simplify some object rect calculations. Change-Id: I46ae4fb4e0f8d51130f5e5beae286dae5466b629 Reviewed-on: https://pdfium-review.googlesource.com/c/43574 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- core/fpdfapi/page/cpdf_textobject.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'core/fpdfapi/page/cpdf_textobject.cpp') 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() { -- cgit v1.2.3