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 /core/fxge/win32 | |
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 'core/fxge/win32')
-rw-r--r-- | core/fxge/win32/cfx_psrenderer.cpp | 2 | ||||
-rw-r--r-- | core/fxge/win32/cfx_psrenderer.h | 2 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_print.cpp | 4 | ||||
-rw-r--r-- | core/fxge/win32/win32_int.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp index 7fc47b9a46..1cbfb6ad9a 100644 --- a/core/fxge/win32/cfx_psrenderer.cpp +++ b/core/fxge/win32/cfx_psrenderer.cpp @@ -661,7 +661,7 @@ bool CFX_PSRenderer::DrawText(int nChars, buf << "/X" << ps_fontnum << " Ff " << font_size << " Fs Sf "; last_fontnum = ps_fontnum; } - buf << pCharPos[i].m_OriginX << " " << pCharPos[i].m_OriginY << " m"; + buf << pCharPos[i].m_Origin.x << " " << pCharPos[i].m_Origin.y << " m"; CFX_ByteString hex; hex.Format("<%02X>", ps_glyphindex); buf << hex.AsStringC() << "Tj\n"; diff --git a/core/fxge/win32/cfx_psrenderer.h b/core/fxge/win32/cfx_psrenderer.h index e941739f44..163c6180af 100644 --- a/core/fxge/win32/cfx_psrenderer.h +++ b/core/fxge/win32/cfx_psrenderer.h @@ -22,7 +22,7 @@ class CFX_FontCache; class CFX_Matrix; class CFX_PathData; class CPSFont; -struct FXTEXT_CHARPOS; +class FXTEXT_CHARPOS; class CFX_PSRenderer { public: diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index a2ea82a94e..fd9bc70e0e 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -296,11 +296,11 @@ bool CGdiPrinterDriver::DrawDeviceText(int nChars, ASSERT(charpos.m_AdjustMatrix[1] == 0); ASSERT(charpos.m_AdjustMatrix[2] == 0); ASSERT(charpos.m_AdjustMatrix[3] == 0); - ASSERT(charpos.m_OriginY == 0); + ASSERT(charpos.m_Origin.y == 0); // Round the spacing to the nearest integer, but keep track of the rounding // error for calculating the next spacing value. - FX_FLOAT fOriginX = charpos.m_OriginX * kScaleFactor; + FX_FLOAT fOriginX = charpos.m_Origin.x * kScaleFactor; FX_FLOAT fPixelSpacing = fOriginX - fPreviousOriginX; spacing[i] = FXSYS_round(fPixelSpacing); fPreviousOriginX = fOriginX - (fPixelSpacing - spacing[i]); diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index 974a1200e6..f8eae87308 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -17,7 +17,7 @@ #include "core/fxge/win32/cpsoutput.h" #include "core/fxge/win32/dwrite_int.h" -struct FXTEXT_CHARPOS; +class FXTEXT_CHARPOS; struct WINDIB_Open_Args_; typedef HANDLE(__stdcall* FuncType_GdiAddFontMemResourceEx)(PVOID pbFont, |