summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index e991e456b7..8015a8df45 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1229,16 +1229,6 @@ CPDF_Pattern* CPDF_StreamContentParser::FindPattern(const CFX_ByteString& name,
m_pCurStates->m_ParentMatrix);
}
-void CPDF_StreamContentParser::ConvertTextSpace(FX_FLOAT& x, FX_FLOAT& y) {
- m_pCurStates->m_TextMatrix.TransformPoint(x, y);
- ConvertUserSpace(x, y);
-}
-
-void CPDF_StreamContentParser::ConvertUserSpace(FX_FLOAT& x, FX_FLOAT& y) {
- m_pCurStates->m_CTM.TransformPoint(x, y);
- m_mtContentToUser.TransformPoint(x, y);
-}
-
void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
FX_FLOAT fInitKerning,
FX_FLOAT* pKerning,
@@ -1276,9 +1266,11 @@ void CPDF_StreamContentParser::AddTextObject(CFX_ByteString* pStrs,
pCTM[3] = m_pCurStates->m_CTM.d;
}
pText->SetSegments(pStrs, pKerning, nsegs);
- pText->m_Pos = CFX_PointF(m_pCurStates->m_TextX,
- m_pCurStates->m_TextY + m_pCurStates->m_TextRise);
- ConvertTextSpace(pText->m_Pos.x, pText->m_Pos.y);
+ pText->m_Pos = m_mtContentToUser.Transform(
+ m_pCurStates->m_CTM.Transform(m_pCurStates->m_TextMatrix.Transform(
+ CFX_PointF(m_pCurStates->m_TextX,
+ m_pCurStates->m_TextY + m_pCurStates->m_TextRise))));
+
FX_FLOAT x_advance;
FX_FLOAT y_advance;
pText->CalcPositionData(&x_advance, &y_advance,