diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-14 10:08:55 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-14 15:11:27 +0000 |
commit | d8b01ca3bd9c21e76443004907ea1bc02fb57b6e (patch) | |
tree | 59f80451f15fef9e4e1641e1aa3eb1b592c4010c /xfa/fxfa/app/cxfa_textlayout.cpp | |
parent | ceb3ab55ca5ad1fae590f50a09f04b7ed47656b1 (diff) | |
download | pdfium-d8b01ca3bd9c21e76443004907ea1bc02fb57b6e.tar.xz |
Revert "Convert Origins to points"
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11.
Reason for revert: Reverting chain to see if fixes Chrome roll.
Original change's description:
> 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>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc
Reviewed-on: https://pdfium-review.googlesource.com/2696
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/cxfa_textlayout.cpp')
-rw-r--r-- | xfa/fxfa/app/cxfa_textlayout.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp index 17aa1a40ab..ad0fc057e2 100644 --- a/xfa/fxfa/app/cxfa_textlayout.cpp +++ b/xfa/fxfa/app/cxfa_textlayout.cpp @@ -1187,11 +1187,11 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, int32_t iChars = GetDisplayPos(pPiece, pCharPos); if (iChars > 0) { CFX_PointF pt1, pt2; - FX_FLOAT fEndY = pCharPos[0].m_Origin.y + 1.05f; + FX_FLOAT fEndY = pCharPos[0].m_OriginY + 1.05f; if (pPiece->iPeriod == XFA_ATTRIBUTEENUM_Word) { for (int32_t i = 0; i < pPiece->iUnderline; i++) { for (int32_t j = 0; j < iChars; j++) { - pt1.x = pCharPos[j].m_Origin.x; + pt1.x = pCharPos[j].m_OriginX; pt2.x = pt1.x + pCharPos[j].m_FontCharWidth * pPiece->fFontSize / 1000.0f; pt1.y = pt2.y = fEndY; @@ -1200,9 +1200,9 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, fEndY += 2.0f; } } else { - pt1.x = pCharPos[0].m_Origin.x; + pt1.x = pCharPos[0].m_OriginX; pt2.x = - pCharPos[iChars - 1].m_Origin.x + + pCharPos[iChars - 1].m_OriginX + pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f; for (int32_t i = 0; i < pPiece->iUnderline; i++) { pt1.y = pt2.y = fEndY; @@ -1210,9 +1210,9 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, fEndY += 2.0f; } } - fEndY = pCharPos[0].m_Origin.y - pPiece->rtPiece.height * 0.25f; - pt1.x = pCharPos[0].m_Origin.x; - pt2.x = pCharPos[iChars - 1].m_Origin.x + + fEndY = pCharPos[0].m_OriginY - pPiece->rtPiece.height * 0.25f; + pt1.x = pCharPos[0].m_OriginX; + pt2.x = pCharPos[iChars - 1].m_OriginX + pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f; for (int32_t i = 0; i < pPiece->iLineThrough; i++) { pt1.y = pt2.y = fEndY; @@ -1253,23 +1253,23 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice, if (iChars < 1) return; - fOrgX = pCharPos[iChars - 1].m_Origin.x + + fOrgX = pCharPos[iChars - 1].m_OriginX + pCharPos[iChars - 1].m_FontCharWidth * pPiece->fFontSize / 1000.0f; pPiece = pPieceLine->m_textPieces[iPieceNext].get(); iChars = GetDisplayPos(pPiece, pCharPos); if (iChars < 1) return; - fEndX = pCharPos[0].m_Origin.x; + fEndX = pCharPos[0].m_OriginX; CFX_PointF pt1, pt2; pt1.x = fOrgX, pt2.x = fEndX; - FX_FLOAT fEndY = pCharPos[0].m_Origin.y + 1.05f; + FX_FLOAT fEndY = pCharPos[0].m_OriginY + 1.05f; for (int32_t i = 0; i < pPiece->iUnderline; i++) { pt1.y = pt2.y = fEndY; pPath->AddLine(pt1, pt2); fEndY += 2.0f; } - fEndY = pCharPos[0].m_Origin.y - pPiece->rtPiece.height * 0.25f; + fEndY = pCharPos[0].m_OriginY - pPiece->rtPiece.height * 0.25f; for (int32_t i = 0; i < pPiece->iLineThrough; i++) { pt1.y = pt2.y = fEndY; pPath->AddLine(pt1, pt2); |