summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-16 14:02:22 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-16 19:23:59 +0000
commit49f7deb494064351c72ef4d31577e04f634e63f3 (patch)
tree05b46ee6b9c1f6cc9924e07af5ab2e095f647302 /core/fpdfapi/render/cpdf_renderstatus.cpp
parent2c02faed1da2375a91c7f9c003beb606a0611074 (diff)
downloadpdfium-49f7deb494064351c72ef4d31577e04f634e63f3.tar.xz
Convert fx_font points to CFX_Point{F}s
This converts the two Origin{X,Y} points in fx_font to CFX_Point{F} points. Change-Id: Id7cbb34a6e76043f1b26e9d7091d89f300dfc563 Reviewed-on: https://pdfium-review.googlesource.com/2720 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index fd44d42484..5a340cd8b1 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1833,8 +1833,8 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
continue;
m_pDevice->SetBitMask(&glyph.m_pGlyph->m_Bitmap,
- glyph.m_OriginX + glyph.m_pGlyph->m_Left,
- glyph.m_OriginY - glyph.m_pGlyph->m_Top,
+ glyph.m_Origin.x + glyph.m_pGlyph->m_Left,
+ glyph.m_Origin.y - glyph.m_pGlyph->m_Top,
fill_argb);
}
glyphs.clear();
@@ -1892,15 +1892,13 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
if (!pBitmap)
continue;
- int origin_x = FXSYS_round(matrix.e);
- int origin_y = FXSYS_round(matrix.f);
+ CFX_Point origin(FXSYS_round(matrix.e), FXSYS_round(matrix.f));
if (glyphs.empty()) {
- m_pDevice->SetBitMask(&pBitmap->m_Bitmap, origin_x + pBitmap->m_Left,
- origin_y - pBitmap->m_Top, fill_argb);
+ m_pDevice->SetBitMask(&pBitmap->m_Bitmap, origin.x + pBitmap->m_Left,
+ origin.y - pBitmap->m_Top, fill_argb);
} else {
glyphs[iChar].m_pGlyph = pBitmap;
- glyphs[iChar].m_OriginX = origin_x;
- glyphs[iChar].m_OriginY = origin_y;
+ glyphs[iChar].m_Origin = origin;
}
} else {
CFX_Matrix image_matrix = pType3Char->m_ImageMatrix;
@@ -1930,14 +1928,14 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
if (!glyph.m_pGlyph)
continue;
- pdfium::base::CheckedNumeric<int> left = glyph.m_OriginX;
+ pdfium::base::CheckedNumeric<int> left = glyph.m_Origin.x;
left += glyph.m_pGlyph->m_Left;
left -= rect.left;
left *= sa;
if (!left.IsValid())
continue;
- pdfium::base::CheckedNumeric<int> top = glyph.m_OriginY;
+ pdfium::base::CheckedNumeric<int> top = glyph.m_Origin.y;
top -= glyph.m_pGlyph->m_Top;
top -= rect.top;
top *= sd;