Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h

Issue 2013023002: Clean up CPDF_TextRenderer slightly. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@fxgeclean2
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_
8 #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ 8 #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_
9 9
10 #include "core/fxcrt/include/fx_coordinates.h" 10 #include "core/fxcrt/include/fx_coordinates.h"
11 #include "core/fxcrt/include/fx_string.h" 11 #include "core/fxcrt/include/fx_string.h"
12 #include "core/fxcrt/include/fx_system.h" 12 #include "core/fxcrt/include/fx_system.h"
13 #include "core/fxge/include/fx_dib.h" 13 #include "core/fxge/include/fx_dib.h"
14 14
15 class CFX_RenderDevice; 15 class CFX_RenderDevice;
16 class CFX_GraphStateData; 16 class CFX_GraphStateData;
17 class CFX_PathData; 17 class CFX_PathData;
18 class CPDF_RenderOptions; 18 class CPDF_RenderOptions;
19 class CPDF_Font; 19 class CPDF_Font;
20 20
21 class CPDF_TextRenderer { 21 class CPDF_TextRenderer {
22 public: 22 public:
23 static void DrawTextString(CFX_RenderDevice* pDevice, 23 static void DrawTextString(CFX_RenderDevice* pDevice,
24 int left,
25 int top,
26 CPDF_Font* pFont,
27 int height,
28 const CFX_ByteString& str,
29 FX_ARGB argb);
30
31 static void DrawTextString(CFX_RenderDevice* pDevice,
32 FX_FLOAT origin_x, 24 FX_FLOAT origin_x,
33 FX_FLOAT origin_y, 25 FX_FLOAT origin_y,
34 CPDF_Font* pFont, 26 CPDF_Font* pFont,
35 FX_FLOAT font_size, 27 FX_FLOAT font_size,
36 const CFX_Matrix* matrix, 28 const CFX_Matrix* matrix,
37 const CFX_ByteString& str, 29 const CFX_ByteString& str,
38 FX_ARGB fill_argb, 30 FX_ARGB fill_argb,
39 FX_ARGB stroke_argb = 0, 31 FX_ARGB stroke_argb,
40 const CFX_GraphStateData* pGraphState = NULL, 32 const CFX_GraphStateData* pGraphState,
41 const CPDF_RenderOptions* pOptions = NULL); 33 const CPDF_RenderOptions* pOptions);
42 34
43 static FX_BOOL DrawTextPath(CFX_RenderDevice* pDevice, 35 static FX_BOOL DrawTextPath(CFX_RenderDevice* pDevice,
44 int nChars, 36 int nChars,
45 uint32_t* pCharCodes, 37 uint32_t* pCharCodes,
46 FX_FLOAT* pCharPos, 38 FX_FLOAT* pCharPos,
47 CPDF_Font* pFont, 39 CPDF_Font* pFont,
48 FX_FLOAT font_size, 40 FX_FLOAT font_size,
49 const CFX_Matrix* pText2User, 41 const CFX_Matrix* pText2User,
50 const CFX_Matrix* pUser2Device, 42 const CFX_Matrix* pUser2Device,
51 const CFX_GraphStateData* pGraphState, 43 const CFX_GraphStateData* pGraphState,
52 FX_ARGB fill_argb, 44 FX_ARGB fill_argb,
53 FX_ARGB stroke_argb, 45 FX_ARGB stroke_argb,
54 CFX_PathData* pClippingPath, 46 CFX_PathData* pClippingPath,
55 int nFlag = 0); 47 int nFlag);
56 48
57 static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice, 49 static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice,
58 int nChars, 50 int nChars,
59 uint32_t* pCharCodes, 51 uint32_t* pCharCodes,
60 FX_FLOAT* pCharPos, 52 FX_FLOAT* pCharPos,
61 CPDF_Font* pFont, 53 CPDF_Font* pFont,
62 FX_FLOAT font_size, 54 FX_FLOAT font_size,
63 const CFX_Matrix* pText2Device, 55 const CFX_Matrix* pText2Device,
64 FX_ARGB fill_argb, 56 FX_ARGB fill_argb,
65 const CPDF_RenderOptions* pOptions); 57 const CPDF_RenderOptions* pOptions);
66
67 static FX_BOOL DrawType3Text(CFX_RenderDevice* pDevice,
68 int nChars,
69 uint32_t* pCharCodes,
70 FX_FLOAT* pCharPos,
71 CPDF_Font* pFont,
72 FX_FLOAT font_size,
73 const CFX_Matrix* pText2Device,
74 FX_ARGB fill_argb);
75 }; 58 };
76 59
77 #endif // CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ 60 #endif // CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698