From da83d3a5cc09c4056310b3cf299dbbccd5c70d11 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 13 Feb 2017 15:30:30 -0500 Subject: Convert Origins to points MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Nicolás Peña --- core/fxge/win32/cfx_psrenderer.cpp | 2 +- core/fxge/win32/cfx_psrenderer.h | 2 +- core/fxge/win32/fx_win32_print.cpp | 4 ++-- core/fxge/win32/win32_int.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fxge/win32') 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, -- cgit v1.2.3