OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ |
| 8 #define CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ |
| 9 |
| 10 #include "core/include/fxcrt/fx_coordinates.h" |
| 11 #include "core/include/fxcrt/fx_string.h" |
| 12 #include "core/include/fxcrt/fx_system.h" |
| 13 #include "core/include/fxge/fx_dib.h" |
| 14 |
| 15 class CFX_RenderDevice; |
| 16 class CFX_GraphStateData; |
| 17 class CFX_PathData; |
| 18 class CPDF_RenderOptions; |
| 19 class CPDF_Font; |
| 20 |
| 21 class CPDF_TextRenderer { |
| 22 public: |
| 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, |
| 33 FX_FLOAT origin_y, |
| 34 CPDF_Font* pFont, |
| 35 FX_FLOAT font_size, |
| 36 const CFX_Matrix* matrix, |
| 37 const CFX_ByteString& str, |
| 38 FX_ARGB fill_argb, |
| 39 FX_ARGB stroke_argb = 0, |
| 40 const CFX_GraphStateData* pGraphState = NULL, |
| 41 const CPDF_RenderOptions* pOptions = NULL); |
| 42 |
| 43 static FX_BOOL DrawTextPath(CFX_RenderDevice* pDevice, |
| 44 int nChars, |
| 45 FX_DWORD* pCharCodes, |
| 46 FX_FLOAT* pCharPos, |
| 47 CPDF_Font* pFont, |
| 48 FX_FLOAT font_size, |
| 49 const CFX_Matrix* pText2User, |
| 50 const CFX_Matrix* pUser2Device, |
| 51 const CFX_GraphStateData* pGraphState, |
| 52 FX_ARGB fill_argb, |
| 53 FX_ARGB stroke_argb, |
| 54 CFX_PathData* pClippingPath, |
| 55 int nFlag = 0); |
| 56 |
| 57 static FX_BOOL DrawNormalText(CFX_RenderDevice* pDevice, |
| 58 int nChars, |
| 59 FX_DWORD* pCharCodes, |
| 60 FX_FLOAT* pCharPos, |
| 61 CPDF_Font* pFont, |
| 62 FX_FLOAT font_size, |
| 63 const CFX_Matrix* pText2Device, |
| 64 FX_ARGB fill_argb, |
| 65 const CPDF_RenderOptions* pOptions); |
| 66 |
| 67 static FX_BOOL DrawType3Text(CFX_RenderDevice* pDevice, |
| 68 int nChars, |
| 69 FX_DWORD* 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 }; |
| 76 |
| 77 #endif // CORE_FPDFAPI_FPDF_RENDER_INCLUDE_CPDF_TEXTRENDERER_H_ |
OLD | NEW |