summaryrefslogtreecommitdiff
path: root/core/fxge/ge/fx_ge_text.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/fxge/ge/fx_ge_text.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/fxge/ge/fx_ge_text.cpp')
-rw-r--r--core/fxge/ge/fx_ge_text.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index cc7ef7c6d7..669969db0b 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -28,6 +28,12 @@ void ResetTransform(FT_Face face) {
} // namespace
+FXTEXT_GLYPHPOS::FXTEXT_GLYPHPOS() : m_pGlyph(nullptr) {}
+
+FXTEXT_GLYPHPOS::FXTEXT_GLYPHPOS(const FXTEXT_GLYPHPOS&) = default;
+
+FXTEXT_GLYPHPOS::~FXTEXT_GLYPHPOS(){};
+
ScopedFontTransform::ScopedFontTransform(FT_Face face, FXFT_Matrix* matrix)
: m_Face(face) {
FXFT_Set_Transform(m_Face, matrix, 0);
@@ -48,7 +54,7 @@ FX_RECT FXGE_GetGlyphsBBox(const std::vector<FXTEXT_GLYPHPOS>& glyphs,
if (!pGlyph)
continue;
- FX_SAFE_INT32 char_left = glyph.m_OriginX;
+ FX_SAFE_INT32 char_left = glyph.m_Origin.x;
char_left += pGlyph->m_Left;
if (!char_left.IsValid())
continue;
@@ -64,7 +70,7 @@ FX_RECT FXGE_GetGlyphsBBox(const std::vector<FXTEXT_GLYPHPOS>& glyphs,
if (!char_right.IsValid())
continue;
- FX_SAFE_INT32 char_top = glyph.m_OriginY;
+ FX_SAFE_INT32 char_top = glyph.m_Origin.y;
char_top -= pGlyph->m_Top;
if (!char_top.IsValid())
continue;