diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-13 15:30:30 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-13 20:49:26 +0000 |
commit | da83d3a5cc09c4056310b3cf299dbbccd5c70d11 (patch) | |
tree | ab0f293986d54615da5a769d0d39aae93f9108c1 /xfa/fxgraphics/cfx_graphics.cpp | |
parent | f0b65545313f065790de7f91c02e5dd160753abd (diff) | |
download | pdfium-da83d3a5cc09c4056310b3cf299dbbccd5c70d11.tar.xz |
Convert Origins to points
This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
Reviewed-on: https://pdfium-review.googlesource.com/2575
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxgraphics/cfx_graphics.cpp')
-rw-r--r-- | xfa/fxgraphics/cfx_graphics.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp index f1abfb7cb5..2b8bd17aad 100644 --- a/xfa/fxgraphics/cfx_graphics.cpp +++ b/xfa/fxgraphics/cfx_graphics.cpp @@ -1484,8 +1484,7 @@ FWL_Error CFX_Graphics::CalcTextInfo(const CFX_WideString& text, FX_FLOAT left = (FX_FLOAT)(0); FX_FLOAT top = (FX_FLOAT)(0); charCodes[0] = text.GetAt(0); - charPos[0].m_OriginX = penX + left; - charPos[0].m_OriginY = penY + top; + charPos[0].m_Origin = CFX_PointF(penX + left, penY + top); charPos[0].m_GlyphIndex = encoding->GlyphFromCharCode(charCodes[0]); charPos[0].m_FontCharWidth = FXSYS_round( m_info.font->GetGlyphWidth(charPos[0].m_GlyphIndex) * m_info.fontHScale); @@ -1498,8 +1497,7 @@ FWL_Error CFX_Graphics::CalcTextInfo(const CFX_WideString& text, m_info.fontSpacing; for (int32_t i = 1; i < length; i++) { charCodes[i] = text.GetAt(i); - charPos[i].m_OriginX = penX + left; - charPos[i].m_OriginY = penY + top; + charPos[i].m_Origin = CFX_PointF(penX + left, penY + top); charPos[i].m_GlyphIndex = encoding->GlyphFromCharCode(charCodes[i]); charPos[i].m_FontCharWidth = FXSYS_round(m_info.font->GetGlyphWidth(charPos[i].m_GlyphIndex) * |