| 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_PAGE_INCLUDE_CPDF_TEXTSTATEDATA_H_ | |
| 8 #define CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_TEXTSTATEDATA_H_ | |
| 9 | |
| 10 #include "core/fxcrt/include/fx_system.h" | |
| 11 | |
| 12 class CPDF_Font; | |
| 13 class CPDF_Document; | |
| 14 | |
| 15 // See PDF Reference 1.7, page 402, table 5.3. | |
| 16 enum class TextRenderingMode { | |
| 17 MODE_FILL = 0, | |
| 18 MODE_STROKE = 1, | |
| 19 MODE_FILL_STROKE = 2, | |
| 20 MODE_INVISIBLE = 3, | |
| 21 MODE_FILL_CLIP = 4, | |
| 22 MODE_STROKE_CLIP = 5, | |
| 23 MODE_FILL_STROKE_CLIP = 6, | |
| 24 MODE_CLIP = 7, | |
| 25 }; | |
| 26 | |
| 27 bool SetTextRenderingModeFromInt(int iMode, TextRenderingMode* mode); | |
| 28 bool TextRenderingModeIsClipMode(const TextRenderingMode& mode); | |
| 29 bool TextRenderingModeIsStrokeMode(const TextRenderingMode& mode); | |
| 30 | |
| 31 class CPDF_TextStateData { | |
| 32 public: | |
| 33 CPDF_TextStateData(); | |
| 34 CPDF_TextStateData(const CPDF_TextStateData& src); | |
| 35 ~CPDF_TextStateData(); | |
| 36 | |
| 37 void SetFont(CPDF_Font* pFont); | |
| 38 FX_FLOAT GetFontSizeV() const; | |
| 39 FX_FLOAT GetFontSizeH() const; | |
| 40 FX_FLOAT GetBaselineAngle() const; | |
| 41 FX_FLOAT GetShearAngle() const; | |
| 42 | |
| 43 CPDF_Font* m_pFont; | |
| 44 CPDF_Document* m_pDocument; | |
| 45 FX_FLOAT m_FontSize; | |
| 46 FX_FLOAT m_CharSpace; | |
| 47 FX_FLOAT m_WordSpace; | |
| 48 TextRenderingMode m_TextMode; | |
| 49 FX_FLOAT m_Matrix[4]; | |
| 50 FX_FLOAT m_CTM[4]; | |
| 51 }; | |
| 52 | |
| 53 #endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_TEXTSTATEDATA_H_ | |
| OLD | NEW |