From 58e4c5ac24a88f83d1ba8277dee87baf4cba36a0 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Mon, 13 Feb 2017 16:08:51 -0500 Subject: Clean up CPDF_TextObject a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modernizing CPDF_TextObject a little bit, in preparation for the addition of APIs for adding text to PDFs. m_pCharCodes, m_pCharPos are now vectors, this caused some propagation to other classes. Also m_Pos is now a point. Note that GetItemInfo is being changed in another CL, so did minimal changes there. Change-Id: I6e5f19b5d45872e3e714a7cb587c81c92e640ea3 Reviewed-on: https://pdfium-review.googlesource.com/2614 Commit-Queue: Nicolás Peña Reviewed-by: Tom Sepez --- core/fpdfapi/render/cpdf_textrenderer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fpdfapi/render/cpdf_textrenderer.h') diff --git a/core/fpdfapi/render/cpdf_textrenderer.h b/core/fpdfapi/render/cpdf_textrenderer.h index 82cc2cf8e6..d3acceeb96 100644 --- a/core/fpdfapi/render/cpdf_textrenderer.h +++ b/core/fpdfapi/render/cpdf_textrenderer.h @@ -7,6 +7,8 @@ #ifndef CORE_FPDFAPI_RENDER_CPDF_TEXTRENDERER_H_ #define CORE_FPDFAPI_RENDER_CPDF_TEXTRENDERER_H_ +#include + #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" @@ -33,9 +35,8 @@ class CPDF_TextRenderer { const CPDF_RenderOptions* pOptions); static bool DrawTextPath(CFX_RenderDevice* pDevice, - int nChars, - uint32_t* pCharCodes, - FX_FLOAT* pCharPos, + const std::vector& charCodes, + const std::vector& charPos, CPDF_Font* pFont, FX_FLOAT font_size, const CFX_Matrix* pText2User, @@ -47,9 +48,8 @@ class CPDF_TextRenderer { int nFlag); static bool DrawNormalText(CFX_RenderDevice* pDevice, - int nChars, - uint32_t* pCharCodes, - FX_FLOAT* pCharPos, + const std::vector& charCodes, + const std::vector& charPos, CPDF_Font* pFont, FX_FLOAT font_size, const CFX_Matrix* pText2Device, -- cgit v1.2.3