summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_allstates.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-21 17:18:27 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-21 22:59:45 +0000
commitc54c07eac0531b6d9fcd591c3e44c5e27817d076 (patch)
tree8bf27d5ec965a4a1e00cd9907d2b0b98022a49a8 /core/fpdfapi/page/cpdf_allstates.cpp
parent892d7510db7015b1835d8e057a716518881f126d (diff)
downloadpdfium-c54c07eac0531b6d9fcd591c3e44c5e27817d076.tar.xz
Convert text positions from x,y to CFX_PointF
This Cl converts the AllStates to use CFX_PointF and changes the advance code to return a CFX_PointF instead of accepting two out floats. Change-Id: Idb5e295b92e8a16ead535773de066f4b7ea2bdd9 Reviewed-on: https://pdfium-review.googlesource.com/2813 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_allstates.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_allstates.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/fpdfapi/page/cpdf_allstates.cpp b/core/fpdfapi/page/cpdf_allstates.cpp
index 94bc7b466f..282a47fe29 100644
--- a/core/fpdfapi/page/cpdf_allstates.cpp
+++ b/core/fpdfapi/page/cpdf_allstates.cpp
@@ -23,12 +23,8 @@ FX_FLOAT ClipFloat(FX_FLOAT f) {
} // namespace
-CPDF_AllStates::CPDF_AllStates() {
- m_TextX = m_TextY = m_TextLineX = m_TextLineY = 0;
- m_TextLeading = 0;
- m_TextRise = 0;
- m_TextHorzScale = 1.0f;
-}
+CPDF_AllStates::CPDF_AllStates()
+ : m_TextLeading(0), m_TextRise(0), m_TextHorzScale(1.0f) {}
CPDF_AllStates::~CPDF_AllStates() {}
@@ -37,10 +33,8 @@ void CPDF_AllStates::Copy(const CPDF_AllStates& src) {
m_TextMatrix = src.m_TextMatrix;
m_ParentMatrix = src.m_ParentMatrix;
m_CTM = src.m_CTM;
- m_TextX = src.m_TextX;
- m_TextY = src.m_TextY;
- m_TextLineX = src.m_TextLineX;
- m_TextLineY = src.m_TextLineY;
+ m_TextPos = src.m_TextPos;
+ m_TextLinePos = src.m_TextLinePos;
m_TextLeading = src.m_TextLeading;
m_TextRise = src.m_TextRise;
m_TextHorzScale = src.m_TextHorzScale;